Advertisement
memberhero

lol

Mar 29th, 2018
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 138.69 KB | None | 0 0
  1. --[[
  2. Made by Fenrier.
  3. ]]
  4. wait(1)
  5. Player=game:GetService("Players").LocalPlayer
  6. Character=Player.Character
  7. PlayerGui=Player.PlayerGui
  8. Backpack=Player.Backpack
  9. Torso=Character.Torso
  10. Head=Character.Head
  11. Humanoid=Character.Humanoid
  12. LeftArm=Character["Left Arm"]
  13. LeftLeg=Character["Left Leg"]
  14. RightArm=Character["Right Arm"]
  15. RightLeg=Character["Right Leg"]
  16. LS=Torso["Left Shoulder"]
  17. LH=Torso["Left Hip"]
  18. RS=Torso["Right Shoulder"]
  19. RH=Torso["Right Hip"]
  20. Neck=Torso.Neck
  21. it=Instance.new
  22. vt=Vector3.new
  23. cf=CFrame.new
  24. euler=CFrame.fromEulerAnglesXYZ
  25. angles=CFrame.Angles
  26. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  27. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  28. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  29. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  30. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  31. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  32. RootPart=Character.HumanoidRootPart
  33. RootJoint=RootPart.RootJoint
  34. RootCF=euler(-1.57,0,3.14)
  35. attack = false
  36. attackdebounce = false
  37. MMouse=Player:GetMouse()
  38. combo=0
  39. local idle=0
  40. local Anim="Idle"
  41. local Effects={}
  42. local Weapon={}
  43. local Welds={}
  44. local decreaseatk=0
  45. local decreasedef=0
  46. local decreasemvmt=0
  47. local RailgunTarget=nil
  48. local CannonTarget=nil
  49. local BladesTarget=nil
  50. local railgunattack=false
  51. local cannonattack=false
  52. local tribladesattack=false
  53. local givingarmor=false
  54. local givingrailgun=false
  55. local givingplasma=false
  56. local givingblades=false
  57. local Target=nil
  58. local move1="(Z)\
  59. Railgun Armor"
  60. local move2="(X)\
  61. Plasma Cannon Armor"
  62. local move3="(C)\
  63. Tri-Blades Armor"
  64. local move4="(V)\
  65. Ion Cannon Strike"
  66. local cooldowns={}
  67. local cooldown1=100 table.insert(cooldowns,cooldown1)
  68. local cooldown2=100 table.insert(cooldowns,cooldown2)
  69. local cooldown3=100 table.insert(cooldowns,cooldown3)
  70. local cooldown4=0 table.insert(cooldowns,cooldown4)
  71. local cooldownsadd={}
  72. local cooldownadd1=.3 table.insert(cooldownsadd,cooldownadd1)
  73. local cooldownadd2=.4 table.insert(cooldownsadd,cooldownadd2)
  74. local cooldownadd3=.25 table.insert(cooldownsadd,cooldownadd3)
  75. local cooldownadd4=100 table.insert(cooldownsadd,cooldownadd4)
  76. local cooldownmax=100
  77.  
  78. --blocknum=100
  79. local manualguardend=false
  80. --player
  81. player=nil
  82. --save shoulders
  83. RSH, LSH=nil, nil
  84. --welds
  85. RW, LW=Instance.new("Motor"), Instance.new("Motor")
  86. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  87. LH=Torso["Left Hip"]
  88. RH=Torso["Right Hip"]
  89. TorsoColor=Torso.BrickColor
  90. TorsoRed=TorsoColor.Color.r
  91. TorsoGreen=TorsoColor.Color.g
  92. TorsoBlue=TorsoColor.Color.b
  93. NewCol=Color3.new(.3,TorsoGreen,.3)
  94. NewCol2=Color3.new(TorsoRed,TorsoGreen,TorsoBlue)
  95. if Player:findFirstChild("Color1")~=nil then
  96. NewCol=Player.Color1.Value
  97. end
  98. if Player:findFirstChild("Color2")~=nil then
  99. NewCol2=Player.Color2.Value
  100. end
  101. if Character.Name=="" then
  102. NewCol=BrickColor.new("Bright blue").Color
  103. end
  104. local mdec=Instance.new("NumberValue",Decrease)
  105. mdec.Name="DecreaseDef"
  106. mdec.Value=.4
  107. local mdec2=Instance.new("NumberValue",Decrease)
  108. mdec2.Name="DecreaseMvmt"
  109. mdec2.Value=.1
  110.  
  111. local Animate=Character.Animate
  112. local animation=Instance.new("Animation")
  113. animation.AnimationId="http://www.roblox.com/Asset?ID=180435571"
  114. local animTrack=Humanoid:LoadAnimation(animation)
  115. local canjump=true
  116. function removeControl()
  117. canjump=false
  118. end
  119. function resumeControl()
  120. canjump=true
  121. end
  122. Player.Character.Humanoid.Changed:connect(function()
  123. if canjump==false then
  124. Player.Character.Humanoid.Jump=false
  125. end
  126. end)
  127.  
  128. ArtificialHB = Instance.new("BindableEvent", script)
  129. ArtificialHB.Name = "Heartbeat"
  130. script:WaitForChild("Heartbeat")
  131. frame = 1 / 30
  132. tf = 0
  133. allowframeloss = true
  134. tossremainder = false
  135. lastframe = tick()
  136. script.Heartbeat:Fire()
  137. game:GetService("RunService").Heartbeat:connect(function(s, p)
  138.  
  139. tf = tf + s
  140. if frame <= tf then
  141. if allowframeloss then
  142. script.Heartbeat:Fire()
  143. lastframe = tick()
  144. else
  145. for i = 1, math.floor(tf / frame) do
  146. script.Heartbeat:Fire()
  147. end
  148. lastframe = tick()
  149. end
  150. if tossremainder then
  151. tf = 0
  152. else
  153. tf = tf - frame * math.floor(tf / frame)
  154. end
  155. end
  156. end
  157. )
  158. swait = function(num)
  159.  
  160. if num == 0 or num == nil then
  161. ArtificialHB.Event:wait()
  162. else
  163. for i = 0, num do
  164. ArtificialHB.Event:wait()
  165. end
  166. end
  167. end
  168.  
  169. if Character:findFirstChild("Gear Gauntlet",true) ~= nil then
  170. Character:findFirstChild("Gear Gauntlet",true).Parent = nil
  171. end
  172. if Character:findFirstChild("Railgun",true) ~= nil then
  173. Character:findFirstChild("Railgun",true).Parent = nil
  174. end
  175. if Character:findFirstChild("Plasma Cannon",true) ~= nil then
  176. Character:findFirstChild("Plasma Cannon",true).Parent = nil
  177. end
  178. if Character:findFirstChild("Tri-Blades",true) ~= nil then
  179. Character:findFirstChild("Tri-Blades",true).Parent = nil
  180. end
  181. if Player.PlayerGui:findFirstChild("WeaponGUI",true) ~= nil then
  182. Player.PlayerGui:findFirstChild("WeaponGUI",true).Parent = nil
  183. end
  184. if Character:findFirstChild("Stats",true) ~= nil then
  185. Character:findFirstChild("Stats",true).Parent = nil
  186. end
  187. local Stats=Instance.new("BoolValue")
  188. Stats.Name="Stats"
  189. Stats.Parent=Character
  190. local Atk=Instance.new("NumberValue")
  191. Atk.Name="Damage"
  192. Atk.Parent=Stats
  193. Atk.Value=2
  194. local Def=Instance.new("NumberValue")
  195. Def.Name="Defense"
  196. Def.Parent=Stats
  197. Def.Value=50
  198. local Mvmt=Instance.new("NumberValue")
  199. Mvmt.Name="Movement"
  200. Mvmt.Parent=Stats
  201. Mvmt.Value=1.3
  202. local Block=Instance.new("BoolValue")
  203. Block.Name="Block"
  204. Block.Parent=Stats
  205. Block.Value=false
  206. local Stun=Instance.new("NumberValue")
  207. Stun.Name="Stun"
  208. Stun.Parent=Stats
  209. Stun.Value=0
  210. local StunT=Instance.new("NumberValue")
  211. StunT.Name="StunThreshold"
  212. StunT.Parent=Stats
  213. StunT.Value=100
  214. local Rooted=Instance.new("BoolValue")
  215. Rooted.Name="Rooted"
  216. Rooted.Parent=Stats
  217. Rooted.Value=false
  218. local Decrease=Instance.new("BoolValue")
  219. Decrease.Name="Decrease"
  220. Decrease.Parent=Stats
  221. Decrease.Value=false
  222. local Stunned=Instance.new("BoolValue")
  223. Stunned.Name="Stunned"
  224. Stunned.Parent=Stats
  225. Stunned.Value=false
  226. local Stagger=Instance.new("BoolValue")
  227. Stagger.Name="Stagger"
  228. Stagger.Parent=Stats
  229. Stagger.Value=false
  230. local StaggerHit=Instance.new("BoolValue")
  231. StaggerHit.Name="StaggerHit"
  232. StaggerHit.Parent=Stats
  233. StaggerHit.Value=false
  234. local RecentEnemy=Instance.new("ObjectValue")
  235. RecentEnemy.Name="RecentEnemy"
  236. RecentEnemy.Parent=Stats
  237. RecentEnemy.Value=nil
  238. local mana=Instance.new("NumberValue")
  239. mana.Name="Mana"
  240. mana.Parent=Stats
  241. mana.Value=99999999e99999999999
  242.  
  243. function NoOutline(Part)
  244. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  245. end
  246.  
  247. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  248. local fp=it("Part")
  249. fp.formFactor=formfactor
  250. fp.Parent=parent
  251. fp.Reflectance=reflectance
  252. fp.Transparency=transparency
  253. fp.CanCollide=false
  254. fp.Locked=true
  255. fp.BrickColor=brickcolor
  256. fp.Name=name
  257. fp.Size=size
  258. fp.Position=Torso.Position
  259. NoOutline(fp)
  260. fp.Material="SmoothPlastic"
  261. fp:BreakJoints()
  262. return fp
  263. end
  264.  
  265. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  266. local mesh=it(Mesh)
  267. mesh.Parent=part
  268. if Mesh=="SpecialMesh" then
  269. mesh.MeshType=meshtype
  270. if meshid~="nil" then
  271. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  272. end
  273. end
  274. mesh.Offset=offset
  275. mesh.Scale=scale
  276. return mesh
  277. end
  278.  
  279. function weld(parent,part0,part1,c0)
  280. local weld=it("Motor")
  281. weld.Parent=parent
  282. weld.Part0=part0
  283. weld.Part1=part1
  284. weld.C0=c0
  285. return weld
  286. end
  287.  
  288. function gui(GuiType,parent,text,backtrans,backcol,pos,size)
  289. local gui=it(GuiType)
  290. gui.Parent=parent
  291. gui.Text=text
  292. gui.BackgroundTransparency=backtrans
  293. gui.BackgroundColor3=backcol
  294. gui.SizeConstraint="RelativeXY"
  295. gui.TextXAlignment="Center"
  296. gui.TextYAlignment="Center"
  297. gui.Position=pos
  298. gui.Size=size
  299. gui.Font="SourceSans"
  300. gui.FontSize="Size14"
  301. gui.TextWrapped=false
  302. gui.TextStrokeTransparency=0
  303. gui.TextColor=BrickColor.new("White")
  304. return gui
  305. end
  306.  
  307. local Color1=Torso.BrickColor
  308.  
  309. local fengui=it("GuiMain")
  310. fengui.Parent=Player.PlayerGui
  311. fengui.Name="WeaponGUI"
  312. local fenframe=it("Frame")
  313. fenframe.Parent=fengui
  314. fenframe.BackgroundColor3=Color3.new(255,255,255)
  315. fenframe.BackgroundTransparency=1
  316. fenframe.BorderColor3=Color3.new(17,17,17)
  317. fenframe.Size=UDim2.new(0.1,0,0.1,0)
  318. fenframe.Position=UDim2.new(0.95,0,0.7,0)
  319. local fenframe2=it("Frame")
  320. fenframe2.Parent=fengui
  321. fenframe2.BackgroundColor3=Color3.new(255,255,255)
  322. fenframe2.BackgroundTransparency=1
  323. fenframe2.BorderColor3=Color3.new(17,17,17)
  324. fenframe2.Size=UDim2.new(0.2,0,0.1,0)
  325. fenframe2.Position=UDim2.new(0.4,0,0.85,0)
  326. local fenframe3=it("Frame")
  327. fenframe3.Parent=fengui
  328. fenframe3.BackgroundColor3=Color3.new(255,255,255)
  329. fenframe3.BackgroundTransparency=1
  330. fenframe3.BorderColor3=Color3.new(17,17,17)
  331. fenframe3.Size=UDim2.new(0.2,0,0.2,0)
  332. fenframe3.Position=UDim2.new(0.8,0,0.8,0)
  333. fenframe3.Name="MoveFrame"
  334. local fenframe4=it("Frame")
  335. fenframe4.Parent=fengui
  336. fenframe4.BackgroundColor3=Color3.new(255,255,255)
  337. fenframe4.BackgroundTransparency=1
  338. fenframe4.BorderColor3=Color3.new(17,17,17)
  339. fenframe4.Size=UDim2.new(0.1,0,0.1,0)
  340. fenframe4.Position=UDim2.new(0,0,0.7,0)
  341. local pressedf=false
  342. local fenframe5=it("Frame")
  343. fenframe5.Parent=fengui
  344. fenframe5.BackgroundColor3=Color3.new(0,0,0)
  345. fenframe5.BackgroundTransparency=1
  346. fenframe5.BorderColor3=Color3.new(0,0,0)
  347. fenframe5.Size=UDim2.new(1,0,1,0)
  348. fenframe5.Position=UDim2.new(0,0,0,0)
  349. fenframe5.ZIndex=2
  350. local tellbar=gui("TextLabel",fenframe5,"Press 'F' to equip your weapon.",1,Color3.new(0,0,0),UDim2.new(.25,0,.25,0),UDim2.new(.5,0,.5,0))
  351. tellbar.Font="Arial"
  352. tellbar.TextScaled=true
  353. tellbar.TextTransparency=1
  354. tellbar.TextStrokeTransparency=1
  355. tellbar.ZIndex=2
  356. local fnumb=0
  357. --gui(GuiType,parent,text,backtrans,backcol,pos,size)
  358. local fenbarmana1=gui("TextLabel",fenframe,"",0,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(.4,0,-4,0))
  359. local fenbarmana2=gui("TextLabel",fenframe,"",0,BrickColor.new("Dark green").Color,UDim2.new(0,0,0,0),UDim2.new(.4,0,0,0))
  360. local fenbarmana4=gui("TextLabel",fenframe,"Mana("..mana.Value..")",1,Color3.new(0,0,0),UDim2.new(0,0,.2,0),UDim2.new(.4,0,.2,0))
  361. local fenbardamage=gui("TextLabel",fenframe2,"Damage",.55,Color3.new(155/255,0,0),UDim2.new(-.23,0,0,0),UDim2.new(.2,0,1,0))
  362. local fenbardef=gui("TextLabel",fenframe2,"Defense",0.55,Color3.new(0,0,155/255),UDim2.new(-.46,0,0,0),UDim2.new(.2,0,1,0))
  363. local fenbarmove=gui("TextLabel",fenframe2,"Walkspeed",0.55,Color3.new(0,155/255,0),UDim2.new(1.03,0,0,0),UDim2.new(.2,0,1,0))
  364. local fenbarhp1=gui("TextLabel",fenframe2,"",0,Color3.new(0,0,0),UDim2.new(-.46,0,1,0),UDim2.new(1.92,0,.4,0))
  365. local fenbarhp2=gui("TextLabel",fenbarhp1,"",0,Color3.new(1,0,0),UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  366. local fenbarhp3=gui("TextLabel",fenbarhp1,"(100)",1,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(1,0,1,0))
  367. local fenbarstun1=gui("TextLabel",fenframe4,"",0,Color3.new(0,0,0),UDim2.new(.2,0,0,0),UDim2.new(.4,0,-4,0))
  368. local fenbarstun2=gui("TextLabel",fenframe4,"",0,Color3.new(0.960784,0.803922,0.188235),UDim2.new(.2,0,0,0),UDim2.new(.4,0,0,0))
  369. local fenbarstun3=gui("TextLabel",fenframe4,"Stun("..Stun.Value..")",1,Color3.new(0.960784,0.803922,0.188235),UDim2.new(.2,0,.2,0),UDim2.new(.4,0,.2,0))
  370. local fenbarmove1=gui("TextButton",fenframe3,move1,.55,Color3.new(.5,.5,.5),UDim2.new(0.1,0,0.1,0),UDim2.new(.4,0,.4,0))
  371. fenbarmove1.ZIndex=2
  372. local fenbarmove1b=gui("TextLabel",fenbarmove1,"",.55,BrickColor.new(NewCol).Color,UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  373. local fenbarmove2=gui("TextButton",fenframe3,move2,.55,Color3.new(.5,.5,.5),UDim2.new(0.6,0,0.1,0),UDim2.new(.4,0,.4,0))
  374. fenbarmove2.ZIndex=2
  375. local fenbarmove2b=gui("TextLabel",fenbarmove2,"",.55,BrickColor.new(NewCol).Color,UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  376. local fenbarmove3=gui("TextButton",fenframe3,move3,.55,Color3.new(.5,.5,.5),UDim2.new(0.1,0,0.6,0),UDim2.new(.4,0,.4,0))
  377. fenbarmove3.ZIndex=2
  378. local fenbarmove3b=gui("TextLabel",fenbarmove3,"",.55,BrickColor.new(NewCol).Color,UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  379. local fenbarmove4=gui("TextButton",fenframe3,move4,.55,Color3.new(.5,.5,.5),UDim2.new(0.6,0,0.6,0),UDim2.new(.4,0,.4,0))
  380. fenbarmove4.ZIndex=2
  381. local fenbarmove4b=gui("TextLabel",fenbarmove4,"",.55,BrickColor.new("Really red").Color,UDim2.new(0,0,0,0),UDim2.new(0,0,1,0))
  382.  
  383. local modelzorz=Instance.new("Model")
  384. modelzorz.Parent=Character
  385. modelzorz.Name="Gear Gauntlet"
  386.  
  387. RightArm.Transparency=1
  388. local handle=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Handle",vt(0.2,0.2,0.2))
  389. local prt1=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part01",vt(0.2,0.2,0.2))
  390. local prt2=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part02",vt(0.2,0.2,0.2))
  391. local prt3=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part03",vt(0.2,0.2,0.2))
  392. local prt4=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part04",vt(0.2,0.2,0.2))
  393. local prt5=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part05",vt(0.2,0.2,0.2))
  394. local prt6=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Part06",vt(0.2,0.2,0.2))
  395. local prt7=part(3,modelzorz,0,0,Torso.BrickColor,"Part07",vt(0.2,0.2,0.2))
  396. local prt8=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part08",vt(0.2,0.2,0.2))
  397. local prt9=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Part09",vt(0.2,0.2,0.2))
  398. local prt10=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part10",vt(0.2,0.2,0.2))
  399. local prt11=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part11",vt(0.2,0.2,0.2))
  400. local prt12=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part12",vt(0.2,0.2,0.2))
  401. local prt13=part(3,modelzorz,0,0,BrickColor.new(NewCol),"Part13",vt(0.2,0.2,0.2))
  402. local prt14=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Part14",vt(0.2,0.2,0.2))
  403. local prt15=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part15",vt(0.2,0.2,0.2))
  404. local prt16=part(3,modelzorz,.4,0,BrickColor.new(NewCol),"Part16",vt(0.2,0.2,0.2))
  405.  
  406. hmsh=mesh("BlockMesh",handle,"","",vt(0,0,0),vt(5.1,10.1,5.1))
  407. msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(6,3,6))
  408. msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(1,3.5,5.25))
  409. msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(5.25,3.5,1))
  410. msh4=mesh("BlockMesh",prt4,"","",vt(0,0,0),vt(8,8.1,1))
  411. msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(8,8.1,1))
  412. msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(3,0.5,3))
  413. msh7=mesh("SpecialMesh",prt7,"Sphere","nil",vt(0,0,0),vt(2.5,2.5,2.5))
  414. msh8=mesh("CylinderMesh",prt8,"","",vt(0,0,0),vt(3,0.5,0.3))
  415. msh9=mesh("CylinderMesh",prt9,"","",vt(0,0,0),vt(1.5,0.5,1.5))
  416. msh10=mesh("CylinderMesh",prt10,"","",vt(0,0,0),vt(1,0.5,1))
  417. msh11=mesh("BlockMesh",prt11,"","",vt(0,0,0),vt(2,2,6))
  418. msh12=mesh("SpecialMesh",prt12,"Wedge","nil",vt(0,0,0),vt(2,1,4))
  419. msh13=mesh("CylinderMesh",prt13,"","",vt(0,0,0),vt(3,0.5,0.3))
  420. msh14=mesh("CylinderMesh",prt14,"","",vt(0,0,0),vt(1.5,0.5,1.5))
  421. msh15=mesh("CylinderMesh",prt15,"","",vt(0,0,0),vt(1,0.5,1))
  422. msh16=mesh("SpecialMesh",prt16,"FileMesh","9756362",vt(0,0,0),vt(.2,1,.6))
  423.  
  424. local hwld=weld(handle,handle,RightArm,euler(0,0,0)*cf(0,0,0))
  425. local wld1=weld(prt1,prt1,handle,euler(0,0,0)*cf(0,0.6,0))
  426. local wld2=weld(prt1,prt2,prt1,euler(0,0,0)*cf(-.2,0.1,0))
  427. local wld3=weld(prt1,prt3,prt1,euler(0,0,0)*cf(0,0.1,0))
  428. local wld4=weld(prt1,prt4,prt1,euler(0,0.785,0)*cf(0,-0.81,0))
  429. local wld5=weld(prt1,prt5,prt1,euler(0,-0.785,0)*cf(0,-0.81,0))
  430. local wld6=weld(prt1,prt6,prt1,euler(0,0,0)*cf(0,-1.6,0))
  431. local wld7=weld(prt1,prt7,prt6,euler(0,0,0)*cf(0,0,0))
  432. local wld8=weld(prt1,prt8,prt1,euler(1.57,0,-1.57)*cf(0,0,-0.55))
  433. local wld9=weld(prt1,prt9,prt8,euler(0,0,0)*cf(0,0.05,0))
  434. local wld10=weld(prt1,prt10,prt9,euler(0,0,0)*cf(0,0.01,0))
  435. local wld11=weld(prt1,prt11,handle,euler(0,0,0)*cf(-.4,-.5,0))
  436. local wld12=weld(prt1,prt12,prt11,euler(-.5,1.57,1.57)*cf(-.3,.2,0))
  437. local wld13=weld(prt1,prt13,prt1,euler(1.57,0,-1.57)*cf(0,0,.55))
  438. local wld14=weld(prt1,prt14,prt13,euler(0,0,0)*cf(0,-0.05,0))
  439. local wld15=weld(prt1,prt15,prt14,euler(0,0,0)*cf(0,-0.01,0))
  440. local wld16=weld(prt1,prt16,prt1,euler(0,0,0)*cf(-.6,0,0))
  441.  
  442. numb2=0
  443. for i=1,4 do
  444. numb=0.3
  445. for i=1,3 do
  446. local prtclaw=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Partclaw",vt(0.2,0.2,0.2))
  447. mshclaw=mesh("SpecialMesh",prtclaw,"Wedge","nil",vt(0,0,0),vt(0.5,1.5,0.5))
  448. local wldclaw=weld(prt1,prtclaw,prt1,euler(1.57,-1.57,-1.57)*cf(-0.6,0.3,numb)*euler(0,numb2,0))
  449. numb=numb-0.3
  450. end
  451. numb2=numb2+1.57
  452. end
  453.  
  454. numb=0
  455. for i=1,5 do
  456. local prtgear=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Partgear",vt(0.2,0.2,0.2))
  457. mshgear=mesh("BlockMesh",prtgear,"","",vt(0,0,0),vt(2,0.45,0.35))
  458. local wldgear=weld(prt1,prtgear,prt9,euler(0,numb,0)*cf(0,0,0))
  459. numb=numb+0.628
  460. end
  461.  
  462. numb=0
  463. for i=1,5 do
  464. local prtgear=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Partgear",vt(0.2,0.2,0.2))
  465. mshgear=mesh("BlockMesh",prtgear,"","",vt(0,0,0),vt(2,0.45,0.35))
  466. local wldgear=weld(prt1,prtgear,prt14,euler(0,numb,0)*cf(0,0,0))
  467. numb=numb+0.628
  468. end
  469.  
  470. num=.3
  471. num2=.5
  472. for i=1,3 do
  473. local prtclaw1=part(3,modelzorz,0,0,BrickColor.new("Black"),"Partclaw1",vt(0.2,0.2,0.2))
  474. clawmsh1=mesh("SpecialMesh",prtclaw1,"Wedge","nil",vt(0,0,0),vt(1,1,2))
  475. local clawwld1=weld(prt1,prtclaw1,prt11,euler(0,-1.57+num2,1.57)*cf(-.2,-.2,num))
  476. num=num-.3
  477. num2=num2-.5
  478. end
  479.  
  480. num1=.5
  481. for i=1,2 do
  482. num=1.57
  483. num2=.08
  484. for i=1,2 do
  485. local prt17=part(3,modelzorz,.5,0,BrickColor.new("Medium stone grey"),"Part17",vt(0.2,0.2,0.2))
  486. msh17=mesh("SpecialMesh",prt17,"Wedge","nil",vt(0,0,0),vt(.2,4,.8))
  487. local wld17=weld(prt1,prt17,handle,euler(3.14,num,0)*cf(num2,-.3,num1))
  488. num=num-3.14
  489. num2=num2-.16
  490. end
  491. num1=num1-1
  492. end
  493.  
  494. for _,c in pairs(modelzorz:children()) do
  495. table.insert(Weapon,c)
  496. end
  497. for _,c in pairs(prt1:children()) do
  498. if c.className=="Motor" then
  499. table.insert(Welds,c)
  500. end
  501. end
  502. local Color1=BrickColor.new("Medium stone grey")
  503. local Color2=BrickColor.new(NewCol)
  504. local Color4=BrickColor.new("Really black")
  505.  
  506. local model1=Instance.new("Model")
  507. model1.Parent=nil
  508. model1.Name="Railgun"
  509. Railgun={}
  510. RailgunWelds={}
  511. local model2=Instance.new("Model")
  512. model2.Parent=nil
  513. model2.Name="Plasma Cannon"
  514. Plasma={}
  515. PlasmaWelds={}
  516. local model3=Instance.new("Model")
  517. model3.Parent=nil
  518. model3.Name="Tri-Blades"
  519. Blades={}
  520. BladesWelds={}
  521.  
  522. rprt1=part(3,model1,0,0,Color1,"Part1",vt(0.2,0.2,0.2))
  523. rprt2=part(3,model1,0,0,Color2,"Part2",vt(0.2,0.2,0.2))
  524. rprt3=part(3,model1,0,0,Color2,"Part3",vt(0.2,0.2,0.2))
  525. rprt4=part(3,model1,0,0,Color2,"Part4",vt(0.2,0.2,0.2))
  526. rprt5=part(3,model1,0,0,Color2,"Part5",vt(0.2,0.2,0.2))
  527. rprt6=part(3,model1,0,0,Color2,"Part6",vt(0.2,0.2,0.2))
  528. rprt7=part(3,model1,0,0,Color1,"Part7",vt(0.2,0.2,0.2))
  529. rprt8=part(3,model1,0,0,Color4,"Part8",vt(0.2,0.2,0.2))
  530. rprt9=part(3,model1,0,0,Color1,"Part9",vt(0.2,0.2,0.2))
  531. rprt10=part(3,model1,0,0,Color1,"Part10",vt(0.2,0.2,0.2))
  532. rprt11=part(3,model1,0,0,Color1,"Part11",vt(0.2,0.2,0.2))
  533. rprt12=part(3,model1,0,0,Color1,"Part12",vt(0.2,0.2,0.2))
  534. rprt13=part(3,model1,0,0,Color1,"Part13",vt(0.2,0.2,0.2))
  535. rprt14=part(3,model1,0,0,Color1,"Part14",vt(0.2,0.2,0.2))
  536. rprt15=part(3,model1,0,0,Color1,"Part15",vt(0.2,0.2,0.2))
  537. rprt16=part(3,model1,0,0,Color1,"Part16",vt(0.2,0.2,0.2))
  538. rprt17=part(3,model1,0,0,Color1,"Part17",vt(0.2,0.2,0.2))
  539. rprt18=part(3,model1,0,0,Color2,"Part18",vt(0.2,0.2,0.2))
  540. rprt19=part(3,model1,0,0,Color2,"Part19",vt(0.2,0.2,0.2))
  541. rprt20=part(3,model1,0.2,0,Color1,"Part20",vt(0.2,0.2,0.2))
  542. rprt21=part(3,model1,0.2,0,Color1,"Part21",vt(0.2,0.2,0.2))
  543. rprt22=part(3,model1,0.5,0,Color1,"Part22",vt(0.2,0.2,0.2))
  544. rprt23=part(3,model1,0.5,0,Color1,"Part23",vt(0.2,0.2,0.2))
  545. rprt24=part(3,model1,0,0,Color2,"Part24",vt(0.2,0.2,0.2))
  546. rprt25=part(3,model1,0,0,Color2,"Part25",vt(0.2,0.2,0.2))
  547. rprt26=part(3,model1,0.2,0,Color1,"Part26",vt(0.2,0.2,0.2))
  548. rprt27=part(3,model1,0.2,0,Color1,"Part27",vt(0.2,0.2,0.2))
  549. rprt28=part(3,model1,0.5,0,Color1,"Part28",vt(0.2,0.2,0.2))
  550. rprt29=part(3,model1,0.5,0,Color1,"Part29",vt(0.2,0.2,0.2))
  551. rprt30=part(3,model1,0,0,Color2,"Part30",vt(0.2,0.2,0.2))
  552. rprt31=part(3,model1,0,0,Color2,"Part31",vt(0.2,0.2,0.2))
  553. rprt32=part(3,model1,0.2,0,Color1,"Part32",vt(0.2,0.2,0.2))
  554. rprt33=part(3,model1,0.2,0,Color1,"Part33",vt(0.2,0.2,0.2))
  555. rprt34=part(3,model1,0.5,0,Color1,"Part34",vt(0.2,0.2,0.2))
  556. rprt35=part(3,model1,0.5,0,Color1,"Part35",vt(0.2,0.2,0.2))
  557. for _,c in pairs(model1:children()) do
  558. table.insert(Railgun,c)
  559. end
  560. --
  561. pprt1=part(3,model2,0,0,Color1,"aPart1",vt(0.2,0.2,0.2))
  562. pprt2=part(3,model2,0,0,Color2,"aPart2",vt(0.2,0.2,0.2))
  563. pprt3=part(3,model2,0,0,Color2,"aPart3",vt(0.2,0.2,0.2))
  564. pprt4=part(3,model2,0,0,Color2,"aPart4",vt(0.2,0.2,0.2))
  565. pprt5=part(3,model2,0,0,Color2,"aPart5",vt(0.2,0.2,0.2))
  566. pprt6=part(3,model2,0,0,Color2,"aPart6",vt(0.2,0.2,0.2))
  567. pprt7=part(3,model2,0,0,Color2,"aPart7",vt(0.2,0.2,0.2))
  568. pprt8=part(3,model2,0,0,Color1,"aPart8",vt(0.2,0.2,0.2))
  569. pprt9=part(3,model2,0,0,Color1,"aPart9",vt(0.2,0.2,0.2))
  570. pprt10=part(3,model2,0,0,Color4,"aPart10",vt(0.2,0.2,0.2))
  571. pprt11=part(3,model2,0,0,Color4,"aPart11",vt(0.2,0.2,0.2))
  572. pprt12=part(3,model2,0,0,Color1,"aPart12",vt(0.2,0.2,0.2))
  573. pprt13=part(3,model2,0,0,Color1,"aPart13",vt(0.2,0.2,0.2))
  574. pprt14=part(3,model2,0,0,Color1,"aPart14",vt(0.2,0.2,0.2))
  575. pprt15=part(3,model2,0,0,Color1,"aPart15",vt(0.2,0.2,0.2))
  576. pprt16=part(3,model2,0,0,Color1,"aPart16",vt(0.2,0.2,0.2))
  577. pprt17=part(3,model2,0,0,Color1,"aPart17",vt(0.2,0.2,0.2))
  578. pprt18=part(3,model2,0,0,Color1,"aPart18",vt(0.2,0.2,0.2))
  579. pprt19=part(3,model2,0,0,Color2,"aPart19",vt(0.2,0.2,0.2))
  580. pprt20=part(3,model2,0,0,Color2,"aPart20",vt(0.2,0.2,0.2))
  581. pprt21=part(3,model2,0.2,0,Color1,"aPart21",vt(0.2,0.2,0.2))
  582. pprt22=part(3,model2,0.2,0,Color1,"aPart22",vt(0.2,0.2,0.2))
  583. pprt23=part(3,model2,0.5,0,Color1,"aPart23",vt(0.2,0.2,0.2))
  584. pprt24=part(3,model2,0.5,0,Color1,"aPart24",vt(0.2,0.2,0.2))
  585. pprt25=part(3,model2,0,0,Color2,"aPart25",vt(0.2,0.2,0.2))
  586. pprt26=part(3,model2,0,0,Color2,"aPart26",vt(0.2,0.2,0.2))
  587. pprt27=part(3,model2,0.2,0,Color1,"aPart27",vt(0.2,0.2,0.2))
  588. pprt28=part(3,model2,0.2,0,Color1,"aPart28",vt(0.2,0.2,0.2))
  589. pprt29=part(3,model2,0.5,0,Color1,"aPart29",vt(0.2,0.2,0.2))
  590. pprt30=part(3,model2,0.5,0,Color1,"aPart30",vt(0.2,0.2,0.2))
  591. pprt31=part(3,model2,0,0,Color2,"aPart31",vt(0.2,0.2,0.2))
  592. pprt32=part(3,model2,0,0,Color2,"aPart32",vt(0.2,0.2,0.2))
  593. pprt33=part(3,model2,0.2,0,Color1,"aPart33",vt(0.2,0.2,0.2))
  594. pprt34=part(3,model2,0.2,0,Color1,"aPart34",vt(0.2,0.2,0.2))
  595. pprt35=part(3,model2,0.5,0,Color1,"aPart35",vt(0.2,0.2,0.2))
  596. pprt36=part(3,model2,0.5,0,Color1,"aPart36",vt(0.2,0.2,0.2))
  597. pprt37=part(3,model2,0,0,Color2,"aPart37",vt(0.2,0.2,0.2))
  598. pprt38=part(3,model1,0,0,Color1,"aPart38",vt(0.2,0.2,0.2))
  599. pprt39=part(3,model1,0,0,Color1,"aPart39",vt(0.2,0.2,0.2))
  600. for _,c in pairs(model2:children()) do
  601. table.insert(Plasma,c)
  602. end
  603. --
  604. bref=part(3,model3,0,1,Color4,"bRef",vt(0.2,0.2,0.2))
  605. bprt1=part(3,model3,0,1,Color1,"bPart1",vt(0.2,0.2,0.2))
  606. bprt2=part(3,model3,0,0,Color1,"bPart2",vt(0.2,0.2,0.2))
  607. bprt3=part(3,model3,0,0,Color2,"bPart3",vt(0.2,0.2,0.2))
  608. bprt4=part(3,model3,0.8,0,Color1,"bPart4",vt(0.2,0.2,0.2))
  609. bprt5=part(3,model3,0.8,0,Color1,"bPart5",vt(0.2,0.2,0.2))
  610. bprt6=part(3,model3,0.8,0,Color1,"bPart6",vt(0.2,0.2,0.2))
  611. bprt7=part(3,model3,0,1,Color1,"bPart7",vt(0.2,0.2,0.2))
  612. bprt8=part(3,model3,0,0,Color1,"bPart8",vt(0.2,0.2,0.2))
  613. bprt9=part(3,model3,0,0,Color2,"bPart9",vt(0.2,0.2,0.2))
  614. bprt10=part(3,model3,0.8,0,Color1,"bPart10",vt(0.2,0.2,0.2))
  615. bprt11=part(3,model3,0.8,0,Color1,"bPart11",vt(0.2,0.2,0.2))
  616. bprt12=part(3,model3,0.8,0,Color1,"bPart12",vt(0.2,0.2,0.2))
  617. bprt13=part(3,model3,0,1,Color1,"bPart13",vt(0.2,0.2,0.2))
  618. bprt14=part(3,model3,0,0,Color1,"bPart14",vt(0.2,0.2,0.2))
  619. bprt15=part(3,model3,0,0,Color2,"bPart15",vt(0.2,0.2,0.2))
  620. bprt16=part(3,model3,0.8,0,Color1,"bPart16",vt(0.2,0.2,0.2))
  621. bprt17=part(3,model3,0.8,0,Color1,"bPart17",vt(0.2,0.2,0.2))
  622. bprt18=part(3,model3,0.8,0,Color1,"bPart18",vt(0.2,0.2,0.2))
  623. for _,c in pairs(model3:children()) do
  624. table.insert(Blades,c)
  625. end
  626.  
  627. msh1=mesh("BlockMesh",rprt1,"","",vt(0,0,0),vt(1,1,1))
  628. msh2=mesh("BlockMesh",rprt2,"","",vt(0,0,0),vt(1.3,2.5,10))
  629. msh3=mesh("BlockMesh",rprt3,"","",vt(0,0,0),vt(1.49,2.5,5))
  630. msh4=mesh("BlockMesh",rprt4,"","",vt(0,0,0),vt(1.51,2.5,3))
  631. msh5=mesh("CylinderMesh",rprt5,"","",vt(0,0,0),vt(2.5,1,2.5))
  632. msh6=mesh("CylinderMesh",rprt6,"","",vt(0,0,0),vt(1.5,16,1.5))
  633. msh7=mesh("CylinderMesh",rprt7,"","",vt(0,0,0),vt(1.6,1,1.6))
  634. msh8=mesh("CylinderMesh",rprt8,"","",vt(0,0,0),vt(1.4,1.01,1.4))
  635. msh9=mesh("BlockMesh",rprt9,"","",vt(0,0,0),vt(1.4,14,2))
  636. msh10=mesh("SpecialMesh",rprt10,"Wedge","nil",vt(0,0,0),vt(1.3,4,3))
  637. msh11=mesh("SpecialMesh",rprt11,"Wedge","nil",vt(0,0,0),vt(1.3,2,3))
  638. msh12=mesh("SpecialMesh",rprt12,"Wedge","nil",vt(0,0,0),vt(1.7,3,3.5))
  639. msh13=mesh("BlockMesh",rprt13,"","",vt(0,0,0),vt(1.5,1.5,1.5))
  640. msh14=mesh("BlockMesh",rprt14,"","",vt(0,0,0),vt(1.6,4.5,2))
  641. msh15=mesh("BlockMesh",rprt15,"","",vt(0,0,0),vt(1.6,3.6,2))
  642. msh16=mesh("SpecialMesh",rprt16,"Wedge","nil",vt(0,0,0),vt(0.5,3,3.5))
  643. msh17=mesh("SpecialMesh",rprt17,"Wedge","nil",vt(0,0,0),vt(0.5,2,4))
  644. msh19=mesh("SpecialMesh",rprt19,"Sphere","nil",vt(0,0,0),vt(1.5,1.5,1.5))
  645. msh20=mesh("SpecialMesh",rprt20,"Wedge","nil",vt(0,0,0),vt(0.2,8,0.5))
  646. msh21=mesh("SpecialMesh",rprt21,"Wedge","nil",vt(0,0,0),vt(0.2,8,0.5))
  647. msh22=mesh("SpecialMesh",rprt22,"Wedge","nil",vt(0,0,0),vt(0.3,7,0.7))
  648. msh23=mesh("SpecialMesh",rprt23,"Wedge","nil",vt(0,0,0),vt(0.3,7,0.7))
  649. msh25=mesh("SpecialMesh",rprt25,"Sphere","nil",vt(0,0,0),vt(1.5,1.5,1.5))
  650. msh26=mesh("SpecialMesh",rprt26,"Wedge","nil",vt(0,0,0),vt(0.2,8,0.5))
  651. msh27=mesh("SpecialMesh",rprt27,"Wedge","nil",vt(0,0,0),vt(0.2,8,0.5))
  652. msh28=mesh("SpecialMesh",rprt28,"Wedge","nil",vt(0,0,0),vt(0.3,7,0.7))
  653. msh29=mesh("SpecialMesh",rprt29,"Wedge","nil",vt(0,0,0),vt(0.3,7,0.7))
  654. msh31=mesh("SpecialMesh",rprt31,"Sphere","nil",vt(0,0,0),vt(1.5,1.5,1.5))
  655. msh32=mesh("SpecialMesh",rprt32,"Wedge","nil",vt(0,0,0),vt(0.2,8,0.5))
  656. msh33=mesh("SpecialMesh",rprt33,"Wedge","nil",vt(0,0,0),vt(0.2,8,0.5))
  657. msh34=mesh("SpecialMesh",rprt34,"Wedge","nil",vt(0,0,0),vt(0.3,7,0.7))
  658. msh35=mesh("SpecialMesh",rprt35,"Wedge","nil",vt(0,0,0),vt(0.3,7,0.7))
  659. --
  660. msh1=mesh("BlockMesh",pprt1,"","",vt(0,0,0),vt(1,1,1))
  661. msh2=mesh("BlockMesh",pprt2,"","",vt(0,0,0),vt(2,1.3,5))
  662. msh3=mesh("SpecialMesh",pprt3,"Wedge","nil",vt(0,0,0),vt(2,2,1))
  663. msh4=mesh("BlockMesh",pprt4,"","",vt(0,0,0),vt(2,2,6))
  664. msh5=mesh("BlockMesh",pprt5,"","",vt(0,0,0),vt(2,2,2))
  665. msh6=mesh("CylinderMesh",pprt6,"","",vt(0,0,0),vt(2,5,2))
  666. msh7=mesh("CylinderMesh",pprt7,"","",vt(0,0,0),vt(2,5,2))
  667. msh8=mesh("CylinderMesh",pprt8,"","",vt(0,0,0),vt(2.1,1,2.1))
  668. msh9=mesh("CylinderMesh",pprt9,"","",vt(0,0,0),vt(2.1,1,2.1))
  669. msh10=mesh("CylinderMesh",pprt10,"","",vt(0,0,0),vt(1.9,1.01,1.9))
  670. msh11=mesh("CylinderMesh",pprt11,"","",vt(0,0,0),vt(1.9,1.01,1.9))
  671. msh12=mesh("CylinderMesh",pprt12,"","",vt(0,0,0),vt(2.2,5.5,2.2))
  672. msh13=mesh("SpecialMesh",pprt13,"Wedge","nil",vt(0,0,0),vt(1.7,3,3.5))
  673. msh14=mesh("BlockMesh",pprt14,"","",vt(0,0,0),vt(1.5,1.5,1.5))
  674. msh15=mesh("BlockMesh",pprt15,"","",vt(0,0,0),vt(1.6,4.5,2))
  675. msh16=mesh("BlockMesh",pprt16,"","",vt(0,0,0),vt(1.6,3.6,2))
  676. msh17=mesh("SpecialMesh",pprt17,"Wedge","nil",vt(0,0,0),vt(0.5,3,3.5))
  677. msh18=mesh("SpecialMesh",pprt18,"Wedge","nil",vt(0,0,0),vt(0.5,2,4))
  678. msh20=mesh("SpecialMesh",pprt20,"Sphere","nil",vt(0,0,0),vt(1.5,1.5,1.5))
  679. msh21=mesh("SpecialMesh",pprt21,"Wedge","nil",vt(0,0,0),vt(0.2,8,0.5))
  680. msh22=mesh("SpecialMesh",pprt22,"Wedge","nil",vt(0,0,0),vt(0.2,8,0.5))
  681. msh23=mesh("SpecialMesh",pprt23,"Wedge","nil",vt(0,0,0),vt(0.3,7,0.7))
  682. msh24=mesh("SpecialMesh",pprt24,"Wedge","nil",vt(0,0,0),vt(0.3,7,0.7))
  683. msh26=mesh("SpecialMesh",pprt26,"Sphere","nil",vt(0,0,0),vt(1.5,1.5,1.5))
  684. msh27=mesh("SpecialMesh",pprt27,"Wedge","nil",vt(0,0,0),vt(0.2,8,0.5))
  685. msh28=mesh("SpecialMesh",pprt28,"Wedge","nil",vt(0,0,0),vt(0.2,8,0.5))
  686. msh29=mesh("SpecialMesh",pprt29,"Wedge","nil",vt(0,0,0),vt(0.3,7,0.7))
  687. msh30=mesh("SpecialMesh",pprt30,"Wedge","nil",vt(0,0,0),vt(0.3,7,0.7))
  688. msh32=mesh("SpecialMesh",pprt32,"Sphere","nil",vt(0,0,0),vt(1.5,1.5,1.5))
  689. msh33=mesh("SpecialMesh",pprt33,"Wedge","nil",vt(0,0,0),vt(0.2,8,0.5))
  690. msh34=mesh("SpecialMesh",pprt34,"Wedge","nil",vt(0,0,0),vt(0.2,8,0.5))
  691. msh35=mesh("SpecialMesh",pprt35,"Wedge","nil",vt(0,0,0),vt(0.3,7,0.7))
  692. msh36=mesh("SpecialMesh",pprt36,"Wedge","nil",vt(0,0,0),vt(0.3,7,0.7))
  693. msh37=mesh("BlockMesh",pprt37,"","",vt(0,0,0),vt(1.51,2.5,3))
  694. msh38=mesh("SpecialMesh",pprt38,"Wedge","nil",vt(0,0,0),vt(1.3,4,3))
  695. msh39=mesh("SpecialMesh",pprt39,"Wedge","nil",vt(0,0,0),vt(1.3,2,3))
  696. --
  697. msh2=mesh("CylinderMesh",bprt2,"","",vt(0,0,0),vt(3,1,3))
  698. msh3=mesh("CylinderMesh",bprt3,"","",vt(0,0,0),vt(2.5,1.01,2.5))
  699. msh4=mesh("BlockMesh",bprt4,"","",vt(0,0,0),vt(7,0.5,1.5))
  700. msh5=mesh("SpecialMesh",bprt5,"Wedge","nil",vt(0,0,0),vt(0.5,1.5,10))
  701. msh6=mesh("SpecialMesh",bprt6,"Wedge","nil",vt(0,0,0),vt(0.3,3,4))
  702. msh8=mesh("CylinderMesh",bprt8,"","",vt(0,0,0),vt(3,1,3))
  703. msh9=mesh("CylinderMesh",bprt9,"","",vt(0,0,0),vt(2.5,1.01,2.5))
  704. msh10=mesh("BlockMesh",bprt10,"","",vt(0,0,0),vt(7,0.5,1.5))
  705. msh11=mesh("SpecialMesh",bprt11,"Wedge","nil",vt(0,0,0),vt(0.5,1.5,10))
  706. msh12=mesh("SpecialMesh",bprt12,"Wedge","nil",vt(0,0,0),vt(0.3,3,4))
  707. msh14=mesh("CylinderMesh",bprt14,"","",vt(0,0,0),vt(3,1,3))
  708. msh15=mesh("CylinderMesh",bprt15,"","",vt(0,0,0),vt(2.5,1.01,2.5))
  709. msh16=mesh("BlockMesh",bprt16,"","",vt(0,0,0),vt(7,0.5,1.5))
  710. msh17=mesh("SpecialMesh",bprt17,"Wedge","nil",vt(0,0,0),vt(0.5,1.5,10))
  711. msh18=mesh("SpecialMesh",bprt18,"Wedge","nil",vt(0,0,0),vt(0.3,3,4))
  712.  
  713. rwld1=weld(rprt1,rprt1,RootPart,euler(-0.2,0,0)*cf(3,-1,-0.2))
  714. --rwld1=weld(rprt1,rprt1,RootPart,euler(2.4,0,0)*cf(2,-2,-2))
  715. rwld2=weld(rprt1,rprt2,rprt1,euler(0,0,0)*cf(0,0,0))
  716. rwld3=weld(rprt1,rprt3,rprt2,euler(-0.3,0,0)*cf(0,0.05,-1))
  717. rwld4=weld(rprt1,rprt4,rprt2,euler(-0.5,0,0)*cf(0,0.1,-0.3))
  718. rwld5=weld(rprt1,rprt5,rprt4,euler(1.57+0.5,0,0)*cf(0,-0.2,0))
  719. rwld6=weld(rprt1,rprt6,rprt2,euler(1.57,0,0)*cf(0,-0.11,1.1))
  720. rwld7=weld(rprt1,rprt7,rprt6,euler(0,0,0)*cf(0,-1.6,0))
  721. rwld8=weld(rprt1,rprt8,rprt7,euler(0,0,0)*cf(0,0,0))
  722. rwld9=weld(rprt1,rprt9,rprt6,euler(0,0,0)*cf(0,-0.3,0.2))
  723. rwld10=weld(rprt1,rprt10,rprt9,euler(0,0,0)*cf(0,1.2,0.4))
  724. rwld11=weld(rprt1,rprt11,rprt10,euler(0,0,3.14)*cf(0,0.6,0))
  725. rwld12=weld(rprt1,rprt12,rprt5,euler(3.14,0,0)*cf(0,-0.2,-0.55))
  726. rwld13=weld(rprt1,rprt13,rprt12,euler(0.785,0,0)*cf(0,0.2,-0.4))
  727. rwld14=weld(rprt1,rprt14,rprt12,euler(0,0,0)*cf(0,-0.4,-0.2))
  728. rwld15=weld(rprt1,rprt15,rprt14,euler(-0.8,0,0)*cf(0,-0.55,-0.2))
  729. rwld16=weld(rprt1,rprt16,rprt14,euler(0,0,3.14)*cf(0,-0.15,0.5))
  730. rwld17=weld(rprt1,rprt17,rprt16,euler(0,0,3.14)*cf(0,0.5,-0.3))
  731. rwld18=weld(rprt1,rprt18,rprt2,euler(0,0,0)*cf(0.2,0,0)) --1
  732. rwld19=weld(rprt1,rprt19,rprt18,euler(0,0,0.5)*cf(0,0,0))
  733. rwld20=weld(rprt1,rprt20,rprt19,euler(3.14,3.14,0)*cf(0,0.8,0.05))
  734. rwld21=weld(rprt1,rprt21,rprt19,euler(3.14,0,0)*cf(0,0.8,-0.05))
  735. rwld22=weld(rprt1,rprt22,rprt20,euler(0,0,0)*cf(0,-0.5,0.02))
  736. rwld23=weld(rprt1,rprt23,rprt21,euler(0,0,0)*cf(0,-0.5,0.02))
  737. rwld24=weld(rprt1,rprt24,rprt2,euler(0,0,0)*cf(0.2,-0.1,-0.3)) --2
  738. rwld25=weld(rprt1,rprt25,rprt24,euler(0.3,0,0.6)*cf(0,0,0))
  739. rwld26=weld(rprt1,rprt26,rprt25,euler(3.14,3.14,0)*cf(0,0.8,0.05))
  740. rwld27=weld(rprt1,rprt27,rprt25,euler(3.14,0,0)*cf(0,0.8,-0.05))
  741. rwld28=weld(rprt1,rprt28,rprt26,euler(0,0,0)*cf(0,-0.5,0.02))
  742. rwld29=weld(rprt1,rprt29,rprt27,euler(0,0,0)*cf(0,-0.5,0.02))
  743. rwld30=weld(rprt1,rprt30,rprt2,euler(0,0,0)*cf(0.2,-0.2,-0.6)) --3
  744. rwld31=weld(rprt1,rprt31,rprt30,euler(0.6,0,0.7)*cf(0,0,0))
  745. rwld32=weld(rprt1,rprt32,rprt31,euler(3.14,3.14,0)*cf(0,0.8,0.05))
  746. rwld33=weld(rprt1,rprt33,rprt31,euler(3.14,0,0)*cf(0,0.8,-0.05))
  747. rwld34=weld(rprt1,rprt34,rprt32,euler(0,0,0)*cf(0,-0.5,0.02))
  748. rwld35=weld(rprt1,rprt35,rprt33,euler(0,0,0)*cf(0,-0.5,0.02))
  749. for _,c in pairs(rprt1:children()) do
  750. if c.className=="Motor" then
  751. table.insert(RailgunWelds,c)
  752. end
  753. end
  754. --
  755. pwld1=weld(pprt1,pprt1,RootPart,euler(-0.2,0,0)*cf(-3,-1,-0.2))
  756. --pwld1=weld(pprt1,pprt1,RootPart,euler(2.4,0,0)*cf(-2,-2,-2))
  757. pwld2=weld(pprt1,pprt2,pprt1,euler(0,0,0)*cf(0,0,0))
  758. pwld3=weld(pprt1,pprt3,pprt2,euler(0,3.14,0)*cf(0,-0.3,-0.4))
  759. pwld4=weld(pprt1,pprt4,pprt2,euler(0,0,0)*cf(0,-0.3,0.3))
  760. pwld5=weld(pprt1,pprt5,pprt4,euler(0,0,0)*cf(0,-0.3,0.2))
  761. pwld6=weld(pprt1,pprt6,pprt4,euler(1.57,0,0)*cf(0,-0.02,0.7))
  762. pwld7=weld(pprt1,pprt7,pprt4,euler(1.57,0,0)*cf(0,0.02,0.7))
  763. pwld8=weld(pprt1,pprt8,pprt6,euler(0,0,0)*cf(0,-0.5,0))
  764. pwld9=weld(pprt1,pprt9,pprt7,euler(0,0,0)*cf(0,-0.5,0))
  765. pwld10=weld(pprt1,pprt10,pprt8,euler(0,0,0)*cf(0,0,0))
  766. pwld11=weld(pprt1,pprt11,pprt9,euler(0,0,0)*cf(0,0,0))
  767. pwld12=weld(pprt1,pprt12,pprt4,euler(1.57,0,0)*cf(0,0.2,0.75))
  768. pwld13=weld(pprt1,pprt13,pprt5,euler(-1.57,0,0)*cf(0,-0.3,0))
  769. pwld14=weld(pprt1,pprt14,pprt13,euler(0.785,0,0)*cf(0,0.2,-0.4))
  770. pwld15=weld(pprt1,pprt15,pprt13,euler(0,0,0)*cf(0,-0.4,-0.2))
  771. pwld16=weld(pprt1,pprt16,pprt15,euler(-0.8,0,0)*cf(0,-0.55,-0.2))
  772. pwld17=weld(pprt1,pprt17,pprt15,euler(0,0,3.14)*cf(0,-0.15,0.5))
  773. pwld18=weld(pprt1,pprt18,pprt17,euler(0,0,3.14)*cf(0,0.5,-0.3))
  774. pwld19=weld(pprt1,pprt19,pprt2,euler(0,0,0)*cf(-0.2,-0.2,0.7)) --1
  775. pwld20=weld(pprt1,pprt20,pprt19,euler(0,0,-0.5)*cf(0,0,0))
  776. pwld21=weld(pprt1,pprt21,pprt20,euler(3.14,3.14,0)*cf(0,0.8,0.05))
  777. pwld22=weld(pprt1,pprt22,pprt20,euler(3.14,0,0)*cf(0,0.8,-0.05))
  778. pwld23=weld(pprt1,pprt23,pprt21,euler(0,0,0)*cf(0,-0.5,0.02))
  779. pwld24=weld(pprt1,pprt24,pprt22,euler(0,0,0)*cf(0,-0.5,0.02))
  780. pwld25=weld(pprt1,pprt25,pprt2,euler(0,0,0)*cf(-0.2,-0.3,0.4)) --2
  781. pwld26=weld(pprt1,pprt26,pprt25,euler(0.3,0,-0.6)*cf(0,0,0))
  782. pwld27=weld(pprt1,pprt27,pprt26,euler(3.14,3.14,0)*cf(0,0.8,0.05))
  783. pwld28=weld(pprt1,pprt28,pprt26,euler(3.14,0,0)*cf(0,0.8,-0.05))
  784. pwld29=weld(pprt1,pprt29,pprt27,euler(0,0,0)*cf(0,-0.5,0.02))
  785. pwld30=weld(pprt1,pprt30,pprt28,euler(0,0,0)*cf(0,-0.5,0.02))
  786. pwld31=weld(pprt1,pprt31,pprt2,euler(0,0,0)*cf(-0.2,-0.4,0.1)) --3
  787. pwld32=weld(pprt1,pprt32,pprt31,euler(0.6,0,-0.7)*cf(0,0,0))
  788. pwld33=weld(pprt1,pprt33,pprt32,euler(3.14,3.14,0)*cf(0,0.8,0.05))
  789. pwld34=weld(pprt1,pprt34,pprt32,euler(3.14,0,0)*cf(0,0.8,-0.05))
  790. pwld35=weld(pprt1,pprt35,pprt33,euler(0,0,0)*cf(0,-0.5,0.02))
  791. pwld36=weld(pprt1,pprt36,pprt34,euler(0,0,0)*cf(0,-0.5,0.02))
  792. pwld37=weld(pprt1,pprt37,pprt2,euler(-0.5,0,0)*cf(0,-0.05,-0.1))
  793. pwld38=weld(pprt1,pprt38,pprt37,euler(-1.57,3.14,0)*cf(0,0.2,0.15))
  794. pwld39=weld(pprt1,pprt339,pprt39,euler(0,0,3.14)*cf(0,0.6,0))
  795. for _,c in pairs(pprt1:children()) do
  796. if c.className=="Motor" then
  797. table.insert(PlasmaWelds,c)
  798. end
  799. end
  800. --
  801. brefwld=weld(bprt1,bref,RootPart,euler(0,0,0)*cf(0,-2,0))
  802. bwld1=weld(bprt1,bprt1,bref,euler(0,0,0)*cf(2,-0.6,-2)) --1
  803. bwld2=weld(bprt1,bprt2,bprt1,euler(3.14,-2,1.57-0.4)*cf(0,0,0))
  804. bwld3=weld(bprt1,bprt3,bprt2,euler(0,0,0)*cf(0,0,0))
  805. bwld4=weld(bprt1,bprt4,bprt2,euler(0,0,0)*cf(-0.8,0,0))
  806. bwld5=weld(bprt1,bprt5,bprt2,euler(-1.57,0,1.57)*cf(-0.8,0,-0.35))
  807. bwld6=weld(bprt1,bprt6,bprt4,euler(-1.57,0,1.57)*cf(-1.1,0,-0.15))
  808. bwld7=weld(bprt1,bprt7,bref,euler(0,0,0)*cf(0,-0.6,-2)) --2
  809. bwld8=weld(bprt1,bprt8,bprt7,euler(3.14,-2,1.57)*cf(0,0,0))
  810. bwld9=weld(bprt1,bprt9,bprt8,euler(0,0,0)*cf(0,0,0))
  811. bwld10=weld(bprt1,bprt10,bprt8,euler(0,0,0)*cf(-0.8,0,0))
  812. bwld11=weld(bprt1,bprt11,bprt8,euler(-1.57,0,1.57)*cf(-0.8,0,-0.35))
  813. bwld12=weld(bprt1,bprt12,bprt10,euler(-1.57,0,1.57)*cf(-1.1,0,-0.15))
  814. bwld13=weld(bprt1,bprt13,bref,euler(0,0,0)*cf(-2,-0.6,-2)) --3
  815. bwld14=weld(bprt1,bprt14,bprt13,euler(3.14,-2,1.57+0.4)*cf(0,0,0))
  816. bwld15=weld(bprt1,bprt15,bprt14,euler(0,0,0)*cf(0,0,0))
  817. bwld16=weld(bprt1,bprt16,bprt14,euler(0,0,0)*cf(-0.8,0,0))
  818. bwld17=weld(bprt1,bprt17,bprt14,euler(-1.57,0,1.57)*cf(-0.8,0,-0.35))
  819. bwld18=weld(bprt1,bprt18,bprt16,euler(-1.57,0,1.57)*cf(-1.1,0,-0.15))
  820. for _,c in pairs(bprt1:children()) do
  821. if c.className=="Motor" then
  822. table.insert(BladesWelds,c)
  823. end
  824. end
  825.  
  826. local hitbox=part(3,modelzorz,0,1,BrickColor.new("Black"),"Hitbox2",vt(0.2,0.2,0.2))
  827. hitbox.Anchored=false
  828. local hbwld=weld(hitbox,hitbox,RootPart,euler(0,0,0)*cf(0,0,0))
  829. local hitbox2=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
  830. hitbox2.Anchored=true
  831. local hitboxCF=cf(0,0,0)
  832. local hitboxb1=part(3,nil,0,1,BrickColor.new("Black"),"Hitboxb",vt(1,1,1))
  833. hitboxb1.Anchored=false
  834. local hitboxb2=part(3,nil,0,1,BrickColor.new("Black"),"Hitboxb",vt(1,1,1))
  835. hitboxb2.Anchored=false
  836. local hitboxb3=part(3,nil,0,1,BrickColor.new("Black"),"Hitboxb",vt(1,1,1))
  837. hitboxb3.Anchored=false
  838.  
  839. hboxpos=Instance.new("BodyPosition",nil)
  840. hboxpos.P=2000
  841. hboxpos.D=100
  842. hboxpos.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  843.  
  844. function hitboxweld()
  845. hbwld.Parent=modelzorz
  846. hbwld.Part0=hitbox
  847. hbwld.Part1=handle
  848. end
  849.  
  850. if (script.Parent.className~="HopperBin") then
  851. Tool=Instance.new("HopperBin")
  852. Tool.Parent=Backpack
  853. Tool.Name="Gear Gauntlet"
  854. script.Parent=Tool
  855. end
  856. Bin=script.Parent
  857. if Bin.Name=="Mechanic" then
  858. Bin.Name="Gear Gauntlet"
  859. end
  860.  
  861. local bodvel=Instance.new("BodyVelocity")
  862. local bg=Instance.new("BodyGyro")
  863.  
  864. so = function(id,par,vol,pit)
  865. local sou = Instance.new("Sound",par or workspace)
  866. sou.Volume=vol
  867. sou.Pitch=pit or 1
  868. sou.SoundId="http://www.roblox.com/asset/?id="..id
  869. coroutine.resume(coroutine.create(function(Sound)
  870. fwait()
  871. Sound:play()
  872. end),sou)
  873. game:GetService("Debris"):AddItem(sou,6)
  874. end
  875.  
  876. function clerp(a,b,t)
  877. local qa = {QuaternionFromCFrame(a)}
  878. local qb = {QuaternionFromCFrame(b)}
  879. local ax, ay, az = a.x, a.y, a.z
  880. local bx, by, bz = b.x, b.y, b.z
  881. local _t = 1-t
  882. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  883. end
  884.  
  885. function QuaternionFromCFrame(cf)
  886. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  887. local trace = m00 + m11 + m22
  888. if trace > 0 then
  889. local s = math.sqrt(1 + trace)
  890. local recip = 0.5/s
  891. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  892. else
  893. local i = 0
  894. if m11 > m00 then
  895. i = 1
  896. end
  897. if m22 > (i == 0 and m00 or m11) then
  898. i = 2
  899. end
  900. if i == 0 then
  901. local s = math.sqrt(m00-m11-m22+1)
  902. local recip = 0.5/s
  903. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  904. elseif i == 1 then
  905. local s = math.sqrt(m11-m22-m00+1)
  906. local recip = 0.5/s
  907. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  908. elseif i == 2 then
  909. local s = math.sqrt(m22-m00-m11+1)
  910. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  911. end
  912. end
  913. end
  914.  
  915. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  916. local xs, ys, zs = x + x, y + y, z + z
  917. local wx, wy, wz = w*xs, w*ys, w*zs
  918. local xx = x*xs
  919. local xy = x*ys
  920. local xz = x*zs
  921. local yy = y*ys
  922. local yz = y*zs
  923. local zz = z*zs
  924. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  925. end
  926.  
  927. function QuaternionSlerp(a, b, t)
  928. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  929. local startInterp, finishInterp;
  930. if cosTheta >= 0.0001 then
  931. if (1 - cosTheta) > 0.0001 then
  932. local theta = math.acos(cosTheta)
  933. local invSinTheta = 1/math.sin(theta)
  934. startInterp = math.sin((1-t)*theta)*invSinTheta
  935. finishInterp = math.sin(t*theta)*invSinTheta
  936. else
  937. startInterp = 1-t
  938. finishInterp = t
  939. end
  940. else
  941. if (1+cosTheta) > 0.0001 then
  942. local theta = math.acos(-cosTheta)
  943. local invSinTheta = 1/math.sin(theta)
  944. startInterp = math.sin((t-1)*theta)*invSinTheta
  945. finishInterp = math.sin(t*theta)*invSinTheta
  946. else
  947. startInterp = t-1
  948. finishInterp = t
  949. end
  950. end
  951. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  952. end
  953.  
  954. function hideanim()
  955. equipped=false
  956. for i=0,1,0.1 do
  957. fwait()
  958. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.4)
  959. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
  960. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0),.4)
  961. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  962. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.4)
  963. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  964. RH.C0=clerp(RH.C0,RHC0,.4)
  965. LH.C0=clerp(LH.C0,LHC0,.4)
  966. end
  967. mdec2.Parent=nil
  968. mdec.Parent=Decrease
  969. end
  970.  
  971. mdec.Parent=Decrease
  972. function equipanim()
  973. equipped=true
  974. mdec.Parent=nil
  975. mdec2.Parent=Decrease
  976. end
  977.  
  978. function StaggerAnim()
  979. attack=true
  980. removeControl()
  981. for i=1,math.random(2,4) do
  982. ClangEffect(BrickColor.new("New Yeller"),cf(hitbox.Position)*euler(math.random(-50,50)/100,math.random(-50,50),math.random(-50,50)/100),0,.1,.2,math.random(150,300)/1000)
  983. end
  984. for i=0,1,0.35 do
  985. fwait()
  986. if Rooted.Value==false then Torso.Velocity=RootPart.CFrame.lookVector*-40 end
  987. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5)*euler(.1,0,0),.3)
  988. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,-.4),.3)
  989. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.7)*euler(0,-.7,0),.3)
  990. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  991. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4)*euler(0,.4,0),.3)
  992. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  993. RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.5,0,.6),.3)
  994. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.2,.2),.3)
  995. end
  996. for i=0,1,0.2 do
  997. fwait()
  998. if Rooted.Value==false then Torso.Velocity=RootPart.CFrame.lookVector*-40 end
  999. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5)*euler(.1,0,0),.4)
  1000. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(-.5,0,-.4),.4)
  1001. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.7)*euler(0,-.7,0),.4)
  1002. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1003. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4)*euler(0,.4,0),.4)
  1004. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1005. RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.5,0,.6),.4)
  1006. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.2,.5),.4)
  1007. end
  1008. for i=0,1,0.1 do
  1009. fwait()
  1010. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.4)*euler(.5,0,0),.3)
  1011. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.8)*euler(-.2,0,-.4),.3)
  1012. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,.8)*euler(0,-.4,0),.3)
  1013. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1014. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-.2)*euler(0,.4,0),.3)
  1015. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1016. RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.5,0,1.2),.3)
  1017. LH.C0=clerp(LH.C0,cf(-1,0,-1)*euler(0,-1.57,0)*euler(0,.2,.2),.3)
  1018. end
  1019. for i=1,40 do
  1020. fwait()
  1021. if Stun.Value>=StunT.Value then
  1022. break
  1023. end
  1024. end
  1025. resumeControl()
  1026. combo=0
  1027. attack=false
  1028. end
  1029.  
  1030. function StaggerHitt()
  1031. attack=true
  1032. for i=1,math.random(2,4) do
  1033. ClangEffect(BrickColor.new("New Yeller"),cf(hitbox.Position)*euler(math.random(-50,50)/100,math.random(-50,50),math.random(-50,50)/100),0,.1,.2,math.random(150,300)/1000)
  1034. end
  1035. for i=0,1,0.1 do
  1036. fwait()
  1037. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(.1,0,0),.3)
  1038. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,0),.3)
  1039. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.9),.3)
  1040. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1041. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.6),.3)
  1042. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1043. RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.2,0,-.4),.3)
  1044. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.2,.2),.3)
  1045. end
  1046. attack=false
  1047. end
  1048.  
  1049. function StunAnim()
  1050. attack=true
  1051. removeControl()
  1052. Stunned.Value=true
  1053. showDamage(Character,"Stunned","Interrupt")
  1054. local dec=Instance.new("NumberValue",Decrease)
  1055. dec.Name="DecreaseMvmt"
  1056. dec.Value=10
  1057. for i=0,1,0.3 do
  1058. fwait()
  1059. Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,-.5),.2)
  1060. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.2,0,-3),.2)
  1061. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1.3),.2)
  1062. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1063. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1,0,.4)*euler(0,-.1,0),.2)
  1064. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1065. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.3),.25)
  1066. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.2,0,0),.25)
  1067. end
  1068. for i=0,1,0.3 do
  1069. fwait()
  1070. Neck.C0=clerp(Neck.C0,necko*euler(-.3,0,-.5),.2)
  1071. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.5)*euler(.8,0,-3),.2)
  1072. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
  1073. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1074. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1.2,0,.8)*euler(0,-.1,0),.2)
  1075. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1076. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.6),.25)
  1077. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(.1,0,.7),.25)
  1078. end
  1079. for i=0,1,0.3 do
  1080. fwait()
  1081. Neck.C0=clerp(Neck.C0,necko*euler(-.3,0,-1),.2)
  1082. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2)*euler(1.57,0,-3),.2)
  1083. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
  1084. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1085. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8)*euler(0,-.1,0),.2)
  1086. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1087. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.2,0,.6),.25)
  1088. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.1,0,.3),.25)
  1089. end
  1090. local gairost=Instance.new("BodyGyro")
  1091. gairost.Parent=RootPart
  1092. gairost.maxTorque=Vector3.new(2000,0,2000)
  1093. gairost.P=2000
  1094. gairost.cframe=cf(0,0,0)
  1095. for i=0,1,0.1 do
  1096. fwait()
  1097. if hitfloor~=nil then
  1098. Torso.Velocity=vt(0,0,0)
  1099. end
  1100. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.57),.3)
  1101. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2.5)*euler(1.57,0,-3.14),.3)
  1102. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1.5)*euler(.2,0,0),.3)
  1103. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1104. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.5,0,-1.57)*euler(0,0,0),.3)
  1105. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1106. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(-.3,.5,0),.3)
  1107. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(-.1,.2,0),.3)
  1108. end
  1109. for i=1,70 do
  1110. fwait()
  1111. gairost.cframe=RootPart.CFrame
  1112. if hitfloor~=nil then
  1113. Torso.Velocity=vt(0,0,0)
  1114. end
  1115. end
  1116. for i=0,1,0.2 do
  1117. fwait()
  1118. Stun.Value=0
  1119. gairost.cframe=RootPart.CFrame
  1120. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0),.3)
  1121. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2)*euler(1,0,-4),.3)
  1122. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1)*euler(.2,-1,0),.3)
  1123. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1124. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,.2)*euler(0,0,0),.3)
  1125. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1126. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(-.3,.5,.4),.3)
  1127. LH.C0=clerp(LH.C0,cf(-1,-1,-1)*euler(0,-1.57,0)*euler(-.1,.2,1),.3)
  1128. end
  1129. resumeControl()
  1130. gairost.Parent=nil
  1131. dec.Parent=nil
  1132. Stun.Value=0
  1133. combo=0
  1134. Stunned.Value=false
  1135. attack=false
  1136. for i=1,10 do
  1137. fwait()
  1138. Stun.Value=0
  1139. end
  1140. end
  1141.  
  1142. function attackone()
  1143. attack=true
  1144. for i=0,1,0.12 do
  1145. fwait()
  1146. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,1)*euler(0,0,0),.3)
  1147. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,-1),.3)
  1148. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.4,0,-1),.3)
  1149. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1150. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.6,0,-1)*euler(0,0,0),.3)
  1151. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1152. RH.C0=clerp(RH.C0,cf(.8,-1,-.4)*euler(0,1.57,0)*euler(0,1,-.1),.4)
  1153. LH.C0=clerp(LH.C0,cf(-.8,-.9,.4)*euler(0,-1.57,0)*euler(0,1,.1),.4)
  1154. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1155. break
  1156. end
  1157. end
  1158. so("199145095",handle,1,1.1)
  1159. --con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,6,7,math.random(5,10),"Normal",RootPart,.5,1,math.random(4,8),nil,true) end)
  1160. hbwld.Parent=nil
  1161. hboxpos.Parent=hitbox
  1162. hitbox.Parent=modelzorz
  1163. hitbox.Size=vt(2,3,2)
  1164. hitboxCF=handle.CFrame
  1165. hitbox.CFrame=hitboxCF
  1166. for i=0,1,0.35 do
  1167. fwait()
  1168. hitboxCF=handle.CFrame
  1169. hitbox.CFrame=hitboxCF
  1170. MagniDamage(hitbox,3,6,7,math.random(5,10),"Normal",RootPart,.5,1,math.random(4,8),nil,true)
  1171. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,-1.57)*euler(0,0,0),.4)
  1172. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,1.57),.4)
  1173. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.8,0,1.2),.4)
  1174. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1175. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.4,0,-.1),.4)
  1176. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1177. RH.C0=clerp(RH.C0,cf(.6,-1,.4)*euler(0,1.57,0)*euler(.2,-1.57,0),.3)
  1178. LH.C0=clerp(LH.C0,cf(-.6,-1,-.4)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.3)
  1179. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1180. break
  1181. end
  1182. end
  1183. for i=0,1,0.1 do
  1184. fwait()
  1185. hitboxCF=handle.CFrame
  1186. hitbox.CFrame=hitboxCF
  1187. MagniDamage(hitbox,3,6,7,math.random(5,10),"Normal",RootPart,.5,1,math.random(4,8),nil,true)
  1188. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,-1.57)*euler(0,0,0),.4)
  1189. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,1.57),.4)
  1190. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,0)*euler(-.5,0,.5),.4)
  1191. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1192. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.4,0,-.1),.4)
  1193. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1194. RH.C0=clerp(RH.C0,cf(.6,-1,.4)*euler(0,1.57,0)*euler(.2,-1.57,0),.3)
  1195. LH.C0=clerp(LH.C0,cf(-.6,-1,-.4)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.3)
  1196. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1197. break
  1198. end
  1199. end
  1200. --con1:disconnect()
  1201. hitbox.Parent=modelzorz
  1202. hitbox.Size=vt()
  1203. hitboxweld()
  1204. hboxpos.Parent=nil
  1205. attack=false
  1206. end
  1207.  
  1208. function attacktwo()
  1209. attack=true
  1210. for i=0,1,0.2 do
  1211. fwait()
  1212. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.3),.4)
  1213. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1.3),.4)
  1214. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,1.3),.4)
  1215. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1216. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(0,-2.5,-1.57),.4)
  1217. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1218. RH.C0=clerp(RH.C0,cf(.8,-1,-.4)*euler(0,1.57,0)*euler(0,1.3,-.1),.4)
  1219. LH.C0=clerp(LH.C0,cf(-.8,-.9,.4)*euler(0,-1.57,0)*euler(0,1.3,.1),.4)
  1220. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1221. break
  1222. end
  1223. end
  1224. so("199145146",handle,1,1.3)
  1225. --con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,6,7,math.random(5,10),"Normal",RootPart,.5,2,math.random(4,8),nil,true) end)
  1226. hbwld.Parent=nil
  1227. hboxpos.Parent=hitbox
  1228. hitbox.Parent=modelzorz
  1229. hitbox.Size=vt(2,3,2)
  1230. hitboxCF=handle.CFrame
  1231. hitbox.CFrame=hitboxCF
  1232. for i=0,1,0.3 do
  1233. fwait()
  1234. hitboxCF=handle.CFrame
  1235. hitbox.CFrame=hitboxCF
  1236. MagniDamage(hitbox,3,6,7,math.random(5,10),"Normal",RootPart,.5,1,math.random(4,8),nil,true)
  1237. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.5)*euler(.1,0,0),.4)
  1238. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1.6),.4)
  1239. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,1,1.3)*euler(0,-1.57,0),.4)
  1240. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1241. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.4)
  1242. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1243. RH.C0=clerp(RH.C0,cf(.6,-1,.4)*euler(0,1.57,0)*euler(.2,-1.57,0),.3)
  1244. LH.C0=clerp(LH.C0,cf(-.6,-1,-.4)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.3)
  1245. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1246. break
  1247. end
  1248. end
  1249. for i=0,1,0.15 do
  1250. fwait()
  1251. hitboxCF=handle.CFrame
  1252. hitbox.CFrame=hitboxCF
  1253. MagniDamage(hitbox,3,6,7,math.random(5,10),"Normal",RootPart,.5,1,math.random(4,8),nil,true)
  1254. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.5)*euler(.2,0,0),.3)
  1255. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1.6),.3)
  1256. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,1,1.3)*euler(0,-1.57,0),.3)
  1257. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1258. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
  1259. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1260. RH.C0=clerp(RH.C0,cf(.6,-1,.4)*euler(0,1.57,0)*euler(.2,-1.57,0),.3)
  1261. LH.C0=clerp(LH.C0,cf(-.6,-1,-.4)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.3)
  1262. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1263. break
  1264. end
  1265. end
  1266. --con1:disconnect()
  1267. hitbox.Parent=modelzorz
  1268. hitbox.Size=vt()
  1269. hitboxweld()
  1270. hboxpos.Parent=nil
  1271. attack=false
  1272. end
  1273.  
  1274. function attackthree()
  1275. attack=true
  1276. for i=0,1,0.2 do
  1277. fwait()
  1278. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.2)*euler(.2,0,0),.3)
  1279. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1.2),.3)
  1280. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(0,2.5,1.5)*euler(0,-1.57,0),.3)
  1281. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1282. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
  1283. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1284. RH.C0=clerp(RH.C0,cf(.6,-1,.4)*euler(0,1.57,0)*euler(.2,-1.2,0),.3)
  1285. LH.C0=clerp(LH.C0,cf(-.6,-1,-.4)*euler(0,-1.57,0)*euler(-.4,-1.2,0),.3)
  1286. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1287. break
  1288. end
  1289. end
  1290. so("199145204",handle,1,1.2)
  1291. --con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,6,7,math.random(5,10),"Normal",RootPart,.5,1,math.random(4,8),nil,true) end)
  1292. hbwld.Parent=nil
  1293. hboxpos.Parent=hitbox
  1294. hitbox.Parent=modelzorz
  1295. hitbox.Size=vt(2,3,2)
  1296. hitboxCF=handle.CFrame
  1297. hitbox.CFrame=hitboxCF
  1298. for i=0,1,0.1 do
  1299. fwait()
  1300. hitboxCF=handle.CFrame
  1301. hitbox.CFrame=hitboxCF
  1302. MagniDamage(hitbox,3,6,7,math.random(5,10),"Normal",RootPart,.5,1,math.random(4,8),nil,true)
  1303. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.2)*euler(0,0,0),.4)
  1304. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.2),.4)
  1305. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.2)*euler(0,-1.57,0),.4)
  1306. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1307. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.5,0,-1.4),.4)
  1308. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1309. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,0),.4)
  1310. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,0),.4)
  1311. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1312. break
  1313. end
  1314. end
  1315. --con1:disconnect()
  1316. hitbox.Parent=modelzorz
  1317. hitbox.Size=vt()
  1318. hitboxweld()
  1319. hboxpos.Parent=nil
  1320. attack=false
  1321. end
  1322.  
  1323. function attackfour()
  1324. attack=true
  1325. for i=0,1,0.15 do
  1326. fwait()
  1327. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1)*euler(0,0,0),.4)
  1328. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,-1),.4)
  1329. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.57,0,-1.2),.4)
  1330. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1331. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1,0,-.1),.4)
  1332. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1333. RH.C0=clerp(RH.C0,cf(.8,-1,-.4)*euler(0,1.57,0)*euler(0,1,-.1),.4)
  1334. LH.C0=clerp(LH.C0,cf(-.8,-.9,.4)*euler(0,-1.57,0)*euler(0,1,.1),.4)
  1335. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1336. break
  1337. end
  1338. end
  1339. so("200632211",handle,1,.8)
  1340. --con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,6,7,math.random(5,10),"Normal",RootPart,.5,1,math.random(4,8),nil,true) end)
  1341. hbwld.Parent=nil
  1342. hboxpos.Parent=hitbox
  1343. hitbox.Parent=modelzorz
  1344. hitbox.Size=vt(2,3,2)
  1345. hitboxCF=handle.CFrame
  1346. hitbox.CFrame=hitboxCF
  1347. for i=0,1,0.1 do
  1348. fwait()
  1349. hitboxCF=handle.CFrame
  1350. hitbox.CFrame=hitboxCF
  1351. MagniDamage(hitbox,3,6,7,math.random(5,10),"Normal",RootPart,.5,1,math.random(4,8),nil,true)
  1352. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.57)*euler(0,0,0),.3)
  1353. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,1.57),.3)
  1354. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,1.57)*euler(0,1.57,0),.3)
  1355. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1356. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.5,0,-1),.3)
  1357. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1358. RH.C0=clerp(RH.C0,cf(.6,-1,.4)*euler(0,1.57,0)*euler(.2,-1.57,0),.2)
  1359. LH.C0=clerp(LH.C0,cf(-.6,-1,-.4)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.2)
  1360. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1361. break
  1362. end
  1363. end
  1364. --con1:disconnect()
  1365. hitbox.Parent=modelzorz
  1366. hitbox.Size=vt()
  1367. hitboxweld()
  1368. hboxpos.Parent=nil
  1369. attack=false
  1370. end
  1371.  
  1372. function ShootRailGun()
  1373. if railgunattack==true then return end
  1374. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  1375. ref.Anchored=true
  1376. ref.CFrame=cf(rprt8.Position)
  1377. game:GetService("Debris"):AddItem(ref,1)
  1378. so("169380505",ref,.5,1)
  1379. local MouseLook=cf((rprt8.Position+MMouse.Hit.p)/2,MMouse.Hit.p)
  1380. local hit,pos = rayCast(rprt8.Position,MouseLook.lookVector,999,RailgunTarget.Parent)
  1381. local mag=(rprt8.Position-pos).magnitude
  1382. MagicCylinder(Color2,CFrame.new((rprt8.Position+pos)/2,pos)*angles(1.57,0,0),1,mag*5,1,1.2,0,1.2,0.1)
  1383. if hit~=nil then
  1384. ref=part(3,workspace,0,1,Color2,"Reference",vt())
  1385. ref.Anchored=true
  1386. ref.CFrame=cf(pos)
  1387. game:GetService("Debris"):AddItem(ref,1)
  1388. so("153092334",ref,.5,1.5)
  1389. so("169380505",ref,.5,1.5)
  1390. MagicCircle(Color2,cf(pos),10,10,10,1,1,1,0.07)
  1391. Damagefunc(hit,6,8,0,"Normal",RootPart,0,2,math.random(1,5),false,false,true,"Movement",.05,100)
  1392.  
  1393. end
  1394. coroutine.resume(coroutine.create(function()
  1395. railgunattack=true
  1396. for i=0,1,0.2 do
  1397. fwait()
  1398. rwld2.C1=clerp(rwld2.C1,cf(0,0,-1),.5)
  1399. end
  1400. for i=0,1,0.1 do
  1401. fwait()
  1402. rwld2.C1=clerp(rwld2.C1,cf(0,0,0),.4)
  1403. end
  1404. railgunattack=false
  1405. end))
  1406. end
  1407.  
  1408. function ShootCannon()
  1409. if cannonattack==true then return end
  1410. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  1411. ref.Anchored=true
  1412. ref.CFrame=cf(pprt8.Position)
  1413. game:GetService("Debris"):AddItem(ref,1)
  1414. so("169380505",ref,.5,1)
  1415. table.insert(Effects,{pprt8.Position,"Shoot",30,MMouse.Hit.p})
  1416. coroutine.resume(coroutine.create(function()
  1417. cannonattack=true
  1418. for i=0,1,0.05 do
  1419. fwait()
  1420. pwld2.C1=clerp(pwld2.C1,cf(0,0,-1.5),.5)
  1421. end
  1422. for i=0,1,0.05 do
  1423. fwait()
  1424. pwld2.C1=clerp(pwld2.C1,cf(0,0,0),.3)
  1425. end
  1426. cannonattack=false
  1427. end))
  1428. end
  1429.  
  1430. function bladesattackone()
  1431. while tribladesattack==true do
  1432. fwait()
  1433. end
  1434. tribladesattack=true
  1435. for i=0,1,0.2 do
  1436. fwait()
  1437. brefwld.C0=clerp(brefwld.C0,euler(0,0,0)*cf(0,-2.5,2),.4)
  1438. bwld1.C0=clerp(bwld1.C0,euler(0,0,0)*cf(3,-0.6,-2),.4)
  1439. bwld7.C0=clerp(bwld7.C0,euler(0,0,0)*cf(0,-0.6,-2),.4)
  1440. bwld13.C0=clerp(bwld13.C0,euler(0,0,0)*cf(-3,-0.6,-2),.4)
  1441. bwld2.C0=clerp(bwld2.C0,euler(3.14,-1.5,1)*cf(0,0,0),.4)
  1442. bwld8.C0=clerp(bwld8.C0,euler(3.14,-1.5,1.57)*cf(0,0,0),.4)
  1443. bwld14.C0=clerp(bwld14.C0,euler(3.14,-1.5,2)*cf(0,0,0),.4)
  1444. end
  1445. so("161006195",bprt1,.6,math.random(100,200)/100)
  1446. so("161006195",bprt7,.6,math.random(100,200)/100)
  1447. so("161006195",bprt13,.6,math.random(100,200)/100)
  1448. hitboxb1.Parent=Character
  1449. hitboxb1.Size=vt(1,2,1)
  1450. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1451. hitboxb1.Transparency=1
  1452. hitboxb2.Parent=Character
  1453. hitboxb2.Size=vt(1,2,1)
  1454. hitboxb2.CFrame=bprt10.CFrame*euler(0,0,1.57)
  1455. hitboxb3.Parent=Character
  1456. hitboxb3.Size=vt(1,2,1)
  1457. hitboxb3.CFrame=bprt16.CFrame*euler(0,0,1.57)
  1458. for i=0,1,0.3 do
  1459. fwait()
  1460. brefwld.C0=clerp(brefwld.C0,euler(1.57,0,0)*cf(0,1.5,3),i)
  1461. bwld2.C0=clerp(bwld2.C0,euler(3.14,-1.5,1.57)*cf(0,0,0),i)
  1462. bwld8.C0=clerp(bwld8.C0,euler(3.14,-1.5,1.57)*cf(0,0,0),i)
  1463. bwld14.C0=clerp(bwld14.C0,euler(3.14,-1.5,1.57)*cf(0,0,0),i)
  1464. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1465. hitboxb2.CFrame=bprt10.CFrame
  1466. hitboxb3.CFrame=bprt16.CFrame
  1467. MagniDamage(hitboxb1,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1468. MagniDamage(hitboxb2,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1469. MagniDamage(hitboxb3,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1470. end
  1471. for i=0,1,0.2 do
  1472. fwait()
  1473. brefwld.C0=clerp(brefwld.C0,euler(1.7,0,0)*cf(0,2,3),.4)
  1474. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1475. hitboxb2.CFrame=bprt10.CFrame
  1476. hitboxb3.CFrame=bprt16.CFrame
  1477. MagniDamage(hitboxb1,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1478. MagniDamage(hitboxb2,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1479. MagniDamage(hitboxb3,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1480. end
  1481. hitboxb1.Parent=nil
  1482. hitboxb2.Parent=nil
  1483. hitboxb3.Parent=nil
  1484. tribladesattack=false
  1485. end
  1486.  
  1487. function bladesattacktwo()
  1488. while tribladesattack==true do
  1489. fwait()
  1490. end
  1491. tribladesattack=true
  1492. for i=0,1,0.2 do
  1493. fwait()
  1494. brefwld.C0=clerp(brefwld.C0,euler(0,-1,0)*cf(6,1,3),.4)
  1495. bwld1.C0=clerp(bwld1.C0,euler(0,-0.5,0)*cf(2,-0.6,-2),.4)
  1496. bwld7.C0=clerp(bwld7.C0,euler(0,0,0)*cf(0,-0.6,-2),.4)
  1497. bwld13.C0=clerp(bwld13.C0,euler(0,0.5,0)*cf(-2,-0.6,-2),.4)
  1498. bwld2.C0=clerp(bwld2.C0,euler(4.71,-1.57,1.57)*cf(0,0,0),.4)
  1499. bwld8.C0=clerp(bwld8.C0,euler(4.71,-1.57,1.57)*cf(0,0,0),.4)
  1500. bwld14.C0=clerp(bwld14.C0,euler(4.71,-1.57,1.57)*cf(0,0,0),.4)
  1501. end
  1502. --BladesDamage(math.random(80,150)/100)
  1503. so("161006195",bprt1,.6,math.random(80,150)/100)
  1504. so("161006195",bprt7,.6,math.random(80,150)/100)
  1505. so("161006195",bprt13,.6,math.random(80,150)/100)
  1506. hitboxb1.Parent=Character
  1507. hitboxb1.Size=vt(1,2,1)
  1508. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1509. hitboxb1.Transparency=1
  1510. hitboxb2.Parent=Character
  1511. hitboxb2.Size=vt(1,2,1)
  1512. hitboxb2.CFrame=bprt10.CFrame*euler(0,0,1.57)
  1513. hitboxb3.Parent=Character
  1514. hitboxb3.Size=vt(1,2,1)
  1515. hitboxb3.CFrame=bprt16.CFrame*euler(0,0,1.57)
  1516. for i=0,1,0.4 do
  1517. fwait()
  1518. brefwld.C0=clerp(brefwld.C0,euler(0,1,0)*cf(-6,1,3),i)
  1519. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1520. hitboxb2.CFrame=bprt10.CFrame
  1521. hitboxb3.CFrame=bprt16.CFrame
  1522. MagniDamage(hitboxb1,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1523. MagniDamage(hitboxb2,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1524. MagniDamage(hitboxb3,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1525. end
  1526. for i=0,1,0.2 do
  1527. fwait()
  1528. brefwld.C0=clerp(brefwld.C0,euler(0,1.7,0)*cf(-6,1,-1),.4)
  1529. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1530. hitboxb2.CFrame=bprt10.CFrame
  1531. hitboxb3.CFrame=bprt16.CFrame
  1532. MagniDamage(hitboxb1,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1533. MagniDamage(hitboxb2,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1534. MagniDamage(hitboxb3,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1535. end
  1536. hitboxb1.Parent=nil
  1537. hitboxb2.Parent=nil
  1538. hitboxb3.Parent=nil
  1539. tribladesattack=false
  1540. end
  1541.  
  1542. function bladesattackthree()
  1543. while tribladesattack==true do
  1544. fwait()
  1545. end
  1546. tribladesattack=true
  1547. for i=0,1,0.3 do
  1548. fwait()
  1549. bwld1.C0=clerp(bwld1.C0,cf(0,-4,-2)*euler(0,0,2.09),.4)
  1550. bwld7.C0=clerp(bwld7.C0,cf(0,-4,-2)*euler(0,0,2.09*2),.4)
  1551. bwld13.C0=clerp(bwld13.C0,cf(0,-4,-2)*euler(0,0,2.09*3),.4)
  1552. bwld2.C0=clerp(bwld2.C0,euler(3.14,-1.3,1.57)*cf(0,0,0),.4)
  1553. bwld8.C0=clerp(bwld8.C0,euler(3.14,-1.3,1.57)*cf(0,0,0),.4)
  1554. bwld14.C0=clerp(bwld14.C0,euler(3.14,-1.3,1.57)*cf(0,0,0),.4)
  1555. brefwld.C0=clerp(brefwld.C0,euler(0,0,0)*cf(0,0,-2),.4)
  1556. end
  1557. --BladesDamage(math.random(100,200)/100)
  1558. so("161006195",bprt1,.6,math.random(100,200)/100)
  1559. so("161006195",bprt7,.6,math.random(100,200)/100)
  1560. so("161006195",bprt13,.6,math.random(100,200)/100)
  1561. hitboxb1.Parent=Character
  1562. hitboxb1.Size=vt(1,2,1)
  1563. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1564. hitboxb1.Transparency=1
  1565. hitboxb2.Parent=Character
  1566. hitboxb2.Size=vt(1,2,1)
  1567. hitboxb2.CFrame=bprt10.CFrame*euler(0,0,1.57)
  1568. hitboxb3.Parent=Character
  1569. hitboxb3.Size=vt(1,2,1)
  1570. hitboxb3.CFrame=bprt16.CFrame*euler(0,0,1.57)
  1571. n=math.random(-50,50)
  1572. for i=0,1,0.4 do
  1573. fwait()
  1574. bwld1.C0=clerp(bwld1.C0,cf(0,-1.2,-2)*euler(0,0,2.09),.4)
  1575. bwld7.C0=clerp(bwld7.C0,cf(0,-1.2,-2)*euler(0,0,2.09*2),.4)
  1576. bwld13.C0=clerp(bwld13.C0,cf(0,-1.2,-2)*euler(0,0,2.09*3),.4)
  1577. bwld2.C0=clerp(bwld2.C0,euler(3.14,-1.3,1.57)*cf(0,0,0),.4)
  1578. bwld8.C0=clerp(bwld8.C0,euler(3.14,-1.3,1.57)*cf(0,0,0),.4)
  1579. bwld14.C0=clerp(bwld14.C0,euler(3.14,-1.3,1.57)*cf(0,0,0),.4)
  1580. brefwld.C0=clerp(brefwld.C0,euler(0,0,n)*cf(0,0,6),.4)
  1581. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1582. hitboxb2.CFrame=bprt10.CFrame
  1583. hitboxb3.CFrame=bprt16.CFrame
  1584. MagniDamage(hitboxb1,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1585. MagniDamage(hitboxb2,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1586. MagniDamage(hitboxb3,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1587. end
  1588. n=math.random(-50,50)
  1589. for i=0,1,0.3 do
  1590. fwait()
  1591. bwld1.C0=clerp(bwld1.C0,cf(0,-1,-2)*euler(0,0,2.09),.4)
  1592. bwld7.C0=clerp(bwld7.C0,cf(0,-1,-2)*euler(0,0,2.09*2),.4)
  1593. bwld13.C0=clerp(bwld13.C0,cf(0,-1,-2)*euler(0,0,2.09*3),.4)
  1594. brefwld.C0=clerp(brefwld.C0,euler(0,0,n)*cf(0,0,7),.4)
  1595. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1596. hitboxb2.CFrame=bprt10.CFrame
  1597. hitboxb3.CFrame=bprt16.CFrame
  1598. MagniDamage(hitboxb1,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1599. MagniDamage(hitboxb2,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1600. MagniDamage(hitboxb3,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1601. end
  1602. hitboxb1.Parent=nil
  1603. hitboxb2.Parent=nil
  1604. hitboxb3.Parent=nil
  1605. tribladesattack=false
  1606. end
  1607.  
  1608. function bladesattackfour()
  1609. while tribladesattack==true do
  1610. fwait()
  1611. end
  1612. tribladesattack=true
  1613. for i=0,1,0.2 do
  1614. fwait()
  1615. bwld1.C0=clerp(bwld1.C0,cf(0,-1,0)*euler(0,0,2.09),.4)
  1616. bwld7.C0=clerp(bwld7.C0,cf(0,-1,0)*euler(0,0,2.09*2),.4)
  1617. bwld13.C0=clerp(bwld13.C0,cf(0,-1,0)*euler(0,0,2.09*3),.4)
  1618. bwld2.C0=clerp(bwld2.C0,euler(1.57,0,-1.57)*cf(0,0,0),.4)
  1619. bwld8.C0=clerp(bwld8.C0,euler(1.57,0,-1.57)*cf(0,0,0),.4)
  1620. bwld14.C0=clerp(bwld14.C0,euler(1.57,0,-1.57)*cf(0,0,0),.4)
  1621. brefwld.C0=clerp(brefwld.C0,euler(-1.57,0,0)*cf(-5,-0.5,0),.4)
  1622. end
  1623. --BladesDamage(math.random(40,80)/100)
  1624. so("161006195",bprt1,.6,math.random(40,80)/100)
  1625. so("161006195",bprt7,.6,math.random(40,80)/100)
  1626. so("161006195",bprt13,.6,math.random(40,80)/100)
  1627. hitboxb1.Parent=Character
  1628. hitboxb1.Size=vt(1,2,1)
  1629. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1630. hitboxb1.Transparency=1
  1631. hitboxb2.Parent=Character
  1632. hitboxb2.Size=vt(1,2,1)
  1633. hitboxb2.CFrame=bprt10.CFrame*euler(0,0,1.57)
  1634. hitboxb3.Parent=Character
  1635. hitboxb3.Size=vt(1,2,1)
  1636. hitboxb3.CFrame=bprt16.CFrame*euler(0,0,1.57)
  1637. for i=0,1,0.6 do
  1638. fwait()
  1639. bwld1.C0=clerp(bwld1.C0,cf(0,-1,0)*euler(0,0,(2.09)+3.1),.5)
  1640. bwld7.C0=clerp(bwld7.C0,cf(0,-1,0)*euler(0,0,(2.09*2)+3.1),.5)
  1641. bwld13.C0=clerp(bwld13.C0,cf(0,-1,0)*euler(0,0,(2.09*3)+3.1),.5)
  1642. brefwld.C0=clerp(brefwld.C0,euler(-1.57,0,0)*cf(0,-0.5,8),.5)
  1643. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1644. hitboxb2.CFrame=bprt10.CFrame
  1645. hitboxb3.CFrame=bprt16.CFrame
  1646. MagniDamage(hitboxb1,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1647. MagniDamage(hitboxb2,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1648. MagniDamage(hitboxb3,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1649. end
  1650. for i=0,1,0.4 do
  1651. fwait()
  1652. bwld1.C0=clerp(bwld1.C0,cf(0,-1,0)*euler(0,0,(2.09)+5),.5)
  1653. bwld7.C0=clerp(bwld7.C0,cf(0,-1,0)*euler(0,0,(2.09*2)+5),.5)
  1654. bwld13.C0=clerp(bwld13.C0,cf(0,-1,0)*euler(0,0,(2.09*3)+5),.5)
  1655. brefwld.C0=clerp(brefwld.C0,euler(-1.57,0,0)*cf(0,-0.5,20),.5)
  1656. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1657. hitboxb2.CFrame=bprt10.CFrame
  1658. hitboxb3.CFrame=bprt16.CFrame
  1659. MagniDamage(hitboxb1,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1660. MagniDamage(hitboxb2,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1661. MagniDamage(hitboxb3,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1662. end
  1663. for i=0,1,0.4 do
  1664. fwait()
  1665. brefwld.C0=clerp(brefwld.C0,euler(-1.57,0,0)*cf(0,-2,0),.5)
  1666. bwld1.C0=clerp(bwld1.C0,cf(0,-1,0)*euler(0,0,(2.09)),.4)
  1667. bwld7.C0=clerp(bwld7.C0,cf(0,-1,0)*euler(0,0,(2.09*2)),.4)
  1668. bwld13.C0=clerp(bwld13.C0,cf(0,-1,0)*euler(0,0,(2.09*3)),.4)
  1669. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1670. hitboxb2.CFrame=bprt10.CFrame
  1671. hitboxb3.CFrame=bprt16.CFrame
  1672. MagniDamage(hitboxb1,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1673. MagniDamage(hitboxb2,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1674. MagniDamage(hitboxb3,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1675. end
  1676. hitboxb1.Parent=nil
  1677. hitboxb2.Parent=nil
  1678. hitboxb3.Parent=nil
  1679. tribladesattack=false
  1680. end
  1681.  
  1682. function BladesDamage(pitch)
  1683. so("161006195",bprt1,.6,pitch)
  1684. so("161006195",bprt7,.6,pitch)
  1685. so("161006195",bprt13,.6,pitch)
  1686. hitboxb1.Parent=Character
  1687. hitboxb1.Size=vt(1,2,1)
  1688. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1689. hitboxb1.Transparency=1
  1690. hitboxb2.Parent=Character
  1691. hitboxb2.Size=vt(1,2,1)
  1692. hitboxb2.CFrame=bprt10.CFrame*euler(0,0,1.57)
  1693. hitboxb3.Parent=Character
  1694. hitboxb3.Size=vt(1,2,1)
  1695. hitboxb3.CFrame=bprt16.CFrame*euler(0,0,1.57)
  1696. --local con1=hitboxb1.Touched:connect(function(hit) Damagefunc(hit,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash") end)
  1697. --local con2=hitboxb2.Touched:connect(function(hit) Damagefunc(hit,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash") end)
  1698. --local con3=hitboxb3.Touched:connect(function(hit) Damagefunc(hit,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash") end)
  1699. --Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration,Sound)
  1700. coroutine.resume(coroutine.create(function(Con1,Con2,Con3)
  1701. while attack==true do
  1702. fwait()
  1703. hitboxb1.CFrame=bprt4.CFrame*euler(0,0,1.57)
  1704. hitboxb2.CFrame=bprt10.CFrame
  1705. hitboxb3.CFrame=bprt16.CFrame
  1706. MagniDamage(hitboxb1,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1707. MagniDamage(hitboxb2,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1708. MagniDamage(hitboxb3,2,5,7,math.random(1,5),"Normal",BladesTarget,.4,1,math.random(1,3),false,true,true,nil,nil,nil,"Slash")
  1709. end
  1710. --Con1:disconnect()
  1711. --Con2:disconnect()
  1712. --Con3:disconnect()
  1713. hitboxb1.Parent=nil
  1714. hitboxb2.Parent=nil
  1715. hitboxb3.Parent=nil
  1716. end),con1,con2,con3)
  1717. end
  1718.  
  1719. function StatConvert()
  1720. attack=true
  1721. for i=0,1,0.1 do
  1722. fwait()
  1723. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(.2,0,0),.3)
  1724. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1725. RW.C0=clerp(RW.C0,cf(1.2,0.5,-.5)*euler(1.5,0,-1.5)*euler(0,0,0),.3)
  1726. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1727. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.5)*euler(1.5,0,1.5)*euler(0,0,0),.3)
  1728. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1729. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,0),.3)
  1730. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,0),.3)
  1731. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1732. break
  1733. end
  1734. end
  1735. for _,i in pairs(Decrease:children()) do
  1736. if i.Name=="DecreaseDef" then
  1737. i.Name="DecreaseAtk"
  1738. i.Value=i.Value*.5
  1739. elseif i.Name=="DecreaseAtk" then
  1740. i.Name="DecreaseDef"
  1741. i.Value=i.Value*2
  1742. end
  1743. end
  1744. attack=false
  1745. for i=1,30 do
  1746. fwait()
  1747. for i=1,2 do
  1748. ElecEffect(cf(RootPart.Position),2,3,1)
  1749. end
  1750. end
  1751. end
  1752.  
  1753. function do1()
  1754. if givingarmor==true then
  1755. givingarmor=false
  1756. cooldowns[1]=0
  1757. RailgunTarget=RootPart
  1758. end
  1759. if attack==true then return end
  1760. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then return end
  1761. if cooldowns[1]>=cooldownmax and mana.Value>=30 then
  1762. --if true then
  1763. givingrailgun=true
  1764. attack=true
  1765. mana.Value=mana.Value-30
  1766. MagicSpecial(BrickColor.new(NewCol),RightArm.CFrame*cf(0,-1,0)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.2,.2,.2,.5,.5,.5,.1)
  1767. local dec=Instance.new("NumberValue",Decrease)
  1768. dec.Name="DecreaseMvmt"
  1769. dec.Value=.4
  1770. for i=0,1,0.2 do
  1771. fwait()
  1772. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1)*euler(.2,0,0),.5)
  1773. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1),.5)
  1774. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.7,0,0)*euler(0,0,-.5),.5)
  1775. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.5)
  1776. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.3,0,0)*euler(0,0,.8),.5)
  1777. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.5)
  1778. RH.C0=clerp(RH.C0,cf(.6,-1,.5)*euler(0,1.57,0)*euler(0,-1,-.1),.5)
  1779. LH.C0=clerp(LH.C0,cf(-.6,-1,-.5)*euler(0,-1.57,0)*euler(0,-1,.4),.5)
  1780. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1781. break
  1782. end
  1783. end
  1784. givingarmor=true
  1785. while givingarmor==true do
  1786. fwait()
  1787. ElecEffect(RightArm.CFrame,1,2,1)
  1788. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1789. break
  1790. end
  1791. end
  1792. givingrailgun=false
  1793. DecreaseStat(Character,"Defense",-.1,400)
  1794. DecreaseStat(Character,"Movement",.1,400)
  1795. cooldowns[1]=0
  1796. givingarmor=false
  1797. dec.Parent=nil
  1798. if RailgunTarget~=nil then
  1799. for i=0,1,0.2 do
  1800. fwait()
  1801. Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,-.2),.4)
  1802. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.5)*euler(.8,0,.5),.4)
  1803. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,0,.5),.4)
  1804. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1805. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.2,0,-0.4),.4)
  1806. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1807. RH.C0=clerp(RH.C0,RHC0*cf(0,0,0)*euler(0,-.5,-.5),.4)
  1808. LH.C0=clerp(LH.C0,LHC0*cf(-0.5,1,0)*euler(.5,0,-.5),.4)
  1809. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1810. break
  1811. end
  1812. end
  1813. DecreaseStat(RailgunTarget.Parent,"Defense",-.2,280)
  1814. rwld1.Part1=RailgunTarget
  1815. model1.Parent=RailgunTarget.Parent
  1816. MagicSpecial(BrickColor.new(NewCol),rprt1.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,.5,.5,.5,.05)
  1817. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  1818. ref.Anchored=true
  1819. ref.CFrame=cf(rprt1.Position)
  1820. game:GetService("Debris"):AddItem(ref,1)
  1821. so("203691326",ref,1,1)
  1822. for i=1,5 do
  1823. ElecEffect(cf(rprt1.Position),3,3,3)
  1824. end
  1825. for i=1,#Railgun do
  1826. Railgun[i].Parent=model1
  1827. RailgunWelds[i].Parent=Railgun[1]
  1828. end
  1829. elecnum=0
  1830. attack=false
  1831. for i=1,50 do
  1832. fwait()
  1833. ElecEffect(cf(rprt1.Position),2,2,2)
  1834. end
  1835. else
  1836. attack=false
  1837. end
  1838. end
  1839. end
  1840.  
  1841. function do2()
  1842. if givingarmor==true then
  1843. givingarmor=false
  1844. cooldowns[2]=0
  1845. CannonTarget=RootPart
  1846. end
  1847. if attack==true then return end
  1848. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then return end
  1849. if cooldowns[2]>=cooldownmax and mana.Value>=30 then
  1850. --if true then
  1851. attack=true
  1852. mana.Value=mana.Value-30
  1853. givingplasma=true
  1854. MagicSpecial(BrickColor.new(NewCol),RightArm.CFrame*cf(0,-1,0)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.2,.2,.2,.5,.5,.5,.1)
  1855. local dec=Instance.new("NumberValue",Decrease)
  1856. dec.Name="DecreaseMvmt"
  1857. dec.Value=.4
  1858. for i=0,1,0.2 do
  1859. fwait()
  1860. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1)*euler(.2,0,0),.5)
  1861. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1),.5)
  1862. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.7,0,0)*euler(0,0,-.5),.5)
  1863. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.5)
  1864. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.3,0,0)*euler(0,0,.8),.5)
  1865. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.5)
  1866. RH.C0=clerp(RH.C0,cf(.6,-1,.5)*euler(0,1.57,0)*euler(0,-1,-.1),.5)
  1867. LH.C0=clerp(LH.C0,cf(-.6,-1,-.5)*euler(0,-1.57,0)*euler(0,-1,.4),.5)
  1868. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1869. break
  1870. end
  1871. end
  1872. givingarmor=true
  1873. while givingarmor==true do
  1874. fwait()
  1875. ElecEffect(RightArm.CFrame,1,2,1)
  1876. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1877. break
  1878. end
  1879. end
  1880. givingplasma=false
  1881. DecreaseStat(Character,"Defense",-.1,400)
  1882. DecreaseStat(Character,"Movement",.1,400)
  1883. cooldowns[2]=0
  1884. givingarmor=false
  1885. dec.Parent=nil
  1886. if CannonTarget~=nil then
  1887. for i=0,1,0.2 do
  1888. fwait()
  1889. Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,-.2),.4)
  1890. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.5)*euler(.8,0,.5),.4)
  1891. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,0,.5),.4)
  1892. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1893. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.2,0,-0.4),.4)
  1894. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1895. RH.C0=clerp(RH.C0,RHC0*cf(0,0,0)*euler(0,-.5,-.5),.4)
  1896. LH.C0=clerp(LH.C0,LHC0*cf(-0.5,1,0)*euler(.5,0,-.5),.4)
  1897. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1898. break
  1899. end
  1900. end
  1901. DecreaseStat(CannonTarget.Parent,"Defense",-.2,300)
  1902. pwld1.Part1=CannonTarget
  1903. model2.Parent=CannonTarget.Parent
  1904. MagicSpecial(BrickColor.new(NewCol),pprt1.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,.5,.5,.5,.05)
  1905. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  1906. ref.Anchored=true
  1907. ref.CFrame=cf(pprt1.Position)
  1908. game:GetService("Debris"):AddItem(ref,1)
  1909. so("203691326",ref,1,1)
  1910. for i=1,5 do
  1911. ElecEffect(cf(pprt1.Position),3,3,3)
  1912. end
  1913. for i=1,#Plasma do
  1914. Plasma[i].Parent=model2
  1915. PlasmaWelds[i].Parent=Plasma[1]
  1916. end
  1917. elecnum=0
  1918. attack=false
  1919. for i=1,50 do
  1920. fwait()
  1921. ElecEffect(cf(pprt1.Position),2,2,2)
  1922. end
  1923. else
  1924. attack=false
  1925. end
  1926. end
  1927. end
  1928.  
  1929. function do3()
  1930. if givingarmor==true then
  1931. givingarmor=false
  1932. cooldowns[3]=0
  1933. BladesTarget=RootPart
  1934. end
  1935. if attack==true then return end
  1936. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then return end
  1937. if cooldowns[3]>=cooldownmax and mana.Value>=30 then
  1938. --if true then
  1939. attack=true
  1940. mana.Value=mana.Value-30
  1941. givingblades=true
  1942. MagicSpecial(BrickColor.new(NewCol),RightArm.CFrame*cf(0,-1,0)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),.2,.2,.2,.5,.5,.5,.1)
  1943. local dec=Instance.new("NumberValue",Decrease)
  1944. dec.Name="DecreaseMvmt"
  1945. dec.Value=.4
  1946. for i=0,1,0.2 do
  1947. fwait()
  1948. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1)*euler(.2,0,0),.5)
  1949. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1),.5)
  1950. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.7,0,0)*euler(0,0,-.5),.5)
  1951. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.5)
  1952. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.3,0,0)*euler(0,0,.8),.5)
  1953. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.5)
  1954. RH.C0=clerp(RH.C0,cf(.6,-1,.5)*euler(0,1.57,0)*euler(0,-1,-.1),.5)
  1955. LH.C0=clerp(LH.C0,cf(-.6,-1,-.5)*euler(0,-1.57,0)*euler(0,-1,.4),.5)
  1956. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1957. break
  1958. end
  1959. end
  1960. givingarmor=true
  1961. while givingarmor==true do
  1962. fwait()
  1963. ElecEffect(RightArm.CFrame,1,2,1)
  1964. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1965. break
  1966. end
  1967. end
  1968. givingblades=false
  1969. DecreaseStat(Character,"Defense",-.1,400)
  1970. DecreaseStat(Character,"Movement",.1,400)
  1971. cooldowns[3]=0
  1972. givingarmor=false
  1973. dec.Parent=nil
  1974. if BladesTarget~=nil then
  1975. for i=0,1,0.2 do
  1976. fwait()
  1977. Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,-.2),.4)
  1978. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.5)*euler(.8,0,.5),.4)
  1979. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.4,0,.5),.4)
  1980. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1981. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.2,0,-0.4),.4)
  1982. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  1983. RH.C0=clerp(RH.C0,RHC0*cf(0,0,0)*euler(0,-.5,-.5),.4)
  1984. LH.C0=clerp(LH.C0,LHC0*cf(-0.5,1,0)*euler(.5,0,-.5),.4)
  1985. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then
  1986. break
  1987. end
  1988. end
  1989. DecreaseStat(BladesTarget.Parent,"Damage",-.2,300)
  1990. brefwld.Part1=BladesTarget
  1991. model3.Parent=BladesTarget.Parent
  1992. MagicSpecial(BrickColor.new(NewCol),bprt1.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,.3,.3,.3,.05)
  1993. MagicSpecial(BrickColor.new(NewCol),bprt7.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,.3,.3,.3,.05)
  1994. MagicSpecial(BrickColor.new(NewCol),bprt13.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,.3,.3,.3,.05)
  1995. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  1996. ref.Anchored=true
  1997. ref.CFrame=cf(bprt1.Position)
  1998. game:GetService("Debris"):AddItem(ref,1)
  1999. so("203691326",ref,1,1)
  2000. for i=1,5 do
  2001. ElecEffect(cf(bref.Position),3,3,3)
  2002. end
  2003. for i=1,#Blades do
  2004. Blades[i].Parent=model3
  2005. BladesWelds[i].Parent=Blades[1]
  2006. end
  2007. attack=false
  2008. for i=1,50 do
  2009. fwait()
  2010. ElecEffect(cf(bref.Position),2,2,2)
  2011. end
  2012. else
  2013. attack=false
  2014. end
  2015. end
  2016. end
  2017.  
  2018. ignoretab2={}
  2019. NewPart=function(size,cframe,color,meshtype,meshscale) --returns a basic part for further manipulation
  2020. local par = Instance.new("Part")
  2021. --par.formFactor="Custom"
  2022. par.TopSurface=0
  2023. par.BottomSurface=0
  2024. par.Size=size
  2025. par.CFrame=cframe
  2026. par.BrickColor=color
  2027. par.Anchored=true
  2028. par.CanCollide=false
  2029. if meshtype then
  2030. local m = Instance.new(meshtype,par)
  2031. m.Scale=meshscale
  2032. end
  2033. table.insert(ignoretab2,par)
  2034. return par
  2035. end
  2036. vPlayer=game.Players.LocalPlayer
  2037. GetTeamFromColor=function(color)
  2038. for _,v in pairs(game:GetService("Teams"):children()) do
  2039. if color == v.TeamColor then
  2040. return v.Name
  2041. end
  2042. end
  2043. end
  2044. drawline = function(pos,pos2)
  2045. local par,loc,normal = nil,nil
  2046. for i=1, 100 do
  2047. par,loc,normal = workspace:FindPartOnRayWithIgnoreList(Ray.new(pos,-(pos-pos2)),ignoretab2)
  2048. if par then
  2049. if (par.CanCollide==false and par.Parent:FindFirstChild("Humanoid")==nil) or par.Parent.ClassName=="Tool" or par.Parent.className=="Hat" or par:IsDescendantOf(vPlayer) then
  2050. table.insert(ignoretab2,par)
  2051. else
  2052. local ok = true
  2053. if par.Parent:FindFirstChild("Humanoid") then
  2054.  
  2055. local vp=game.Players:GetPlayerFromCharacter(par.Parent)
  2056. if vp ~= nil then
  2057. if vp.Neutral ~= true and vPlayer.Neutral ~= true then
  2058. if GetTeamFromColor(vp.TeamColor) == GetTeamFromColor(vPlayer.TeamColor) then
  2059. table.insert(ignoretab2,par)
  2060. ok = false
  2061. end
  2062. end
  2063. else
  2064. if vPlayer.Neutral ~= true then
  2065. if par.Parent:FindFirstChild("Alignment") ~= nil then
  2066. if vPlayer.TeamColor.Color == par.Parent.Alignment.Value then
  2067. table.insert(ignoretab2,par)
  2068. ok = false
  2069. end
  2070. end
  2071. end
  2072. end
  2073.  
  2074. end
  2075. if ok then
  2076. return par,loc,normal
  2077. end
  2078. end
  2079. else
  2080. return par,loc,normal
  2081. end
  2082. end
  2083. print("oops")
  2084. return nil,Vector3.new(0,0,0),Vector3.new(0,0,0)
  2085. end
  2086. lasersounds = {412755503,412755564,412755598,412755669,412756057,412756123,412756170,412756199}
  2087. GetNubs=function()
  2088. Nubs={}
  2089. for _,v in pairs(workspace:children()) do
  2090. if v:FindFirstChild("Humanoid")~=nil and v:FindFirstChild("Torso")~=nil and v.Name~=game.Players.LocalPlayer.Name and v.Name~=vPlayer.Name.."Subunit" then
  2091. if (v.Torso.Position-vPlayer.Character.HumanoidRootPart.Position).magnitude<=600 and v.Humanoid.Health > 0 then
  2092. local vp = game.Players:GetPlayerFromCharacter(v)
  2093. if vp == nil then
  2094. table.insert(Nubs,v)
  2095. else
  2096. if vp.Neutral == true and vPlayer.Neutral==true then
  2097. table.insert(Nubs,v)
  2098. else
  2099. if GetTeamFromColor(vp.TeamColor) ~= GetTeamFromColor(vPlayer.TeamColor) then
  2100. table.insert(Nubs,v)
  2101. end
  2102. end
  2103. end
  2104. end
  2105. end
  2106. end
  2107. end
  2108. Nubs={}
  2109. GetNubsInRadius=function(pos,radius)
  2110. local radius=radius
  2111. local filtered={}
  2112. for _,v in pairs(Nubs) do
  2113. if v:FindFirstChild("Torso")~=nil and v:FindFirstChild("Humanoid") ~= nil then
  2114. local cpos = pos
  2115. if v.Humanoid:GetState() == Enum.HumanoidStateType.Jumping or v.Humanoid:GetState() == Enum.HumanoidStateType.Freefall then
  2116. local ydiff = (v.Torso.Position.y - vPlayer.Character.Torso.Position.y)/1
  2117. if ydiff > 5 then
  2118. ydiff = 5
  2119. end
  2120. cpos = pos + Vector3.new(0,ydiff,0)
  2121. end
  2122. if v.Name == "Siegmund" then
  2123. cpos = cpos - Vector3.new(0,5,0)
  2124. end
  2125. if (v.Torso.Position-cpos).magnitude<=radius then
  2126. table.insert(filtered,v)
  2127. end
  2128. end
  2129. end
  2130. return filtered
  2131. end
  2132. fwait=function(t) --RS hooked thread yielding
  2133. if t == nil then
  2134. t = 1 / 30
  2135. else
  2136. if t == 0 then
  2137. t = 1 / 30
  2138. end
  2139. end
  2140. local s=0
  2141. repeat s = s + 1/30 vPlayer.PlayerGui.Pacemaker.Heartbeat.Event:wait() until s >= t
  2142. ----------print(s)
  2143. return s,workspace.DistributedGameTime
  2144. end
  2145. do4=function()
  2146. if attack==true then return end
  2147. if Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true then return end
  2148. if cooldowns[4]>=cooldownmax and mana.Value>=0 then
  2149. attack=true
  2150. cooldowns[4]=0
  2151. mana.Value=mana.Value-0
  2152. GetNubs()
  2153. table.insert(Nubs,vPlayer.Character)
  2154. local ppos = vPlayer:GetMouse().Hit.p
  2155. local h,p,k = drawline(ppos + Vector3.new(0,450,0),ppos - Vector3.new(0,450,0))
  2156. local r,g,b
  2157. local Col1=BrickColor.new(NewCol)
  2158. r=Col1.Color.r + .3
  2159. g=Col1.Color.g + .3
  2160. b=Col1.Color.b + .3
  2161. if r > 1 then
  2162. r = 1
  2163. end
  2164. if g > 1 then
  2165. g = 1
  2166. end
  2167. if b > 1 then
  2168. b = 1
  2169. end
  2170. local Col1C=Color3.new(r,g,b)
  2171. local pro,blolb,r,psl
  2172. local par,loc,nor
  2173. local x = {}
  2174. local joj,kd = false,false
  2175. for i=1, 10 do
  2176. x[i] = i
  2177. end
  2178. local m = Instance.new("Model",workspace)
  2179. m.Name="IONCANNON_EFFECTS"
  2180. game:GetService("Debris"):AddItem(m,20)
  2181. local kt = tick()
  2182. local soloc = Instance.new("Part",workspace)
  2183. soloc.Transparency=1
  2184. soloc.CanCollide=false
  2185. soloc.Anchored=true
  2186. soloc.Name="Effect"
  2187. soloc.Size=Vector3.new(.2,.2,.2)
  2188. soloc.CFrame = CFrame.new(p)
  2189. game:GetService("Debris"):AddItem(soloc,25)
  2190. local so = Instance.new("Sound",vPlayer.Character.Head)
  2191. so.Volume=.35
  2192. so.Pitch=1
  2193. so.SoundId="http://www.roblox.com/asset/?id=412756347"
  2194. coroutine.resume(coroutine.create(function(so) wait() so:Play() end),so)
  2195. for i=0,1,0.1 do
  2196. fwait()
  2197. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1)*euler(0,0,0),.5)
  2198. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.5)
  2199. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.7,0,0)*euler(0,0,0),.4)
  2200. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.5)
  2201. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(0,0,0)*euler(0,0,0),.4)
  2202. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  2203. --RH.C0=clerp(RH.C0,cf(.6,-1,.5)*euler(0,1.57,0)*euler(0,-1,0),.4)
  2204. --LH.C0=clerp(LH.C0,cf(-.6,-1,-.5)*euler(0,-1.57,0)*euler(0,-1,0),.4)
  2205. end
  2206. fwait(.5)
  2207. local so = Instance.new("Sound",vPlayer.Character.Head)
  2208. so.Volume=.4
  2209. so.Pitch=1.1
  2210. so.SoundId="http://www.roblox.com/asset/?id=412756417"
  2211. coroutine.resume(coroutine.create(function(so) wait() so:Play() end),so)
  2212. attack=false
  2213. local so = Instance.new("Sound",soloc)
  2214. so.Volume=.8
  2215. so.Pitch=1.2
  2216. so.SoundId="http://www.roblox.com/asset/?id=412756315"
  2217. coroutine.resume(coroutine.create(function(so) wait() so:Play() end),so)
  2218. local kuck = false
  2219. local lasparts={}
  2220. coroutine.resume(coroutine.create(function()
  2221. local ksl,mdist,mpl = 0,0,0
  2222. repeat
  2223. fwait(.12)
  2224. ksl = ksl + 1
  2225. if ksl == 50 then
  2226. GetNubs()
  2227. table.insert(Nubs,vPlayer.Character)
  2228. ksl = 0
  2229. end
  2230. mdist = (lasparts[1].Position - p).magnitude
  2231. print(mdist)
  2232. for _,v in pairs(Nubs) do
  2233. if v then
  2234. if v.Parent then
  2235. if v:FindFirstChild("Torso") and v:FindFirstChild("Humanoid") then
  2236. if v.Humanoid.Health > 0 then
  2237. mpl = (Vector3.new(v.Torso.Position.x,0,v.Torso.Position.z) - Vector3.new(p.x,0,p.z)).magnitude
  2238. if mpl>mdist-4.5 and mpl<mdist+4.5 then
  2239. print("!!!!",time())
  2240. for __,vv in pairs(lasparts) do
  2241. if (vv.Position-v.Torso.Position).magnitude <= 10 and (v.Torso.Position.y>=vv.Position.y-4) then
  2242. if v ~= vPlayer.Character then
  2243. Damagefunc(v.Torso,1,1,0,"Normal",RootPart,0,1,1,nil,false)
  2244. DecreaseStat(v.Parent,"Movement",.06,200)
  2245. else
  2246. vPlayer.Character.Humanoid:TakeDamage(1 / vPlayer.Character.Stats.Defense.Value)
  2247. DecreaseStat(vPlayer.Character,"Movement",.06,200)
  2248. showDamage(vPlayer.Character,math.floor((1 / vPlayer.Character.Stats.Defense.Value)),"Damage")
  2249. end
  2250. --Damagefunc(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,DecreaseState,DecreaseAmount,Duration)
  2251. break
  2252. end
  2253. end
  2254. end
  2255. end
  2256. end
  2257. end
  2258. end
  2259. end
  2260. until kuck == true
  2261. end))
  2262. for i=1, 10 do
  2263. r = math.random(1,#x)
  2264. if #x > 1 then
  2265. blolb = x[r]
  2266. else
  2267. blolb= x[1]
  2268. end
  2269. psl = p + Vector3.new(math.cos(math.rad(36*blolb))*35,0,math.sin(math.rad(36*blolb))*35)
  2270. par,loc,nor = drawline(psl+Vector3.new(0,480,0),psl-Vector3.new(0,480,0))
  2271.  
  2272. local pc = NewPart(Vector3.new(1,1,1),CFrame.new(loc) * CFrame.Angles(math.random(-30,30)/50,math.random(-30,30)/50,math.random(-30,30)/50),Col1,"SpecialMesh",Vector3.new(2,2,2))
  2273. pc.Parent=workspace
  2274. pc.Anchored=true
  2275. pc.CanCollide=false
  2276. pc.Mesh.MeshType="Sphere"
  2277. pc.Transparency=1
  2278. pc.Material="Neon"
  2279. game:GetService("Debris"):AddItem(pc,15)
  2280.  
  2281. coroutine.resume(coroutine.create(function(p,V,x)
  2282. for i=1, 12 do
  2283. p.Mesh.Scale = p.Mesh.Scale + Vector3.new(1.6,1.6,1.6) / (1 + i/6.5)
  2284. p.Transparency=.25 + i/(12/(1-.25))
  2285. p.CFrame = p.CFrame*V
  2286. fwait()
  2287. end
  2288. p:Remove()
  2289. end),pc,CFrame.Angles(math.rad(math.random(-6,6)),math.rad(math.random(-16,16)),math.rad(math.random(-6,6))))
  2290. table.insert(ignoretab2,pc)
  2291.  
  2292. local pc = NewPart(Vector3.new(1,1,1),CFrame.new(loc + Vector3.new(0,1.25,0)) * CFrame.Angles(0,math.random(-180,180)*math.rad(1),0),Col1,"SpecialMesh",Vector3.new(4,4,4))
  2293. pc.Mesh.MeshType="FileMesh"
  2294. pc.Anchored=true
  2295. pc.CanCollide=false
  2296. pc.Parent=workspace
  2297. pc.Mesh.MeshId="http://www.roblox.com/asset/?id=20329976"
  2298. pc.Name="Shockwave"
  2299. pc.Material="Neon"
  2300. game:GetService("Debris"):AddItem(pc,5)
  2301.  
  2302. coroutine.resume(coroutine.create(function(p)
  2303. for i=1, 12 do
  2304. p.Transparency=.25 + (i/(12/(1-.25)))
  2305. p.CFrame = p.CFrame * CFrame.Angles(0,math.rad(5 + i/20),0) + Vector3.new(0,-1.4/12,0)
  2306. p.Mesh.Scale=p.Mesh.Scale + Vector3.new(i/10,-3/12,i/10)
  2307. fwait()
  2308. end
  2309. p:Remove()
  2310. end),pc)
  2311.  
  2312. local so = Instance.new("Sound",pc)
  2313. so.Volume=1
  2314. so.Pitch=1
  2315. so.SoundId="http://www.roblox.com/asset/?id="..lasersounds[math.random(1,8)]
  2316. coroutine.resume(coroutine.create(function(so) wait() so:Play() end),so)
  2317.  
  2318. for kek=1, 3 do
  2319. pro = NewPart(Vector3.new(1,1,1),CFrame.new(loc),Col1,"CylinderMesh",Vector3.new(1.7 - kek*.1,1600,1.7 - kek*.1) - Vector3.new(.25,0,.25)*(1.95^(kek-1)))
  2320. pro.Anchored=true
  2321. pro.Mesh.Offset=Vector3.new(0,799,0)
  2322. pro.Material="Neon"
  2323. pro.Name="Las"..i..kek
  2324. pro.Parent=m
  2325. pro.Transparency = 1 - .2*(1.7^(kek-1))
  2326. game:GetService("Debris"):AddItem(pro,10)
  2327. if kek == 1 then
  2328. table.insert(lasparts,pro)
  2329. coroutine.resume(coroutine.create(function(k,l)
  2330. repeat fwait() until joj == true
  2331. local j,c,h,psl,pc
  2332. local klr,i,lj = 0,0,0
  2333. repeat
  2334. if lj < .008 then
  2335. lj = lj + .001
  2336. else
  2337. lj = .008
  2338. end
  2339. klr = klr + i * (lj)
  2340. if klr > 34.75 then
  2341. klr = 34.75
  2342. end
  2343. psl = p + Vector3.new(math.cos(math.rad(36*l + i^(.775 + i*.0066)))*(35 - klr),0,math.sin(math.rad(36*l + i^(.775 + i*.0066)))*(35 - klr))
  2344. j,c,h = drawline(psl+Vector3.new(0,480,0),psl-Vector3.new(0,480,0))
  2345. k.CFrame = CFrame.new(c)
  2346. i = i + 1
  2347. m["Las"..l.."2"].CFrame=k.CFrame
  2348. m["Las"..l.."3"].CFrame=k.CFrame
  2349. fwait()
  2350. until klr >= 34.75
  2351. --k.CFrame = CFrame.new(p)
  2352. psl = p + Vector3.new(math.cos(math.rad(36*l + i^(.75 + i*.007)))*(35 - klr),0,math.sin(math.rad(36*l + i^(.75 + i*.007)))*(35 - klr))
  2353. j,c,h = drawline(psl+Vector3.new(0,480,0),psl-Vector3.new(0,480,0))
  2354. k.CFrame = CFrame.new(c)
  2355. kd = true
  2356. end),pro,i)
  2357. local sizeseq = NumberSequence.new({NumberSequenceKeypoint.new(0,1.8),NumberSequenceKeypoint.new(1,0)})
  2358. local transseq = NumberSequence.new({NumberSequenceKeypoint.new(0,0.66),NumberSequenceKeypoint.new(1,1)})
  2359. local sus1 = Instance.new("ParticleEmitter",pro)
  2360. sus1.Color=ColorSequence.new(Col1.Color,Col1C)
  2361. sus1.Transparency=transseq
  2362. sus1.Size=sizeseq
  2363. sus1.LightEmission=0.33
  2364. sus1.Rotation=NumberRange.new(-180,180)
  2365. sus1.Lifetime=NumberRange.new(.8,.8)
  2366. sus1.RotSpeed=NumberRange.new(-10,10)
  2367. sus1.Texture="http://www.roblox.com/asset/?id=242911609"
  2368. sus1.Speed=NumberRange.new(5,8)
  2369. sus1.VelocitySpread = 3
  2370. sus1.Rate = 125
  2371. sus1.ZOffset = 0
  2372. sus1.Name="ParticleEmitter1"
  2373. local sizeseq = NumberSequence.new({NumberSequenceKeypoint.new(0,.6),NumberSequenceKeypoint.new(1,0)})
  2374. local transseq = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(1,0)})
  2375. local sus1 = Instance.new("ParticleEmitter",pro)
  2376. sus1.Color=ColorSequence.new(Col1C,Col1C)
  2377. sus1.Transparency=transseq
  2378. sus1.Size=sizeseq
  2379. sus1.LightEmission=0.33
  2380. sus1.Rotation=NumberRange.new(-180,180)
  2381. sus1.Lifetime=NumberRange.new(.4,.8)
  2382. sus1.RotSpeed=NumberRange.new(-10,10)
  2383. sus1.Texture="http://www.roblox.com/asset/?id=242292318"
  2384. sus1.Speed=NumberRange.new(10,12)
  2385. sus1.VelocitySpread = 60
  2386. sus1.Rate = 50
  2387. sus1.ZOffset = 0
  2388. sus1.Name="ParticleEmitter2"
  2389. --sus1.LockedToPart=true
  2390. end
  2391.  
  2392. end
  2393. table.remove(x,r)
  2394. fwait(.15)
  2395. end
  2396. fwait()
  2397. joj=true
  2398. fwait(2)
  2399. local so = Instance.new("Sound",soloc)
  2400. so.Volume=.9
  2401. so.Pitch=1
  2402. so.SoundId="http://www.roblox.com/asset/?id=412756262"
  2403. coroutine.resume(coroutine.create(function(so) wait() so:Play() end),so)
  2404. --sus1.LockedToPart=true
  2405. repeat
  2406. fwait(.06)
  2407. pro = NewPart(Vector3.new(.2,.2,.2),(CFrame.new(p)*CFrame.Angles(0,math.rad(math.random(-180,180)),0))*CFrame.new(math.random(3,50),0,0),Col1,"SpecialMesh",Vector3.new(2,25,2))
  2408. pro.Mesh.MeshType="Sphere"
  2409. pro.Anchored=true
  2410. pro.Material="Neon"
  2411. pro.Name="LasEffect"
  2412. pro.Parent=m
  2413. pro.Transparency = 1
  2414. game:GetService("Debris"):AddItem(pro,10)
  2415. table.insert(ignoretab2,pro)
  2416. coroutine.resume(coroutine.create(function(p,k)
  2417. for i=1, 50 do
  2418. if i <= 5 then
  2419. p.Transparency=p.Transparency-.1
  2420. elseif i >= 50-5 then
  2421. p.Transparency=p.Transparency+.1
  2422. end
  2423. p.CFrame=p.CFrame+Vector3.new(0,k,0)
  2424. fwait()
  2425. end
  2426. p:Destroy()
  2427. end),pro,math.random(15,30)/10)
  2428. until kd == true
  2429. for kek=1, 4 do
  2430. pro = NewPart(Vector3.new(3,1,3),CFrame.new(p),Col1,"CylinderMesh",Vector3.new(.7,1600,.7) - Vector3.new(.175,0,.175)*(kek-1))
  2431. pro.Anchored=true
  2432. pro.Mesh.Offset=Vector3.new(0,799,0)
  2433. pro.Material="Neon"
  2434. pro.Name="LasBig"
  2435. pro.Parent=m
  2436. pro.Transparency = 1 - .2*(1.7^(kek-1))
  2437. game:GetService("Debris"):AddItem(pro,10)
  2438. local sizeseq = NumberSequence.new({NumberSequenceKeypoint.new(0,1.8),NumberSequenceKeypoint.new(1,0)})
  2439. local transseq = NumberSequence.new({NumberSequenceKeypoint.new(0,0.66),NumberSequenceKeypoint.new(1,1)})
  2440. local sus1 = Instance.new("ParticleEmitter",pro)
  2441. sus1.Color=ColorSequence.new(Col1.Color,Col1C)
  2442. sus1.Transparency=transseq
  2443. sus1.Size=sizeseq
  2444. sus1.LightEmission=0.33
  2445. sus1.Rotation=NumberRange.new(-180,180)
  2446. sus1.Lifetime=NumberRange.new(.8,.8)
  2447. sus1.RotSpeed=NumberRange.new(-10,10)
  2448. sus1.Texture="http://www.roblox.com/asset/?id=242911609"
  2449. sus1.Speed=NumberRange.new(5,8)
  2450. sus1.VelocitySpread = 3
  2451. sus1.Rate = 125
  2452. sus1.ZOffset = 5
  2453. sus1.Name="ParticleEmitter1"
  2454. local sizeseq = NumberSequence.new({NumberSequenceKeypoint.new(0,.6),NumberSequenceKeypoint.new(1,0)})
  2455. local transseq = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(1,0)})
  2456. local sus1 = Instance.new("ParticleEmitter",pro)
  2457. sus1.Color=ColorSequence.new(Col1C,Col1C)
  2458. sus1.Transparency=transseq
  2459. sus1.Size=sizeseq
  2460. sus1.LightEmission=0.33
  2461. sus1.Rotation=NumberRange.new(-180,180)
  2462. sus1.Lifetime=NumberRange.new(.4,.8)
  2463. sus1.RotSpeed=NumberRange.new(-10,10)
  2464. sus1.Texture="http://www.roblox.com/asset/?id=242292318"
  2465. sus1.Speed=NumberRange.new(10,12)
  2466. sus1.VelocitySpread = 60
  2467. sus1.Rate = 50
  2468. sus1.ZOffset = 5
  2469. sus1.Name="ParticleEmitter2"
  2470. coroutine.resume(coroutine.create(function(k)
  2471. for i=1, 70 do
  2472. if k.Parent == nil then
  2473. break
  2474. end
  2475. fwait()
  2476. k.Mesh.Scale = k.Mesh.Scale * 1.028
  2477. k.ParticleEmitter1.Size=NumberSequence.new({NumberSequenceKeypoint.new(0,2 + i*.1),NumberSequenceKeypoint.new(1,0)})
  2478. k.ParticleEmitter1.Speed=NumberRange.new(10 + i/8,12 + i/8)
  2479. k.ParticleEmitter2.Size=NumberSequence.new({NumberSequenceKeypoint.new(0,1 + i*.03),NumberSequenceKeypoint.new(1,0)})
  2480. k.ParticleEmitter2.Speed=NumberRange.new(15 + i/8,18 + i/8)
  2481. end
  2482. end),pro)
  2483. end
  2484. print(tick()-kt)
  2485. print("JOJ")
  2486. for i=1, 1.5 / (1/15) do
  2487. fwait(1/15)
  2488. pro = NewPart(Vector3.new(.2,.2,.2),(CFrame.new(p)*CFrame.Angles(0,math.rad(math.random(-180,180)),0))*CFrame.new(math.random(3,50),0,0),Col1,"SpecialMesh",Vector3.new(2,25,2))
  2489. pro.Mesh.MeshType="Sphere"
  2490. pro.Anchored=true
  2491. pro.Material="Neon"
  2492. pro.Name="LasEffect"
  2493. pro.Parent=m
  2494. pro.Transparency = 1
  2495. game:GetService("Debris"):AddItem(pro,10)
  2496. table.insert(ignoretab2,pro)
  2497. coroutine.resume(coroutine.create(function(p,k)
  2498. for i=1, 50 do
  2499. if i <= 5 then
  2500. p.Transparency=p.Transparency-.1
  2501. elseif i >= 50-5 then
  2502. p.Transparency=p.Transparency+.1
  2503. end
  2504. p.CFrame=p.CFrame+Vector3.new(0,k,0)
  2505. fwait()
  2506. end
  2507. p:Destroy()
  2508. end),pro,math.random(15,30)/10)
  2509. end
  2510. local so = Instance.new("Sound",soloc)
  2511. so.Volume=1
  2512. so.Pitch=1
  2513. so.SoundId="http://www.roblox.com/asset/?id=266243673"
  2514. so:Play()
  2515. local pros = NewPart(Vector3.new(1,1,1),CFrame.new(p),Col1,"CylinderMesh",Vector3.new(24,1600,24))
  2516. pros.Anchored=true
  2517. pros.Mesh.Offset=Vector3.new(0,799,0)*4
  2518. pros.Material="Neon"
  2519. pros.Name="LasBerryBig"
  2520. pros.Parent=m
  2521. game:GetService("Debris"):AddItem(pros,10)
  2522. coroutine.resume(coroutine.create(function(k)
  2523. for i=1, 30 do
  2524. k.Mesh.Offset=k.Mesh.Offset - Vector3.new(0,799/30*3,0)
  2525. fwait()
  2526. end
  2527. kuck=true
  2528. for i=1, 30 do
  2529. if k.Parent == nil then
  2530. break
  2531. end
  2532. k.Mesh.Offset=k.Mesh.Offset - Vector3.new(0,799,0)/30
  2533. k.Mesh.Scale = k.Mesh.Scale - Vector3.new(22,1600,22)/30
  2534. fwait()
  2535. end
  2536. k:Destroy()
  2537. end),pros)
  2538. for i=1, 65/2 do
  2539. if kuck == true then break end
  2540. fwait()
  2541. pro = NewPart(Vector3.new(.2,.2,.2),(CFrame.new(p)*CFrame.Angles(0,math.rad(math.random(-180,180)),0))*CFrame.new(math.random(3,50),0,0),Col1,"SpecialMesh",Vector3.new(2,25,2))
  2542. pro.Mesh.MeshType="Sphere"
  2543. pro.Anchored=true
  2544. pro.Material="Neon"
  2545. pro.Name="LasEffect"
  2546. pro.Parent=m
  2547. pro.Transparency = 1
  2548. game:GetService("Debris"):AddItem(pro,10)
  2549. table.insert(ignoretab2,pro)
  2550. coroutine.resume(coroutine.create(function(p,k)
  2551. for i=1, 50 do
  2552. if i <= 5 then
  2553. p.Transparency=p.Transparency-.1
  2554. elseif i >= 50-5 then
  2555. p.Transparency=p.Transparency+.1
  2556. end
  2557. p.CFrame=p.CFrame+Vector3.new(0,k,0)
  2558. fwait()
  2559. end
  2560. p:Destroy()
  2561. end),pro,math.random(15,30)/10)
  2562. if kuck == true then break end
  2563. fwait()
  2564. end
  2565. local so = Instance.new("Sound",soloc)
  2566. so.Volume = 1
  2567. so.Pitch = 1.2
  2568. so.SoundId="http://www.roblox.com/asset/?id=266243712"
  2569. so:Play()
  2570. local so = Instance.new("Sound",soloc)
  2571. so.Volume =1
  2572. so.Pitch=1.2
  2573. so.SoundId="http://www.roblox.com/asset/?id=385545047"
  2574. so:Play()
  2575. local pc = NewPart(Vector3.new(1,1,1),CFrame.new(p + Vector3.new(0,13.5/2,0)) * CFrame.Angles(0,math.random(-10,10),0),Col1,"SpecialMesh",Vector3.new(47.5,30/2,47.5))
  2576. pc.Mesh.MeshType="FileMesh"
  2577. pc.Anchored=true
  2578. pc.CanCollide=false
  2579. pc.Parent=workspace
  2580. pc.Mesh.MeshId="http://www.roblox.com/asset/?id=20329976"
  2581. pc.Name="Shockwave"
  2582. game:GetService("Debris"):AddItem(pc,5)
  2583. pc.Material="Neon"
  2584. coroutine.resume(coroutine.create(function(p)
  2585. for i=1, 30 do
  2586. p.Transparency=.25 + (i/(30/(1-.25)))
  2587. p.CFrame = p.CFrame * CFrame.Angles(0,math.rad(3 + i/30),0) - Vector3.new(0,29/30/2/2,0)
  2588. p.Mesh.Scale=p.Mesh.Scale + Vector3.new(i/11,-29/30/2,i/11)
  2589. fwait()
  2590. end
  2591. p:Remove()
  2592. end),pc)
  2593.  
  2594. local pc = NewPart(Vector3.new(1,1,1),CFrame.new(p + Vector3.new(0,8.5/2,0)) * CFrame.Angles(0,math.random(-10,10),0),Col1,"SpecialMesh",Vector3.new(57.5,20/2,57.5))
  2595. pc.Mesh.MeshType="FileMesh"
  2596. pc.Anchored=true
  2597. pc.CanCollide=false
  2598. pc.Parent=workspace
  2599. pc.Mesh.MeshId="http://www.roblox.com/asset/?id=20329976"
  2600. pc.Name="Shockwave"
  2601. game:GetService("Debris"):AddItem(pc,5)
  2602. pc.Material="Neon"
  2603. coroutine.resume(coroutine.create(function(p)
  2604. for i=1, 30 do
  2605. p.Transparency=.25 + (i/(30/(1-.25)))
  2606. p.CFrame = p.CFrame * CFrame.Angles(0,-math.rad(3 + i/30),0) - Vector3.new(0,19/30/2/2,0)
  2607. p.Mesh.Scale=p.Mesh.Scale + Vector3.new(i/9,-19/30/2,i/9)
  2608. fwait()
  2609. end
  2610. p:Remove()
  2611. end),pc)
  2612.  
  2613. local pc = NewPart(Vector3.new(1,1,1),CFrame.new(p + Vector3.new(0,3.5/2,0)) * CFrame.Angles(0,math.random(-10,10),0),Col1,"SpecialMesh",Vector3.new(73.5,10/2,73.5))
  2614. pc.Mesh.MeshType="FileMesh"
  2615. pc.Anchored=true
  2616. pc.CanCollide=false
  2617. pc.Parent=workspace
  2618. pc.Mesh.MeshId="http://www.roblox.com/asset/?id=20329976"
  2619. pc.Name="Shockwave"
  2620. game:GetService("Debris"):AddItem(pc,5)
  2621. pc.Material="Neon"
  2622. coroutine.resume(coroutine.create(function(p)
  2623. for i=1, 30 do
  2624. p.Transparency=.25 + (i/(30/(1-.25)))
  2625. p.CFrame = p.CFrame * CFrame.Angles(0,math.rad(3 + i/30),0) - Vector3.new(0,9/30/2/2,0)
  2626. p.Mesh.Scale=p.Mesh.Scale + Vector3.new(i/7,-9/30/2,i/7)
  2627. fwait()
  2628. end
  2629. p:Remove()
  2630. end),pc)
  2631.  
  2632. local pc = NewPart(Vector3.new(1,1,1),CFrame.new(p + Vector3.new(0,1.5,0)) * CFrame.Angles(0,math.random(-10,10),0),BrickColor.new("Institutional white"),"SpecialMesh",Vector3.new(30,5,30))
  2633. pc.Mesh.MeshType="FileMesh"
  2634. pc.Anchored=true
  2635. pc.CanCollide=false
  2636. pc.Parent=workspace
  2637. pc.Mesh.MeshId="http://www.roblox.com/asset/?id=20329976"
  2638. pc.Name="Shockwave"
  2639. pc.Material="Neon"
  2640. game:GetService("Debris"):AddItem(pc,5)
  2641. coroutine.resume(coroutine.create(function(p)
  2642. for i=1, 20 do
  2643. p.Transparency=.5 + (i/(20/(1-.5)))
  2644. p.CFrame = p.CFrame * CFrame.Angles(0,math.rad(5 + i/10),0)
  2645. p.Mesh.Scale=p.Mesh.Scale + Vector3.new(i/6 + 8,0,i/6 + 8)
  2646. fwait()
  2647. end
  2648. p:Remove()
  2649. end),pc)
  2650.  
  2651. for LEL = 1, 3 do
  2652. local pc = NewPart(Vector3.new(1,1,1),CFrame.new(p + Vector3.new(0,0,0)),Col1,"SpecialMesh",Vector3.new(18,18,18)*LEL)
  2653. pc.Parent=workspace
  2654. pc.Mesh.MeshType="Sphere"
  2655. pc.Anchored=true
  2656. pc.CanCollide=false
  2657. pc.Transparency=1
  2658. game:GetService("Debris"):AddItem(pc,15)
  2659. pc.Material="Neon"
  2660. coroutine.resume(coroutine.create(function(p,V,x)
  2661. for i=1, 20 do
  2662. p.Mesh.Scale = p.Mesh.Scale * 1.05 + Vector3.new(1.5,1.5,1.5)
  2663.  
  2664. p.Transparency=.25 + (i/(20/(1-.25)))
  2665. p.CFrame = p.CFrame*V
  2666. fwait()
  2667. end
  2668. p:Remove()
  2669. end),pc,CFrame.fromEulerAnglesXYZ(0,math.rad(5),0))
  2670. end
  2671.  
  2672. for LEL = 1, 3 do
  2673. local pc = NewPart(Vector3.new(1,1,1),CFrame.new(p)*CFrame.fromEulerAnglesXYZ(math.random(-180,180),math.random(-180,180),math.random(-180,180)),Col1,"BlockMesh",Vector3.new(15,15,15)*LEL)
  2674. pc.Parent=workspace
  2675. pc.Anchored=true
  2676. pc.CanCollide=false
  2677. pc.Transparency=1
  2678. game:GetService("Debris"):AddItem(pc,15)
  2679. pc.Material="Neon"
  2680. coroutine.resume(coroutine.create(function(p,V,x)
  2681. for i=1, 12 do
  2682. p.Mesh.Scale = p.Mesh.Scale * 1.02 + Vector3.new(3.5,3.5,3.5)
  2683.  
  2684. p.Transparency=.1 + (i/(12/(1-.1)))
  2685. p.CFrame = p.CFrame*V
  2686. fwait()
  2687. end
  2688. p:Remove()
  2689. end),pc,CFrame.fromEulerAnglesXYZ(0,math.rad(5),0))
  2690. end
  2691.  
  2692. for LEL = 1,6 do
  2693. local pc = NewPart(Vector3.new(1,1,1),CFrame.new(p + Vector3.new(math.random(-50,50)/3,0,math.random(-50,50)/3)),Col1,"SpecialMesh",Vector3.new(7,9,7))
  2694. pc.Parent=workspace
  2695. pc.Mesh.MeshType="Sphere"
  2696. pc.Anchored=true
  2697. pc.CanCollide=false
  2698. pc.Transparency=1
  2699. game:GetService("Debris"):AddItem(pc,15)
  2700. pc.Material="Neon"
  2701. coroutine.resume(coroutine.create(function(p,V,x)
  2702. for i=1, 40 do
  2703. p.Mesh.Scale = Vector3.new(25 - i/2,30 * i,25 - i/2)
  2704.  
  2705. p.Transparency=.25 + (i/(40/(1-.25)))
  2706. p.CFrame = p.CFrame*V
  2707. fwait()
  2708. end
  2709. p:Remove()
  2710. end),pc,CFrame.fromEulerAnglesXYZ(0,math.rad(5),0))
  2711.  
  2712. if LEL%2==0 then
  2713. local pc = NewPart(Vector3.new(1,1,1),CFrame.new(p),Col1,"SpecialMesh",Vector3.new(10,15,10) + Vector3.new(2,3,2) * LEL)
  2714. pc.Parent=workspace
  2715. pc.Mesh.MeshType="Sphere"
  2716. pc.Anchored=true
  2717. pc.CanCollide=false
  2718. pc.Transparency=1
  2719. game:GetService("Debris"):AddItem(pc,15)
  2720. pc.Material="Neon"
  2721. coroutine.resume(coroutine.create(function(p,V,x)
  2722. for i=1, 40 do
  2723. p.Mesh.Scale = p.Mesh.Scale * 1.04 + Vector3.new(3.5 - i*.27,i,3.5 - i*.27)
  2724. p.Transparency=.33 + (i/(40/(1-.33)))
  2725. p.CFrame = p.CFrame*V
  2726. fwait()
  2727. end
  2728. p:Remove()
  2729. end),pc,CFrame.fromEulerAnglesXYZ(0,math.rad(5),0))
  2730. end
  2731. local pc = NewPart(Vector3.new(1,1,1),CFrame.new(p + Vector3.new(0,0,0))*CFrame.fromEulerAnglesXYZ(math.random(-180,180),math.random(-180,180),math.random(-180,180)),Col1,"BlockMesh",Vector3.new(20,20,20))
  2732. pc.Parent=workspace
  2733. pc.Anchored=true
  2734. pc.CanCollide=false
  2735. pc.Transparency=1
  2736. game:GetService("Debris"):AddItem(pc,15)
  2737. pc.Material="Neon"
  2738. coroutine.resume(coroutine.create(function(p,V,x)
  2739. for i=1, 60 do
  2740. p.Mesh.Scale = p.Mesh.Scale * 1.01 + Vector3.new(.6,.6,.6)
  2741.  
  2742. p.Transparency=.4 + (i/(60/(1-.4)))
  2743. p.CFrame = p.CFrame*V
  2744. fwait()
  2745. end
  2746. p:Remove()
  2747. end),pc,CFrame.fromEulerAnglesXYZ(math.rad(math.random(-50,50)/15),math.rad(math.random(-50,50)/15),math.rad(math.random(-50,50)/15)))
  2748. if LEL == 2 then
  2749. MagniDamage(soloc,50,38,42,45,"Normal",soloc,0,1,80,false,false,true,nil,nil,nil,nil)
  2750. if (vPlayer.Character.Torso.Position-p).magnitude <= 50 then
  2751. vPlayer.Character.Humanoid:TakeDamage(40 / vPlayer.Character.Stats.Defense.Value)
  2752. showDamage(vPlayer.Character,math.floor((40 / vPlayer.Character.Stats.Defense.Value)),"Damage")
  2753. vPlayer.Character.Stats.Stun.Value=100
  2754. end
  2755. end
  2756. fwait(1/15)
  2757. end
  2758. fwait()
  2759. for _,v in pairs(m:children()) do
  2760. if v.Name~="LasBerryBig" then
  2761. v:Remove()
  2762. end
  2763. end
  2764. end
  2765. end
  2766.  
  2767. function DecreaseStat(Model,Stat,Amount,Duration)
  2768. if Model:findFirstChild("Stats")~=nil then
  2769. if Model.Stats[Stat]~=nil then
  2770. Model.Stats[Stat].Value=Model.Stats[Stat].Value-Amount
  2771. d=Instance.new("NumberValue",Model.Stats.Decrease)
  2772. dur=Instance.new("NumberValue",d)
  2773. dur.Name="Duration"
  2774. dur.Value=Duration
  2775. game:GetService("Debris"):AddItem(d,20)
  2776. if Stat=="Damage" then
  2777. d.Name="DecreaseAtk"
  2778. elseif Stat=="Defense" then
  2779. d.Name="DecreaseDef"
  2780. elseif Stat=="Movement" then
  2781. d.Name="DecreaseMvmt"
  2782. end
  2783. if Model:findFirstChild("Torso")~=nil then
  2784. display=""
  2785. if Stat=="Damage" then
  2786. if Amount>0 then
  2787. display="-Damage"
  2788. else
  2789. display="+Damage"
  2790. end
  2791. elseif Stat=="Defense" then
  2792. if Amount>0 then
  2793. display="-Defense"
  2794. else
  2795. display="+Defense"
  2796. end
  2797. elseif Stat=="Movement" then
  2798. if Amount>0 then
  2799. display="-Movement"
  2800. else
  2801. display="+Movement"
  2802. end
  2803. end
  2804. showDamage(Model,display,"Debuff")
  2805. end
  2806. d.Value=Amount
  2807. end
  2808. end
  2809. end
  2810.  
  2811. function GetDist(Part1,Part2,magni)
  2812. local targ=Part1.Position-Part2.Position
  2813. local mag=targ.magnitude
  2814. if mag<=magni then
  2815. return true
  2816. else
  2817. return false
  2818. end
  2819. end
  2820.  
  2821. function MagniDamage(Part,magni,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration,Sound)
  2822. for _,c in pairs(workspace:children()) do
  2823. local hum=c:findFirstChild("Humanoid")
  2824. if hum~=nil then
  2825. local head=nil
  2826. for _,d in pairs(c:children()) do
  2827. --if d.Name=="Torso" or d.Name=="Head" or d.Name=="HumanoidRootPart" or d.Name=="HitPart" then
  2828. if d.className=="Model" and ranged~=true then
  2829. head=d:findFirstChild("Hitbox")
  2830. if d.Parent==Character then break end
  2831. if head~=nil then
  2832. local targ=head.Position-Part.Position
  2833. local mag=targ.magnitude
  2834. if mag<=magni and c.Name~=Player.Name then
  2835. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
  2836. ref.Anchored=true
  2837. ref.CFrame=cf(head.Position)
  2838. game:GetService("Debris"):AddItem(ref,1)
  2839. hitnum=math.random(1,5)
  2840. if hitnum==1 then so("199148971",ref,1,1)
  2841. elseif hitnum==2 then so("199149025",ref,1,1)
  2842. elseif hitnum==3 then so("199149072",ref,1,1)
  2843. elseif hitnum==4 then so("199149109",ref,1,1)
  2844. elseif hitnum==5 then so("199149119",ref,1,1)
  2845. end
  2846. StaggerHit.Value=true
  2847. end
  2848. end
  2849. end
  2850. if d.className=="Part" then
  2851. head=d
  2852. if head~=nil then
  2853. local targ=head.Position-Part.Position
  2854. local mag=targ.magnitude
  2855. if mag<=magni and c.Name~=Player.Name then
  2856. if stun==nil then
  2857. stun=math.random(5,10)
  2858. end
  2859. local Rang=nil
  2860. if Ranged==false then
  2861. Rang=true
  2862. end
  2863. local stag=nil
  2864. if shbash==true then
  2865. stag=true
  2866. end
  2867. Damagefunc(head,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration,Sound)
  2868. --Damagefunc(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,DecreaseState,DecreaseAmount,Duration)
  2869. end
  2870. end
  2871. end
  2872. end
  2873. end
  2874. end
  2875. end
  2876.  
  2877. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  2878. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  2879. end
  2880.  
  2881. local Point=Torso.CFrame*cf(0,Torso.Size.Y,0)
  2882. LastPoint=Point
  2883. function effect(Color,Ref,LP,P1,returnn)
  2884. if LP==nil or P1==nil then return end
  2885. local effectsmsh=Instance.new("CylinderMesh")
  2886. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  2887. effectsmsh.Name="Mesh"
  2888. local effectsg=Instance.new("Part")
  2889. NoOutline(effectsg)
  2890. effectsg.formFactor=3
  2891. effectsg.CanCollide=false
  2892. effectsg.Name="Eff"
  2893. effectsg.Locked=true
  2894. effectsg.Anchored=true
  2895. effectsg.Size=Vector3.new(0.5,1,0.5)
  2896. effectsg.Parent=workspace
  2897. effectsmsh.Parent=effectsg
  2898. effectsg.BrickColor=BrickColor.new(Color)
  2899. effectsg.Reflectance=Ref
  2900. local point1=P1
  2901. local mg=(LP.p - point1.p).magnitude
  2902. effectsg.Size=Vector3.new(0.5,mg,0.5)
  2903. effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  2904. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  2905. game:GetService("Debris"):AddItem(effectsg,2)
  2906. if returnn then return effectsg end
  2907. if not returnn then
  2908. table.insert(Effects,{effectsg,"Cylinder",0.2,0.01,0,0.01,effectsmsh})
  2909. end
  2910. end
  2911.  
  2912. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type)
  2913. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2914. prt.Anchored=true
  2915. prt.CFrame=cframe
  2916. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  2917. game:GetService("Debris"):AddItem(prt,10)
  2918. if Type==1 or Type==nil then
  2919. table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
  2920. elseif Type==2 then
  2921. table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh})
  2922. end
  2923. end
  2924.  
  2925. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2926. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2927. prt.Anchored=true
  2928. prt.CFrame=cframe
  2929. local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
  2930. game:GetService("Debris"):AddItem(prt,10)
  2931. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2932. end
  2933.  
  2934. function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2935. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  2936. prt.Anchored=true
  2937. prt.CFrame=cframe*cf(x2,y2,z2)
  2938. local msh=mesh("SpecialMesh",prt,"FileMesh","3270017",vt(0,0,0),vt(x1,y1,z1))
  2939. game:GetService("Debris"):AddItem(prt,10)
  2940. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2941. end
  2942.  
  2943. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2944. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2945. prt.Anchored=true
  2946. prt.CFrame=cframe
  2947. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  2948. game:GetService("Debris"):AddItem(prt,10)
  2949. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2950. end
  2951.  
  2952. function MagicCylinder2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2953. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2954. prt.Anchored=true
  2955. prt.CFrame=cframe
  2956. msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  2957. game:GetService("Debris"):AddItem(prt,5)
  2958. --table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3})
  2959. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2960. end
  2961.  
  2962. function ClangEffect(brickcolor,cframe,duration,decrease,size,power)
  2963. local prt=part(3,workspace,0,1,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2964. prt.Anchored=true
  2965. prt.CFrame=cframe
  2966. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(5,5,5))
  2967. game:GetService("Debris"):AddItem(prt,10)
  2968. table.insert(Effects,{prt,"CylinderClang",duration,decrease,size,power,prt.CFrame,nil})
  2969. end
  2970.  
  2971. function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2972. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2973. prt.Anchored=true
  2974. prt.CFrame=cframe
  2975. local msh=mesh("SpecialMesh",prt,"FileMesh","20329976",vt(0,0,0),vt(x1,y1,z1))
  2976. game:GetService("Debris"):AddItem(prt,10)
  2977. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2978. end
  2979.  
  2980. function MagicSpecial(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  2981. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  2982. prt.Anchored=true
  2983. prt.CFrame=cframe
  2984. local msh=mesh("SpecialMesh",prt,"FileMesh","24388358",vt(0,0,0),vt(x1,y1,z1))
  2985. game:GetService("Debris"):AddItem(prt,10)
  2986. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  2987. end
  2988.  
  2989. function ElecEffect(cff,x,y,z)
  2990. local prt=part(3,workspace,0,0,BrickColor.new("Dark stone grey"),"Part",vt(1,1,1))
  2991. prt.Anchored=true
  2992. prt.CFrame=cff*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
  2993. prt.CFrame=cf(prt.Position)
  2994. --prt.CFrame=cf(cff)*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
  2995. game:GetService("Debris"):AddItem(prt,10)
  2996. xval=math.random()/3
  2997. yval=math.random()/3
  2998. zval=math.random()/3
  2999. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(xval,yval,zval))
  3000. Effects[#Effects+1]={prt,"Elec",0.2,x,y,z,xval,yval,zval,msh} --part, type, delay
  3001. end
  3002.  
  3003. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration,Sound)
  3004. if hit.Parent==nil then
  3005. return
  3006. end
  3007. if hit.Name=="Hitbox" and hit.Parent~=modelzorz and ranged~=true then
  3008. ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt(0.2,0.2,0.2))
  3009. ref.Anchored=true
  3010. ref.CFrame=cf(hit.Position)
  3011. game:GetService("Debris"):AddItem(ref,1)
  3012. hitnum=math.random(1,5)
  3013. if hitnum==1 then so("199148971",ref,1,1)
  3014. elseif hitnum==2 then so("199149025",ref,1,1)
  3015. elseif hitnum==3 then so("199149072",ref,1,1)
  3016. elseif hitnum==4 then so("199149109",ref,1,1)
  3017. elseif hitnum==5 then so("199149119",ref,1,1)
  3018. end
  3019. StaggerHit.Value=true
  3020. end
  3021. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  3022. hit=hit.Parent.Parent:findFirstChild("Torso")
  3023. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  3024. end
  3025. if hit.Parent.className=="Hat" then
  3026. hit=hit.Parent.Parent:findFirstChild("Head")
  3027. end
  3028. h=hit.Parent:FindFirstChild("Humanoid")
  3029. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  3030. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  3031. if Player.Neutral==false then
  3032. if hit.Parent:findFirstChild("Alignment")~=nil then
  3033. if hit.Parent.Alignment.Value==Player.TeamColor.Color then return end
  3034. end
  3035. if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  3036. if game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor==Player.TeamColor then return end
  3037. end
  3038. end
  3039. if Sound=="Shatter" then
  3040. so("199146069",hit,1,1)
  3041. end
  3042. c=Instance.new("ObjectValue")
  3043. c.Name="creator"
  3044. c.Value=game:service("Players").LocalPlayer
  3045. c.Parent=h
  3046. RecentEnemy.Value=hit.Parent
  3047. game:GetService("Debris"):AddItem(c,.5)
  3048. minim=minim*Atk.Value
  3049. maxim=maxim*Atk.Value
  3050. Damage=0
  3051. if minim==maxim then
  3052. Damage=maxim
  3053. else
  3054. Damage=math.random(minim,maxim)
  3055. end
  3056. blocked=false
  3057. enblock=nil
  3058. Stats=hit.Parent:findFirstChild("Stats")
  3059. if Stats~=nil then
  3060. invis=Stats:findFirstChild("Invisibility")
  3061. isinvis=Stats:findFirstChild("IsInvisible")
  3062. if (ranged==false or ranged==nil) and invis~=nil and isinvis.Value==true then
  3063. invis.Value=0
  3064. end
  3065. enblock=Stats:findFirstChild("Block")
  3066. if enblock~=nil then
  3067. if enblock.Value==true then
  3068. blocked=true
  3069. end
  3070. end
  3071. if Stats:findFirstChild("Defense")~=nil then
  3072. Damage=Damage/(Stats.Defense.Value)
  3073. if Damage<=3 and (ranged==false or ranged==nil or Sound=="Slash") and blocked~=true then
  3074. hitnum=math.random(1,5)
  3075. if hitnum==1 then so("199149321",hit,1,1)
  3076. elseif hitnum==2 then so("199149338",hit,1,1)
  3077. elseif hitnum==3 then so("199149367",hit,1,1)
  3078. elseif hitnum==4 then so("199149409",hit,1,1)
  3079. elseif hitnum==5 then so("199149452",hit,1,1)
  3080. end
  3081. elseif (ranged==false or ranged==nil or Sound=="Slash") and blocked~=true then
  3082. hitnum=math.random(1,6)
  3083. if hitnum==1 then so("199149137",hit,1,1)
  3084. elseif hitnum==2 then so("199149186",hit,1,1)
  3085. elseif hitnum==3 then so("199149221",hit,1,1)
  3086. elseif hitnum==4 then so("199149235",hit,1,1)
  3087. elseif hitnum==5 then so("199149269",hit,1,1)
  3088. elseif hitnum==6 then so("199149297",hit,1,1)
  3089. end
  3090. end
  3091. if Damage<=3 and staghit==true then
  3092. if ranged~=true then
  3093. StaggerHit.Value=true
  3094. end
  3095. end
  3096. end
  3097. if Stats:findFirstChild("Stun")~=nil then
  3098. if blocked==true then
  3099. incstun=incstun/2
  3100. end
  3101. if Stats:FindFirstChild("StunThreshold") then
  3102. if Stats.Stun.Value<Stats.StunThreshold.Value then
  3103. Stats.Stun.Value=Stats.Stun.Value+incstun
  3104. end
  3105. else
  3106. Stats.Stun.Value=Stats.Stun.Value+incstun
  3107. end
  3108. end
  3109. if Stats:findFirstChild("Stagger")~=nil then
  3110. if stagger==true then
  3111. Stats.Stagger.Value=true
  3112. end
  3113. end
  3114. end
  3115. if blocked==true then
  3116. showDamage(hit.Parent,"Block","Damage")
  3117. if ranged~=true then
  3118. enblock.Value=false
  3119. Stagger.Value=true
  3120. hitnum=math.random(1,2)
  3121. if hitnum==1 then so("199148933",hit,1,1)
  3122. elseif hitnum==2 then so("199148947",hit,1,1)
  3123. end
  3124. end
  3125. if ranged==true and Sound=="Slash" then
  3126. hitnum=math.random(1,2)
  3127. if hitnum==1 then so("199148933",hit,1,1)
  3128. elseif hitnum==2 then so("199148947",hit,1,1)
  3129. end
  3130. end
  3131. else
  3132. Damage=math.floor(Damage)
  3133. coroutine.resume(coroutine.create(function(Hum,Dam)
  3134. damageFunc:InvokeServer(h,Damage)
  3135. end),h,Damage)
  3136. showDamage(hit.Parent,Damage,"Damage")
  3137. if DecreaseState~=nil then
  3138. if DecreaseState=="Shatter" then
  3139. DecreaseStat(hit.Parent,"Movement",DecreaseAmount,Duration)
  3140. DecreaseStat(hit.Parent,"Damage",DecreaseAmount,Duration)
  3141. else
  3142. DecreaseStat(hit.Parent,DecreaseState,DecreaseAmount,Duration)
  3143. end
  3144. end
  3145. if Type=="Knockdown" then
  3146. hum=hit.Parent.Humanoid
  3147. hum.PlatformStand=true
  3148. coroutine.resume(coroutine.create(function(HHumanoid)
  3149. fwait(1)
  3150. HHumanoid.PlatformStand=false
  3151. end),hum)
  3152. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  3153. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  3154. local bodvol=Instance.new("BodyVelocity")
  3155. bodvol.velocity=angle*knockback
  3156. bodvol.P=5000
  3157. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  3158. bodvol.Parent=hit
  3159. rl=Instance.new("BodyAngularVelocity")
  3160. rl.P=3000
  3161. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  3162. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  3163. rl.Parent=hit
  3164. game:GetService("Debris"):AddItem(bodvol,.5)
  3165. game:GetService("Debris"):AddItem(rl,.5)
  3166. elseif Type=="Shatter" then
  3167. for i=1,10 do
  3168. BreakEffect(BrickColor.new("Cyan"),hit.CFrame,math.random(20,80)/100,math.random(2,10),math.random(20,80)/100)
  3169. end
  3170. elseif Type=="Knockdown2" then
  3171. hum=hit.Parent.Humanoid
  3172. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  3173. local bodvol=Instance.new("BodyVelocity")
  3174. bodvol.velocity=angle*knockback
  3175. bodvol.P=5000
  3176. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  3177. bodvol.Parent=hit
  3178. game:GetService("Debris"):AddItem(bodvol,.5)
  3179. elseif Type=="Normal" then
  3180. vp=Instance.new("BodyVelocity")
  3181. vp.P=500
  3182. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  3183. if KnockbackType==1 then
  3184. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  3185. elseif KnockbackType==2 then
  3186. vp.velocity=Property.CFrame.lookVector*knockback
  3187. end
  3188. game:GetService("Debris"):AddItem(vp,.5)
  3189. if knockback>0 then
  3190. vp.Parent=hit.Parent.Torso
  3191. end
  3192. end
  3193. end
  3194. debounce=Instance.new("BoolValue")
  3195. debounce.Name="DebounceHit"
  3196. debounce.Parent=hit.Parent
  3197. debounce.Value=true
  3198. game:GetService("Debris"):AddItem(debounce,Delay)
  3199. c=Instance.new("ObjectValue")
  3200. c.Name="creator"
  3201. c.Value=Player
  3202. c.Parent=h
  3203. game:GetService("Debris"):AddItem(c,.5)
  3204. CRIT=false
  3205. end
  3206. end
  3207.  
  3208. showDamage=function(Char,Dealt,Type)
  3209. m=Instance.new("Model")
  3210. m.Name="Effect"
  3211. c=Instance.new("Part")
  3212. c.Transparency=1
  3213. c.Name="Head"
  3214. c.TopSurface=0
  3215. c.BottomSurface=0
  3216. c.formFactor="Plate"
  3217. c.Size=Vector3.new(1,.4,1)
  3218. local b=Instance.new("BillboardGui",c)
  3219. b.Size=UDim2.new(5,0,5,0)
  3220. b.AlwaysOnTop=true
  3221. damgui=gui("TextLabel",b,tostring(Dealt),1,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(1,0,1,0))
  3222. if Type=="Damage" then
  3223. damgui.Font="SourceSans"
  3224. if Dealt=="Block" then
  3225. damgui.TextColor3=BrickColor.new("Bright blue").Color
  3226. elseif Dealt<3 then
  3227. damgui.TextColor3=BrickColor.new("White").Color
  3228. elseif Dealt>=3 and Dealt<20 then
  3229. damgui.TextColor3=BrickColor.new("Bright yellow").Color
  3230. else
  3231. damgui.TextColor3=BrickColor.new("Plum").Color
  3232. damgui.Font="SourceSansBold"
  3233. end
  3234. elseif Type=="Debuff" then
  3235. damgui.TextColor3=BrickColor.new("White").Color
  3236. elseif Type=="Interrupt" then
  3237. damgui.TextColor3=BrickColor.new("New Yeller").Color
  3238. end
  3239. --damgui.FontSize="Size48"
  3240. damgui.TextScaled=true
  3241. ms=Instance.new("CylinderMesh")
  3242. ms.Scale=Vector3.new(.8,.8,.8)
  3243. ms.Parent=c
  3244. c.Reflectance=0
  3245. Instance.new("BodyGyro").Parent=c
  3246. c.Parent=m
  3247. if Char:findFirstChild("Head")~=nil then
  3248. c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
  3249. elseif Char.Parent:findFirstChild("Head")~=nil then
  3250. c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
  3251. end
  3252. f=Instance.new("BodyPosition")
  3253. f.P=2000
  3254. f.D=100
  3255. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  3256. if Type=="Damage" then
  3257. f.position=c.Position+Vector3.new(0,3,0)
  3258. elseif Type=="Debuff" or Type=="Interrupt" then
  3259. f.position=c.Position+Vector3.new(0,5,0)
  3260. end
  3261. f.Parent=c
  3262. game:GetService("Debris"):AddItem(m,5)
  3263. table.insert(Effects,{m,"showDamage",damgui,f,10,1,15,50,100})
  3264. c.CanCollide=false
  3265. m.Parent=workspace
  3266. c.CanCollide=false
  3267. end
  3268.  
  3269. combo=0
  3270. function ob1d(mouse)
  3271. if MMouse.Target~=nil then
  3272. if MMouse.Target.Parent:findFirstChild("Humanoid")~=nil and game.Players:GetPlayerFromCharacter(MMouse.Target.Parent)~=nil then
  3273. if Player.Neutral==false and game.Players:GetPlayerFromCharacter(MMouse.Target.Parent).TeamColor==Player.TeamColor then
  3274. if givingrailgun==true then
  3275. RailgunTarget=MMouse.Target.Parent.HumanoidRootPart
  3276. givingarmor=false
  3277. end
  3278. if givingplasma==true then
  3279. CannonTarget=MMouse.Target.Parent.HumanoidRootPart
  3280. givingarmor=false
  3281. end
  3282. if givingblades==true then
  3283. BladesTarget=MMouse.Target.Parent.HumanoidRootPart
  3284. givingarmor=false
  3285. end
  3286. end
  3287. end
  3288. end
  3289. if attack==true or equipped==false then return end
  3290. hold=true
  3291. if BladesTarget~=nil then
  3292. coroutine.resume(coroutine.create(function()
  3293. if combo==0 then
  3294. bladesattackone()
  3295. elseif combo==1 then
  3296. bladesattackthree()
  3297. elseif combo==2 then
  3298. bladesattacktwo()
  3299. elseif combo==3 then
  3300. bladesattackfour()
  3301. end
  3302. end))
  3303. end
  3304. if combo==0 then
  3305. combo=1
  3306. attackone()
  3307. elseif combo==1 then
  3308. combo=2
  3309. attacktwo()
  3310. elseif combo==2 then
  3311. combo=3
  3312. attackthree()
  3313. elseif combo==3 then
  3314. combo=0
  3315. attackfour()
  3316. end
  3317. if RailgunTarget~=nil then
  3318. ShootRailGun()
  3319. end
  3320. if CannonTarget~=nil then
  3321. ShootCannon()
  3322. end
  3323. coroutine.resume(coroutine.create(function()
  3324. for i=1,50 do
  3325. if attack==false then
  3326. fwait()
  3327. end
  3328. end
  3329. if attack==false then
  3330. combo=0
  3331. end
  3332. end))
  3333. end
  3334.  
  3335. function ob1u(mouse)
  3336. hold = false
  3337. end
  3338.  
  3339. buttonhold = false
  3340.  
  3341. fenbarmove1.MouseButton1Click:connect(do1)
  3342. fenbarmove2.MouseButton1Click:connect(do2)
  3343. fenbarmove3.MouseButton1Click:connect(do3)
  3344. fenbarmove4.MouseButton1Click:connect(do4)
  3345. eul=0
  3346. equipped=false
  3347. function key(key)
  3348. if key=="z" then
  3349. if givingarmor==true then
  3350. do1()
  3351. end
  3352. end
  3353. if key=="x" then
  3354. if givingarmor==true then
  3355. do2()
  3356. end
  3357. end
  3358. if key=="c" then
  3359. if givingarmor==true then
  3360. do3()
  3361. end
  3362. end
  3363. if attack==true then return end
  3364. if key=="f" then
  3365. pressedf=true
  3366. fnumb=0
  3367. attack=true
  3368. if equipped==false then
  3369. equipped=true
  3370. RSH=ch.Torso["Right Shoulder"]
  3371. LSH=ch.Torso["Left Shoulder"]
  3372. --
  3373. RSH.Parent=nil
  3374. LSH.Parent=nil
  3375. --
  3376. RW.Name="Right Shoulder"
  3377. RW.Part0=ch.Torso
  3378. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  3379. RW.C1=cf(0, 0.5, 0)
  3380. RW.Part1=ch["Right Arm"]
  3381. RW.Parent=ch.Torso
  3382. --
  3383. LW.Name="Left Shoulder"
  3384. LW.Part0=ch.Torso
  3385. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  3386. LW.C1=cf(0, 0.5, 0)
  3387. LW.Part1=ch["Left Arm"]
  3388. LW.Parent=ch.Torso
  3389. --
  3390. Animate.Parent=nil
  3391. animTrack:Play()
  3392. equipanim()
  3393. else
  3394. equipped=false
  3395. hideanim()
  3396. LH.C1=LHC1
  3397. RH.C1=RHC1
  3398. animTrack:Stop()
  3399. Animate.Parent=Character
  3400. fwait(0)
  3401. RW.Parent=nil
  3402. LW.Parent=nil
  3403. RSH.Parent=player.Character.Torso
  3404. LSH.Parent=player.Character.Torso
  3405. end
  3406. attack=false
  3407. end
  3408. if equipped==false then return end
  3409. --[[if key=="q" then
  3410. attack=true
  3411. for i=0,1,0.1 do
  3412. fwait()
  3413. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1)*euler(.2,0,0),.3)
  3414. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1),.3)
  3415. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.7,0,0)*euler(0,0,-.5),.3)
  3416. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3417. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.3,0,0)*euler(0,0,.8),.3)
  3418. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3419. RH.C0=clerp(RH.C0,cf(.6,-1,.5)*euler(0,1.57,0)*euler(0,-1,-.1),.3)
  3420. LH.C0=clerp(LH.C0,cf(-.6,-1,-.5)*euler(0,-1.57,0)*euler(0,-1,.4),.3)
  3421. end
  3422. fwait(200)
  3423. attack=false
  3424. end]]
  3425. if key=="e" then
  3426. StatConvert()
  3427. end
  3428. if key=="z" then
  3429. do1()
  3430. end
  3431. if key=="x" then
  3432. do2()
  3433. end
  3434. if key=="c" then
  3435. do3()
  3436. end
  3437. if key=="v" then
  3438. do4()
  3439. end
  3440. end
  3441.  
  3442. function key2(key)
  3443.  
  3444.  
  3445. end
  3446.  
  3447. function s(mouse)
  3448. mouse.Button1Down:connect(function() ob1d(mouse) end)
  3449. mouse.Button1Up:connect(function() ob1u(mouse) end)
  3450. mouse.KeyDown:connect(key)
  3451. mouse.KeyUp:connect(key2)
  3452.  
  3453. player=Player
  3454. ch=Character
  3455. --MMouse=mouse
  3456. end
  3457.  
  3458. function ds(mouse)
  3459. --MMouse=nil
  3460. end
  3461.  
  3462. Bin.Selected:connect(s)
  3463. Bin.Deselected:connect(ds)
  3464. print("Mechanic loaded.")
  3465.  
  3466. local mananum=0
  3467. local blocknum2=0
  3468. local donum=0
  3469. local stunnum=0
  3470. local staggeranim=false
  3471. local stunanim=false
  3472. local Point=nil
  3473. local LastPoint=nil
  3474. local walk=0
  3475. local walkforw=true
  3476. while true do
  3477. fwait()
  3478. if Humanoid.Health<=0 then
  3479. attack=true
  3480. resumeControl()
  3481. modelzorz.Parent=workspace
  3482. game:GetService("Debris"):AddItem(modelzorz,30)
  3483. for i=1,#Weapon do
  3484. Weapon[i].Parent=modelzorz
  3485. Weapon[i].CanCollide=true
  3486. end
  3487. for i=1,#Welds do
  3488. if Welds[i].Part0.Parent==Character or Welds[i].Part1.Parent==Character then
  3489. Welds[i].Parent=nil
  3490. else
  3491. Welds[i].Parent=prt1
  3492. end
  3493. end
  3494. end
  3495. if fnumb<21 then
  3496. fnumb=fnumb+1
  3497. if pressedf==false then
  3498. fenframe5.BackgroundTransparency=fenframe5.BackgroundTransparency-.025
  3499. tellbar.TextTransparency=tellbar.TextTransparency-.05
  3500. tellbar.TextStrokeTransparency=tellbar.TextStrokeTransparency-.05
  3501. else
  3502. if fnumb==20 then
  3503. fenframe5.Parent=nil
  3504. print("daigui")
  3505. end
  3506. fenframe5.BackgroundTransparency=fenframe5.BackgroundTransparency+.025
  3507. tellbar.TextTransparency=tellbar.TextTransparency+.05
  3508. tellbar.TextStrokeTransparency=tellbar.TextStrokeTransparency+.05
  3509. end
  3510. end
  3511. if hbwld.Parent==nil then
  3512. hitbox2.Name="Hitbox"
  3513. else
  3514. hitbox2.Name="Hitbox2"
  3515. end
  3516. hitbox2.Parent=hitbox.Parent
  3517. hitbox2.Size=hitbox.Size
  3518. hitbox2.CFrame=hitboxCF
  3519. hboxpos.position=hitbox2.Position+vt(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100)
  3520. if cooldowns[1]>=cooldownmax and RailgunTarget~=nil then
  3521. MagicSpecial(BrickColor.new(NewCol),rprt1.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,.5,.5,.5,.05)
  3522. for i=1,5 do
  3523. ElecEffect(cf(rprt1.Position),3,3,3)
  3524. end
  3525. RailgunTarget=nil
  3526. model1.Parent=nil
  3527. end
  3528. if cooldowns[2]>=cooldownmax and CannonTarget~=nil then
  3529. print("daicannon")
  3530. print(cooldowns[2])
  3531. print(CannonTarget)
  3532. MagicSpecial(BrickColor.new(NewCol),pprt1.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,.5,.5,.5,.05)
  3533. for i=1,5 do
  3534. ElecEffect(cf(pprt1.Position),3,3,3)
  3535. end
  3536. CannonTarget=nil
  3537. model2.Parent=nil
  3538. end
  3539. if cooldowns[3]>=cooldownmax and BladesTarget~=nil then
  3540. print("daiblades")
  3541. print(cooldowns[3])
  3542. print(BladesTarget)
  3543. MagicSpecial(BrickColor.new(NewCol),bprt1.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,.3,.3,.3,.05)
  3544. MagicSpecial(BrickColor.new(NewCol),bprt7.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,.3,.3,.3,.05)
  3545. MagicSpecial(BrickColor.new(NewCol),bprt13.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,.3,.3,.3,.05)
  3546. for i=1,5 do
  3547. ElecEffect(cf(bref.Position),3,3,3)
  3548. end
  3549. BladesTarget=nil
  3550. model3.Parent=nil
  3551. end
  3552. if MMouse~=nil then
  3553. if model1.Parent~=nil then
  3554. local mpos = rprt1.CFrame*euler(0,0,0)--*CFrame.new(3,-1,-0.2) -- thx doogle <3
  3555. local cff = CFrame.new(mpos.p,MMouse.Hit.p) * CFrame.Angles(math.pi/2,0,0)
  3556. local x,y,z = rprt1.CFrame:toObjectSpace(cff):toEulerAnglesXYZ()
  3557. rwld1.Part1=RailgunTarget
  3558. rwld1.C0=euler(0,0,0)*cf(3,-1,-0.2)
  3559. rwld2.Part0=rprt1
  3560. rwld2.Part1=rprt2
  3561. rwld2.C0=clerp(rwld2.C0,CFrame.Angles(x,y,z)*euler(-1.57,0,0),.3)
  3562. end
  3563. if model2.Parent~=nil then
  3564. local mpos = pprt1.CFrame*euler(0,0,0)--*CFrame.new(3,-1,-0.2) -- thx doogle <3
  3565. local cff = CFrame.new(mpos.p,MMouse.Hit.p) * CFrame.Angles(math.pi/2,0,0)
  3566. local x,y,z = pprt1.CFrame:toObjectSpace(cff):toEulerAnglesXYZ()
  3567. pwld1.Part1=CannonTarget
  3568. pwld1.C0=euler(0,0,0)*cf(-3,-1,-0.2)
  3569. pwld2.Part0=pprt1
  3570. pwld2.Part1=pprt2
  3571. pwld2.C0=clerp(pwld2.C0,CFrame.Angles(x,y,z)*euler(-1.57,0,0),.3)
  3572. end
  3573. else
  3574. pwld1.C0=clerp(pwld1.C0,euler(-0.2,0,0)*cf(-3,-1,-0.2),.5)
  3575. pwld2.C0=clerp(pwld2.C0,euler(0,0,0)*cf(0,0,0),.5)
  3576. rwld1.C0=clerp(rwld1.C0,euler(-0.2,0,0)*cf(3,-1,-0.2),.5)
  3577. rwld2.C0=clerp(rwld2.C0,euler(0,0,0)*cf(0,0,0),.5)
  3578. end
  3579. if Stagger.Value==true and staggeranim==false then
  3580. coroutine.resume(coroutine.create(function()
  3581. staggeranim=true
  3582. while attack==true do
  3583. fwait()
  3584. end
  3585. StaggerAnim()
  3586. StaggerHit.Value=false
  3587. Stagger.Value=false
  3588. staggeranim=false
  3589. end))
  3590. end
  3591. if StaggerHit.Value==true and staggeranim==false then
  3592. coroutine.resume(coroutine.create(function()
  3593. staggeranim=true
  3594. while attack==true do
  3595. fwait()
  3596. end
  3597. StaggerHitt()
  3598. StaggerHit.Value=false
  3599. Stagger.Value=false
  3600. staggeranim=false
  3601. end))
  3602. end
  3603. if Mvmt.Value<0 or Stagger.Value==true or Stun.Value>=StunT.Value or StaggerHit.Value==true or Rooted.Value==true then
  3604. Humanoid.WalkSpeed=0
  3605. else
  3606. Humanoid.WalkSpeed=16*Mvmt.Value
  3607. end
  3608. if Stun.Value>=StunT.Value and stunanim==false then
  3609. coroutine.resume(coroutine.create(function()
  3610. stunanim=true
  3611. while attack==true do
  3612. fwait()
  3613. end
  3614. StunAnim()
  3615. Stun.Value=0
  3616. stunanim=false
  3617. end))
  3618. end
  3619. local stunnum2=30
  3620. if stunnum>=stunnum2 then
  3621. if Stun.Value>0 then
  3622. Stun.Value=Stun.Value-1
  3623. end
  3624. stunnum=0
  3625. end
  3626. stunnum=stunnum+1
  3627. if donum>=.5 then
  3628. handidle=true
  3629. elseif donum<=0 then
  3630. handidle=false
  3631. end
  3632. if handidle==false then
  3633. donum=donum+0.006
  3634. else
  3635. donum=donum-0.006
  3636. end
  3637. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  3638. local velderp=RootPart.Velocity.y
  3639. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  3640. if equipped==true then
  3641. if attack==false then
  3642. idle=idle+1
  3643. else
  3644. idle=0
  3645. end
  3646. if idle>=500 then
  3647. if attack==false then
  3648. --Sheath()
  3649. end
  3650. end
  3651. if Anim=="Walk" then
  3652. if walkforw==true then
  3653. RH.C1=clerp(RH.C1,RHC1*cf(.2,-.2,0)*euler(0,0,1),(Mvmt.Value*10)/50)
  3654. LH.C1=clerp(LH.C1,LHC1*cf(.1,.2,0)*euler(0,0,1),(Mvmt.Value*10)/50)
  3655. else
  3656. RH.C1=clerp(RH.C1,RHC1*cf(-.1,.2,0)*euler(0,0,-1),(Mvmt.Value*10)/50)
  3657. LH.C1=clerp(LH.C1,LHC1*cf(-.2,-.2,0)*euler(0,0,-1),(Mvmt.Value*10)/50)
  3658. end
  3659. else
  3660. RH.C1=clerp(RH.C1,RHC1,.2)
  3661. LH.C1=clerp(LH.C1,LHC1,.2)
  3662. end
  3663. if tribladesattack==false then
  3664. bwld1.C0=clerp(bwld1.C0,euler(0,0,0)*cf(2,-0.6,-2),.4)
  3665. bwld7.C0=clerp(bwld7.C0,euler(0,0,0)*cf(0,-0.6,-2),.4)
  3666. bwld13.C0=clerp(bwld13.C0,euler(0,0,0)*cf(-2,-0.6,-2),.4)
  3667. bwld2.C0=clerp(bwld2.C0,euler(3.14,-2,1.57-0.4)*cf(0,0,0),.4)
  3668. bwld8.C0=clerp(bwld8.C0,euler(3.14,-2,1.57)*cf(0,0,0),.4)
  3669. bwld14.C0=clerp(bwld14.C0,euler(3.14,-2,1.57+0.4)*cf(0,0,0),.4)
  3670. brefwld.C0=clerp(brefwld.C0,euler(0,0,0)*cf(0,-2,0),.4)
  3671. end
  3672. if RootPart.Velocity.y > 1 and hitfloor==nil then
  3673. Anim="Jump"
  3674. if attack==false then
  3675. Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.2)
  3676. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.2)
  3677. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.1,0,0),.2)
  3678. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,0.5),.2)
  3679. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  3680. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(2,0,1.2),.2)
  3681. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  3682. RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
  3683. LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
  3684. end
  3685. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  3686. Anim="Fall"
  3687. if attack==false then
  3688. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.2)
  3689. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.2)
  3690. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.1,0,0),.2)
  3691. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-0.3,0,0.2),.2)
  3692. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  3693. LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(-.3,0,-.2),.2)
  3694. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  3695. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
  3696. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
  3697. end
  3698. elseif torvel<1 and hitfloor~=nil then
  3699. Anim="Idle"
  3700. if attack==false then
  3701. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5)*euler(.1,0,0),.15)
  3702. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.5),.15)
  3703. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.3,0,.2)*euler(0,-1.57,0),.15)
  3704. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.15)
  3705. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-.4+(donum/3)),.15)
  3706. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.15)
  3707. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.5,-.1),.2)
  3708. LH.C0=clerp(LH.C0,cf(-.8,-1,.2)*euler(0,-1.57,0)*euler(0,.5,.05),.2)
  3709. end
  3710. elseif torvel>2 and torvel<30 and hitfloor~=nil then
  3711. Anim="Walk"
  3712. walk=walk+1
  3713. if walk>=15-(5*Mvmt.Value) then
  3714. walk=0
  3715. if walkforw==true then
  3716. walkforw=false
  3717. elseif walkforw==false then
  3718. walkforw=true
  3719. end
  3720. end
  3721. if attack==false then
  3722. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  3723. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  3724. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.2),.3)
  3725. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3726. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.2),.3)
  3727. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  3728. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0),.2)
  3729. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0),.2)
  3730. end
  3731. elseif torvel>=30 and hitfloor~=nil then
  3732. Anim="Run"
  3733. if attack==false then
  3734. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,-.2),.4)
  3735. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.5)*euler(.8,0,.2),.4)
  3736. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,.2),.4)
  3737. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  3738. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.2,0,-0.4),.4)
  3739. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  3740. RH.C0=clerp(RH.C0,RHC0*cf(1,1,.2)*euler(0,-.2,-.5),.4)
  3741. LH.C0=clerp(LH.C0,LHC0*cf(-0.5,1,0)*euler(.2,0,-.5),.4)
  3742. end
  3743. end
  3744. end
  3745. if #Effects>0 then
  3746. --table.insert(Effects,{prt,"Block1",delay})
  3747. for e=1,#Effects do
  3748. if Effects[e]~=nil then
  3749. --for j=1,#Effects[e] do
  3750. local Thing=Effects[e]
  3751. if Thing~=nil then
  3752. local Part=Thing[1]
  3753. local Mode=Thing[2]
  3754. local Delay=Thing[3]
  3755. local IncX=Thing[4]
  3756. local IncY=Thing[5]
  3757. local IncZ=Thing[6]
  3758. if Thing[2]=="CylinderClang" then
  3759. if Thing[3]<=1 then
  3760. Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0)
  3761. Thing[7]=Thing[1].CFrame
  3762. effect("New Yeller",0,Thing[8],Thing[7])
  3763. Thing[8]=Thing[7]
  3764. Thing[3]=Thing[3]+Thing[4]
  3765. else
  3766. Part.Parent=nil
  3767. table.remove(Effects,e)
  3768. end
  3769. --[[Mesh=Thing[7]
  3770. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  3771. Thing[1].Transparency=Thing[1].Transparency+Thing[3]]
  3772. end
  3773. if Thing[2]=="showDamage" then
  3774. if Thing[6]<Thing[5] then
  3775. Thing[6]=Thing[6]+1
  3776. elseif Thing[6]<Thing[7] then
  3777. Thing[4].position=Thing[4].position+vt(0,-.2,0)
  3778. Thing[6]=Thing[6]+1
  3779. elseif Thing[6]<Thing[8] then
  3780. Thing[6]=Thing[6]+1
  3781. elseif Thing[6]<Thing[9] then
  3782. Thing[6]=Thing[6]+1
  3783. Thing[4].position=Thing[4].position+vt(0,.2,0)
  3784. Thing[3].TextStrokeTransparency=Thing[3].TextStrokeTransparency+.1
  3785. Thing[3].TextTransparency=Thing[3].TextTransparency+.1
  3786. else
  3787. Thing[1].Parent=nil
  3788. table.remove(Effects,e)
  3789. end
  3790. end
  3791. if Thing[2]=="Shoot" then
  3792. if CannonTarget==nil then
  3793. table.remove(Effects,e)
  3794. else
  3795. --table.insert(Effects,{gprt16.CFrame.lookVector,"Shoot",30,gprt8.Position})
  3796. local MainPos=Thing[1]
  3797. local MainPos2=Thing[4]
  3798. local MouseLook=cf((MainPos+MainPos2)/2,MainPos2)
  3799. local hit,pos = rayCast(MainPos,MouseLook.lookVector,10,CannonTarget.Parent)
  3800. local mag=(Thing[1]-pos).magnitude
  3801. MagicCylinder2(Color2,CFrame.new((Thing[1]+pos)/2,pos)*angles(1.57,0,0),3,mag*5,3,1.5,0,1.5,0.1)
  3802. --MagicHead(BrickColor.new("Really red"),CFrame.new((Thing[4]+pos)/2,pos)*angles(1.57,0,0),1,mag*5,1,.5,0,.5,0.1)
  3803. Thing[1]=Thing[1]+(MouseLook.lookVector*10)
  3804. Thing[3]=Thing[3]-1
  3805. if hit~=nil then
  3806. Thing[3]=0
  3807. Damagefunc(hit,8,10,0,"Normal",RootPart,0,2,math.random(1,5),false,false,true,"Damage",.1,200)
  3808. ref=part(3,workspace,0,1,Color2,"Reference",vt())
  3809. ref.Anchored=true
  3810. ref.CFrame=cf(pos)
  3811. so("169445602",ref,1,0.8)
  3812. so("153092334",ref,1,0.8)
  3813. MagicBlock(Color2,cf(pos),20,20,20,5,5,5,0.05)
  3814. game:GetService("Debris"):AddItem(ref,1)
  3815. MagniDamage(ref,10,6,9,0,"Normal",ref,0,1,math.random(1,5),nil,nil,true,"Damage",.05,200)
  3816. end
  3817. if Thing[3]<=0 then
  3818. table.remove(Effects,e)
  3819. end
  3820. end
  3821. end
  3822. if Thing[2]~="DecreaseStat" and Thing[2]~="showDamage" and Thing[2]~="Shoot" then
  3823. if Thing[1].Transparency<=1 then
  3824. if Thing[2]=="Block1" then
  3825. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  3826. Mesh=Thing[7]
  3827. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  3828. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3829. elseif Thing[2]=="Ice" then
  3830. --prt,"Ice",delay,msh,1,.2
  3831. if Thing[6]<=Thing[5] then
  3832. Thing[6]=Thing[6]+.3
  3833. Thing[1].CFrame=Thing[1].CFrame*cf(0,1,0)
  3834. else
  3835. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3836. end
  3837. elseif Thing[2]=="Shatter" then
  3838. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3839. Thing[4]=Thing[4]*cf(0,Thing[7],0)
  3840. Thing[1].CFrame=Thing[4]*euler(Thing[6],0,0)
  3841. --Thing[1].CFrame=Thing[1].CFrame
  3842. Thing[6]=Thing[6]+Thing[5]
  3843. elseif Thing[2]=="Block2" then
  3844. Thing[1].CFrame=Thing[1].CFrame
  3845. Mesh=Thing[7]
  3846. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  3847. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3848. elseif Thing[2]=="Cylinder" then
  3849. Mesh=Thing[7]
  3850. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  3851. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3852. elseif Thing[2]=="Blood" then
  3853. Mesh=Thing[7]
  3854. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  3855. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  3856. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3857. elseif Thing[2]=="Elec" then
  3858. Mesh=Thing[10]
  3859. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  3860. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3861. elseif Thing[2]=="Disappear" then
  3862. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  3863. end
  3864. else
  3865. Part.Parent=nil
  3866. table.remove(Effects,e)
  3867. end
  3868. end
  3869. end
  3870. --end
  3871. end
  3872. end
  3873. end
  3874. fenbarmana2:TweenSize(UDim2.new(.4,0,-4*mana.Value/100,0),nil,1,0.4,true)
  3875. fenbarmana4.Text="Mana("..mana.Value..")"
  3876. fenbarhp2.BackgroundColor3=Color3.new(Humanoid.Health/Humanoid.MaxHealth,0,0)
  3877. fenbarhp2:TweenSize(UDim2.new(Humanoid.Health/Humanoid.MaxHealth,0,1,0),nil,1,0.4,true)
  3878. fenbarhp3.Text="("..math.floor(Humanoid.Health)..")"
  3879. fenbarmove1b:TweenSize(UDim2.new(1*cooldowns[1]/cooldownmax,0,1,0),nil,1,0.4,true)
  3880. fenbarmove2b:TweenSize(UDim2.new(1*cooldowns[2]/cooldownmax,0,1,0),nil,1,0.4,true)
  3881. fenbarmove3b:TweenSize(UDim2.new(1*cooldowns[3]/cooldownmax,0,1,0),nil,1,0.4,true)
  3882. fenbarmove4b:TweenSize(UDim2.new(1*cooldowns[4]/cooldownmax,0,1,0),nil,1,0.4,true)
  3883. for _,c in pairs(Decrease:children()) do
  3884. if c:findFirstChild("Duration")~=nil then
  3885. c.Duration.Value=c.Duration.Value-1
  3886. if c.Duration.Value<=0 then
  3887. c.Parent=nil
  3888. end
  3889. end
  3890. if c.Name=="DecreaseAtk" then
  3891. decreaseatk=decreaseatk+c.Value
  3892. elseif c.Name=="DecreaseDef" then
  3893. decreasedef=decreasedef+c.Value
  3894. elseif c.Name=="DecreaseMvmt" then
  3895. decreasemvmt=decreasemvmt+c.Value
  3896. end
  3897. end
  3898. Atk.Value=1-decreaseatk
  3899. if Atk.Value<=0 then
  3900. Atk.Value=0
  3901. end
  3902. Def.Value=1-decreasedef
  3903. if Def.Value<=0 then
  3904. Def.Value=0.01
  3905. end
  3906. Mvmt.Value=1-decreasemvmt
  3907. if Mvmt.Value<=0 then
  3908. Mvmt.Value=0
  3909. end
  3910. decreaseatk=0
  3911. decreasedef=0
  3912. decreasemvmt=0
  3913. AtkVal=Atk.Value*200
  3914. AtkVal=math.floor(AtkVal)
  3915. AtkVal=AtkVal/200
  3916. fenbardamage.Text="Damage\
  3917. ("..(AtkVal)..")"
  3918. DefVal=Def.Value*5000
  3919. DefVal=math.floor(DefVal)
  3920. DefVal=DefVal/5000
  3921. fenbardef.Text="Defense\
  3922. ("..(DefVal)..")"
  3923. MvmtVal=Mvmt.Value*135
  3924. MvmtVal=math.floor(MvmtVal)
  3925. MvmtVal=MvmtVal/135
  3926. if Rooted.Value==true then MvmtVal=0 end
  3927. fenbarmove.Text="Walkspeed\
  3928. ("..(MvmtVal)..")"
  3929. if Stun.Value>=StunT.Value then
  3930. fenbarstun2:TweenSize(UDim2.new(.4,0,-4,0),nil,1,0.4,true)
  3931. else
  3932. fenbarstun2:TweenSize(UDim2.new(.4,0,-4*Stun.Value/StunT.Value,0),nil,1,0.4,true)
  3933. end
  3934. fenbarstun3.Text="Stun("..Stun.Value..")"
  3935. if mana.Value>=100 then
  3936. mana.Value=100
  3937. else
  3938. if mananum<=11 then
  3939. mananum=mananum+50
  3940. elseif mananum>=8 then
  3941. mananum=0
  3942. mana.Value=mana.Value+50
  3943. end
  3944. end
  3945. --[[if cooldown1>=cooldownmax then
  3946. cooldown1=cooldownmax
  3947. else
  3948. cooldown1=cooldown1+cooldownadd1
  3949. end]]
  3950. for i=1,#cooldowns do
  3951. if cooldowns[i]>=cooldownmax then
  3952. cooldowns[i]=cooldownmax
  3953. else
  3954. cooldowns[i]=cooldowns[i]+cooldownsadd[i]
  3955. end
  3956. end
  3957. end
  3958.  
  3959. --[[
  3960. Copyrighted (C) Fenrier 2015
  3961. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement