colddddda

Untitled

Jun 9th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 65.01 KB | None | 0 0
  1.  
  2.  
  3. --[[
  4. Made by Fenrier.
  5. ]]
  6. Player=game:GetService("Players").LocalPlayer
  7. Character=Player.Character
  8. PlayerGui=Player.PlayerGui
  9. Backpack=Player.Backpack
  10. Torso=Character.Torso
  11. Head=Character.Head
  12. Humanoid=Character.Humanoid
  13. LeftArm=Character["Left Arm"]
  14. LeftLeg=Character["Left Leg"]
  15. RightArm=Character["Right Arm"]
  16. RightLeg=Character["Right Leg"]
  17. LS=Torso["Left Shoulder"]
  18. LH=Torso["Left Hip"]
  19. RS=Torso["Right Shoulder"]
  20. RH=Torso["Right Hip"]
  21. Neck=Torso.Neck
  22. it=Instance.new
  23. vt=Vector3.new
  24. cf=CFrame.new
  25. euler=CFrame.fromEulerAnglesXYZ
  26. angles=CFrame.Angles
  27. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  28. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  29. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  30. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  31. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  32. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  33. RootPart=Character.HumanoidRootPart
  34. RootJoint=RootPart.RootJoint
  35. RootCF=euler(-1.57,0,3.14)
  36. attack = false
  37. attackdebounce = false
  38. MMouse=nil
  39. combo=0
  40. mana=0
  41. local idle=0
  42. local Anim="Idle"
  43. local Effects={}
  44. local Mode="Defensive"
  45. --player
  46. player=nil
  47. --save shoulders
  48. RSH, LSH=nil, nil
  49. --welds
  50. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  51. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  52. LH=Torso["Left Hip"]
  53. RH=Torso["Right Hip"]
  54. TorsoColor=Torso.BrickColor
  55. TorsoBlue=TorsoColor.Color.b
  56. NewCol=Color3.new(0,0,TorsoBlue)
  57. print(BrickColor.new(.5,.5,TorsoBlue))
  58.  
  59. function swait(num)
  60. if num==0 or num==nil then
  61. --if Stagger.Value==false or Stun.Value<=100 then
  62. game:service'RunService'.Stepped:wait(0)
  63. --end
  64. else
  65. for i=0,num do
  66. game:service'RunService'.Stepped:wait(0)
  67. --[[if Stagger.Value==true or Stun.Value>=100 then
  68. break
  69. end]]
  70. end
  71. end
  72. end
  73.  
  74. if Character:findFirstChild("Cherubim",true) ~= nil then
  75. Character:findFirstChild("Cherubim",true).Parent = nil
  76. end
  77. if Player.PlayerGui:findFirstChild("WeaponGUI",true) ~= nil then
  78. Player.PlayerGui:findFirstChild("WeaponGUI",true).Parent = nil
  79. end
  80. if Character:findFirstChild("Stats",true) ~= nil then
  81. Character:findFirstChild("Stats",true).Parent = nil
  82. end
  83. local Stats=Instance.new("BoolValue")
  84. Stats.Name="Stats"
  85. Stats.Parent=Character
  86. local Atk=Instance.new("NumberValue")
  87. Atk.Name="Damage"
  88. Atk.Parent=Stats
  89. Atk.Value=1
  90. local Def=Instance.new("NumberValue")
  91. Def.Name="Defense"
  92. Def.Parent=Stats
  93. Def.Value=1
  94. local Speed=Instance.new("NumberValue")
  95. Speed.Name="Speed"
  96. Speed.Parent=Stats
  97. Speed.Value=1
  98. local Mvmt=Instance.new("NumberValue")
  99. Mvmt.Name="Movement"
  100. Mvmt.Parent=Stats
  101. Mvmt.Value=1
  102. local Block=Instance.new("BoolValue")
  103. Block.Name="Block"
  104. Block.Parent=Stats
  105. Block.Value=false
  106. local Stun=Instance.new("NumberValue")
  107. Stun.Name="Stun"
  108. Stun.Parent=Stats
  109. Stun.Value=0
  110. local Stunned=Instance.new("BoolValue")
  111. Stunned.Name="Stunned"
  112. Stunned.Parent=Stats
  113. Stunned.Value=false
  114. local Stagger=Instance.new("BoolValue")
  115. Stagger.Name="Stagger"
  116. Stagger.Parent=Stats
  117. Stagger.Value=false
  118. local StaggerHit=Instance.new("BoolValue")
  119. StaggerHit.Name="StaggerHit"
  120. StaggerHit.Parent=Stats
  121. StaggerHit.Value=false
  122. local RecentEnemy=Instance.new("ObjectValue")
  123. RecentEnemy.Name="RecentEnemy"
  124. RecentEnemy.Parent=Stats
  125. RecentEnemy.Value=nil
  126.  
  127. function NoOutline(Part)
  128. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  129. end
  130.  
  131. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  132. local fp=it("Part")
  133. fp.formFactor=formfactor
  134. fp.Parent=parent
  135. fp.Reflectance=reflectance
  136. fp.Transparency=transparency
  137. fp.CanCollide=false
  138. fp.Locked=true
  139. fp.BrickColor=brickcolor
  140. fp.Name=name
  141. fp.Size=size
  142. fp.Position=Torso.Position
  143. NoOutline(fp)
  144. fp.Material="Neon"
  145. fp:BreakJoints()
  146. return fp
  147. end
  148.  
  149. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  150. local mesh=it(Mesh)
  151. mesh.Parent=part
  152. if Mesh=="SpecialMesh" then
  153. mesh.MeshType=meshtype
  154. if meshid~="nil" then
  155. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  156. end
  157. end
  158. mesh.Offset=offset
  159. mesh.Scale=scale
  160. return mesh
  161. end
  162.  
  163. function weld(parent,part0,part1,c0)
  164. local weld=it("Weld")
  165. weld.Parent=parent
  166. weld.Part0=part0
  167. weld.Part1=part1
  168. weld.C0=c0
  169. return weld
  170. end
  171.  
  172. local Color1=Torso.BrickColor
  173.  
  174. local fengui=it("GuiMain")
  175. fengui.Parent=Player.PlayerGui
  176. fengui.Name="WeaponGUI"
  177. local fenframe=it("Frame")
  178. fenframe.Parent=fengui
  179. fenframe.BackgroundColor3=Color3.new(255,255,255)
  180. fenframe.BackgroundTransparency=1
  181. fenframe.BorderColor3=Color3.new(17,17,17)
  182. fenframe.Size=UDim2.new(0.0500000007, 0, 0.100000001, 0)
  183. fenframe.Position=UDim2.new(0.4,0,0.1,0)
  184. local fenbarmana1=it("TextLabel")
  185. fenbarmana1.Parent=fenframe
  186. fenbarmana1.Text=" "
  187. fenbarmana1.BackgroundTransparency=0
  188. fenbarmana1.BackgroundColor3=Color3.new(0,0,0)
  189. fenbarmana1.SizeConstraint="RelativeXY"
  190. fenbarmana1.TextXAlignment="Center"
  191. fenbarmana1.TextYAlignment="Center"
  192. fenbarmana1.Position=UDim2.new(0,0,0,0)
  193. fenbarmana1.Size=UDim2.new(4,0,0.2,0)
  194. local fenbarmana2=it("TextLabel")
  195. fenbarmana2.Parent=fenframe
  196. fenbarmana2.Text=" "
  197. fenbarmana2.BackgroundTransparency=0
  198. fenbarmana2.BackgroundColor3=BrickColor.new("Teal").Color
  199. fenbarmana2.SizeConstraint="RelativeXY"
  200. fenbarmana2.TextXAlignment="Center"
  201. fenbarmana2.TextYAlignment="Center"
  202. fenbarmana2.Position=UDim2.new(0,0,0,0)
  203. fenbarmana2.Size=UDim2.new(4*mana/100,0,0.2,0)
  204. local fenbarmana3=it("TextLabel")
  205. fenbarmana3.Parent=fenframe
  206. fenbarmana3.Text=" "
  207. fenbarmana3.BackgroundTransparency=0
  208. fenbarmana3.BackgroundColor3=Color3.new(Col1,Col2,Col3)
  209. fenbarmana3.SizeConstraint="RelativeXY"
  210. fenbarmana3.TextXAlignment="Center"
  211. fenbarmana3.TextYAlignment="Center"
  212. fenbarmana3.Position=UDim2.new(0,0,0,0)
  213. fenbarmana3.Size=UDim2.new(0,0,0.2,0)
  214. local fenbarmana4=it("TextLabel")
  215. fenbarmana4.Parent=fenframe
  216. fenbarmana4.Text="Mana("..mana..")"
  217. fenbarmana4.BackgroundTransparency=1
  218. fenbarmana4.BackgroundColor3=Color3.new(0,0,0)
  219. fenbarmana4.SizeConstraint="RelativeXY"
  220. fenbarmana4.TextXAlignment="Center"
  221. fenbarmana4.TextYAlignment="Center"
  222. fenbarmana4.Position=UDim2.new(0,0,-0.3,0)
  223. fenbarmana4.Size=UDim2.new(4,0,0.2,0)
  224. fenbarmana4.FontSize="Size9"
  225. fenbarmana4.TextStrokeTransparency=0
  226. fenbarmana4.TextColor=BrickColor.new("White")
  227.  
  228. local modelzorz=Instance.new("Model")
  229. modelzorz.Parent=Character
  230. modelzorz.Name="Cherubim"
  231.  
  232. local handle=part(3,modelzorz,0,0.5,TorsoColor,"Handle",vt())
  233. local prt1=part(3,modelzorz,0,0,TorsoColor,"Part01",vt())
  234. local prt2=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part02",vt())
  235. local prt3=part(3,modelzorz,0,0,BrickColor.new("Bright green"),"Part03",vt())
  236. local prt4=part(3,modelzorz,0,0,BrickColor.new("Teal"),"Part04",vt())
  237. local prt5=part(3,modelzorz,0,0,BrickColor.new("Bright green"),"Part05",vt())
  238. local prt6=part(3,modelzorz,0,0,BrickColor.new("Bright green"),"Part06",vt())
  239. local prt7=part(3,modelzorz,0,0,BrickColor.new("Bright green"),"Part07",vt())
  240. local prt11=part(3,modelzorz,0,0,BrickColor.new("Teal"),"Part11",vt())
  241. local prt12=part(3,modelzorz,0,0,BrickColor.new("Teal"),"Part12",vt())
  242. local prt13=part(3,modelzorz,0,0,BrickColor.new("Teal"),"Part13",vt())
  243. local prt14=part(3,modelzorz,0,0,BrickColor.new(.5,.5,TorsoBlue),"Part14",vt())
  244. local prt15=part(3,modelzorz,0,0,BrickColor.new(.5,.5,TorsoBlue),"Part15",vt())
  245. local prt16=part(3,modelzorz,0,0,BrickColor.new(.5,.5,TorsoBlue),"Part16",vt())
  246. local prt17=part(3,modelzorz,0,0,BrickColor.new(.5,.5,TorsoBlue),"Part17",vt())
  247.  
  248. local msh1=mesh("SpecialMesh",prt1,"Head","nil",vt(0,0,0),vt(2,25,2))
  249. local msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(1,30,1))
  250. local msh3=mesh("SpecialMesh",prt3,"Head","nil",vt(0,0,0),vt(2.5,4,2.5))
  251. local msh4=mesh("CylinderMesh",prt4,"","",vt(0,0,0),vt(2.7,1.5,2.7))
  252. local msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(3,5,8))
  253. local msh6=mesh("SpecialMesh",prt6,"Wedge","nil",vt(0,0,0),vt(3,3,4))
  254. local msh7=mesh("SpecialMesh",prt7,"Wedge","nil",vt(0,0,0),vt(3,3,4))
  255. local msh11=mesh("SpecialMesh",prt11,"Sphere","nil",vt(0,0,0),vt(4,4,3.5))
  256. local msh12=mesh("SpecialMesh",prt12,"Sphere","nil",vt(0,0,0),vt(2,4,2))
  257. local msh13=mesh("SpecialMesh",prt13,"Sphere","nil",vt(0,0,0),vt(2,4,2))
  258. local msh14=mesh("SpecialMesh",prt14,"FileMesh","92135508",vt(0,0,0),vt(.5,.5,.5))
  259. local msh15=mesh("SpecialMesh",prt15,"FileMesh","92135508",vt(0,0,0),vt(.5,.5,.5))
  260. local msh16=mesh("SpecialMesh",prt16,"FileMesh","92135524",vt(0,0,0),vt(.5,.5,.5))
  261. local msh17=mesh("SpecialMesh",prt17,"FileMesh","92135524",vt(0,0,0),vt(.5,.5,.5))
  262.  
  263. --local wld1=weld(prt1,prt1,Torso,euler(0,0,0)*cf(0,0,5))
  264. --local wld1=weld(prt1,prt1,RightArm,euler(1.57,0,0)*cf(0,1,0))
  265. --local handlewld=weld(handle,handle,RightArm,euler(1.57,0,0)*cf(0,1,0))
  266. local handlewld=weld(handle,handle,Torso,euler(2.1,1.57,0)*cf(1,-1,-.5))
  267. local wld1=weld(prt1,prt1,handle,cf(0,0,0)*euler(0,0,0))
  268. local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0,0))
  269. local wld3=weld(prt3,prt3,prt1,euler(0,0,0)*cf(0,3,0))
  270. local wld4=weld(prt4,prt4,prt3,euler(0,0,0)*cf(0,.25,0))
  271. local wld5=weld(prt5,prt5,prt1,euler(0,0,0)*cf(0,-2.8,0))
  272. local wld6=weld(prt6,prt6,prt5,euler(0,0,0)*cf(0,-.8,.4))
  273. local wld7=weld(prt7,prt7,prt5,euler(0,3.14,0)*cf(0,-.8,-.4))
  274. local wld11=weld(prt11,prt11,prt5,euler(0,0,1.57)*cf(0,-0.2,0))
  275. local wld12=weld(prt12,prt12,prt5,euler(0,0,1.57)*cf(0,0.1,0.5))
  276. local wld13=weld(prt13,prt13,prt5,euler(0,0,1.57)*cf(0,0.1,-0.5))
  277. local wld14=weld(prt14,prt14,prt5,euler(3.14,1.57,0)*cf(0.4,0.6,-2))
  278. local wld15=weld(prt15,prt15,prt5,euler(3.14,-1.57,0)*cf(-0.4,0.6,2))
  279. local wld16=weld(prt16,prt16,prt5,euler(3.14,1.57,0)*cf(0.4,0.6,2))
  280. local wld17=weld(prt17,prt17,prt5,euler(3.14,-1.57,0)*cf(-0.4,0.6,-2))
  281.  
  282. num=0
  283. num2=0
  284. num3=0
  285. num4=0
  286. num5=2
  287. for i=1,4 do
  288. local prt8=part(3,modelzorz,0.7,0,BrickColor.new("Teal"),"Part08",vt())
  289. local prt9=part(3,modelzorz,0.7,0,BrickColor.new("Teal"),"Part09",vt())
  290. local prt10=part(3,modelzorz,0.7,0,BrickColor.new("Teal"),"Part10",vt())
  291. local msh8=mesh("BlockMesh",prt8,"","",vt(0,0,0),vt(1+num4,5+num,6+num3))
  292. local msh9=mesh("SpecialMesh",prt9,"Wedge","nil",vt(0,0,0),vt(1+num4,4,3+(num3/2)))
  293. local msh10=mesh("SpecialMesh",prt10,"Wedge","nil",vt(0,0,0),vt(1+num4,4,3+(num3/2)))
  294. local wld8=weld(prt8,prt8,prt5,euler(0,0,0)*cf(0,-.8-num2,0))
  295. local wld9=weld(prt9,prt9,prt8,euler(0,0,0)*cf(0,-.9-num*.1,.3+((num3*.1)/2)))
  296. local wld10=weld(prt10,prt10,prt8,euler(0,3.14,0)*cf(0,-.9-num*.1,-.3-((num3*.1)/2)))
  297. num=num+.6
  298. num2=num2+.3*num5
  299. num3=num3-.5
  300. num4=num4-.2
  301. num5=num5+1
  302. end
  303.  
  304. local hitbox=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
  305. --hitbox.Anchored=true
  306. local hitbox2=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
  307. hitbox2.Anchored=true
  308. local hitboxCF=cf(0,0,0)
  309.  
  310. if (script.Parent.className~="HopperBin") then
  311. Tool=Instance.new("HopperBin")
  312. Tool.Parent=Backpack
  313. Tool.Name="Cherubim"
  314. script.Parent=Tool
  315. end
  316. Bin=script.Parent
  317.  
  318. local bodvel=Instance.new("BodyVelocity")
  319. local bg=Instance.new("BodyGyro")
  320.  
  321. so = function(id,par,vol,pit)
  322. coroutine.resume(coroutine.create(function()
  323. local sou = Instance.new("Sound",par or workspace)
  324. sou.Volume=vol
  325. sou.Pitch=pit or 1
  326. sou.SoundId=id
  327. swait()
  328. sou:play()
  329. game:GetService("Debris"):AddItem(sou,6)
  330. end))
  331. end
  332.  
  333. function clerp(a,b,t)
  334. local qa = {QuaternionFromCFrame(a)}
  335. local qb = {QuaternionFromCFrame(b)}
  336. local ax, ay, az = a.x, a.y, a.z
  337. local bx, by, bz = b.x, b.y, b.z
  338. local _t = 1-t
  339. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  340. end
  341.  
  342. function QuaternionFromCFrame(cf)
  343. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  344. local trace = m00 + m11 + m22
  345. if trace > 0 then
  346. local s = math.sqrt(1 + trace)
  347. local recip = 0.5/s
  348. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  349. else
  350. local i = 0
  351. if m11 > m00 then
  352. i = 1
  353. end
  354. if m22 > (i == 0 and m00 or m11) then
  355. i = 2
  356. end
  357. if i == 0 then
  358. local s = math.sqrt(m00-m11-m22+1)
  359. local recip = 0.5/s
  360. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  361. elseif i == 1 then
  362. local s = math.sqrt(m11-m22-m00+1)
  363. local recip = 0.5/s
  364. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  365. elseif i == 2 then
  366. local s = math.sqrt(m22-m00-m11+1)
  367. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  368. end
  369. end
  370. end
  371.  
  372. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  373. local xs, ys, zs = x + x, y + y, z + z
  374. local wx, wy, wz = w*xs, w*ys, w*zs
  375. local xx = x*xs
  376. local xy = x*ys
  377. local xz = x*zs
  378. local yy = y*ys
  379. local yz = y*zs
  380. local zz = z*zs
  381. 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))
  382. end
  383.  
  384. function QuaternionSlerp(a, b, t)
  385. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  386. local startInterp, finishInterp;
  387. if cosTheta >= 0.0001 then
  388. if (1 - cosTheta) > 0.0001 then
  389. local theta = math.acos(cosTheta)
  390. local invSinTheta = 1/math.sin(theta)
  391. startInterp = math.sin((1-t)*theta)*invSinTheta
  392. finishInterp = math.sin(t*theta)*invSinTheta
  393. else
  394. startInterp = 1-t
  395. finishInterp = t
  396. end
  397. else
  398. if (1+cosTheta) > 0.0001 then
  399. local theta = math.acos(-cosTheta)
  400. local invSinTheta = 1/math.sin(theta)
  401. startInterp = math.sin((t-1)*theta)*invSinTheta
  402. finishInterp = math.sin(t*theta)*invSinTheta
  403. else
  404. startInterp = t-1
  405. finishInterp = t
  406. end
  407. end
  408. 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
  409. end
  410.  
  411. function hideanim()
  412. equipped=false
  413. for i=0,1,0.1 do
  414. swait()
  415. handlewld.C0=clerp(handlewld.C0,euler(1.5,1.4,0)*euler(0,0,-.8)*cf(0,1,0),.3)
  416. wld1.C0=clerp(wld1.C0,cf(0,-1,0)*euler(0,0,0),.3)
  417. Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,.4),.3)
  418. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  419. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,.2),.3)
  420. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  421. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(3.4,0,-.4),.3)
  422. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  423. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0),.3)
  424. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0),.3)
  425. end
  426. Mvmt.Value=Mvmt.Value+.1
  427. handlewld.Part1=Torso
  428. handlewld.C0=euler(2.1,1.57,0)*cf(1,-1,-.5)
  429. wld1.C0=cf(0,0,0)*euler(0,0,0)
  430. for i=0,1,0.3 do
  431. swait()
  432. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.4)
  433. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
  434. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0),.4)
  435. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  436. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.4)
  437. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  438. end
  439. end
  440.  
  441. function equipanim()
  442. equipped=true
  443. for i=0,1,0.1 do
  444. swait()
  445. Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,.4),.3)
  446. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  447. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,.2),.3)
  448. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  449. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(3.3,0,-.4),.3)
  450. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  451. end
  452. handlewld.Part1=LeftArm
  453. handlewld.C0=euler(1.5,1.4,0)*euler(0,0,-1)*cf(0,1,0)
  454. wld1.C0=cf(0,-1,0)*euler(0,0,0)
  455. Mvmt.Value=Mvmt.Value-.1
  456. end
  457.  
  458. function StaggerAnim()
  459. attack=true
  460. for i=1,math.random(2,4) do
  461. 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)
  462. end
  463. for i=0,1,0.35 do
  464. swait()
  465. --Torso.Velocity=RootPart.CFrame.lookVector*-40
  466. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.7)*euler(.1,0,0),.3)
  467. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,.6),.3)
  468. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.4,0,.4)*euler(0,.4,0),.3)
  469. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  470. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.4,0,-.9)*euler(0,.7,0),.3)
  471. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  472. RH.C0=clerp(RH.C0,cf(1,-.7,0)*euler(0,1.57,0)*euler(-.4,-.2,.4),.3)
  473. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.2,0,.4),.3)
  474. end
  475. for i=0,1,0.2 do
  476. swait()
  477. --Torso.Velocity=RootPart.CFrame.lookVector*-40
  478. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.7)*euler(.3,0,0),.3)
  479. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.4,0,.6),.3)
  480. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.6,0,.6)*euler(0,.4,0),.3)
  481. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  482. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.6,0,-.9)*euler(0,.7,0),.3)
  483. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  484. RH.C0=clerp(RH.C0,cf(1,-.7,0)*euler(0,1.57,0)*euler(-.5,-.2,.5),.3)
  485. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.2,0,.4),.3)
  486. end
  487. for i=0,1,0.1 do
  488. swait()
  489. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  490. wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(.1,0,0),.3)
  491. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.7)*euler(.3,0,0),.3)
  492. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.8)*euler(-.2,0,.4),.3)
  493. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(.6,0,-.4),.3)
  494. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  495. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4)*euler(0,.3,0),.3)
  496. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  497. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.2,0)*euler(-.4,0,1.2),.3)
  498. LH.C0=clerp(LH.C0,cf(-1,.4,-.8)*euler(0,-1.57,0)*euler(0,.2,-.1),.3)
  499. end
  500. swait(40)
  501. combo=0
  502. attack=false
  503. end
  504.  
  505. function StaggerHitt()
  506. attack=true
  507. for i=1,math.random(2,4) do
  508. 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)
  509. end
  510. for i=0,1,0.1 do
  511. swait()
  512. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.7)*euler(.1,0,0),.3)
  513. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,.6),.3)
  514. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.4)*euler(0,.4,0),.3)
  515. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  516. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.4,0,-.9)*euler(0,.7,0),.3)
  517. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  518. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,-.2,-.2),.3)
  519. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.2,0,.4),.3)
  520. end
  521. attack=false
  522. end
  523.  
  524. function StunAnim()
  525. attack=true
  526. Stunned.Value=true
  527. for i=0,1,0.3 do
  528. swait()
  529. Humanoid.WalkSpeed=0
  530. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  531. wld1.C0=clerp(wld1.C0,cf(0,-.5,0),.2)
  532. Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,-.5),.2)
  533. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.2,0,-3),.2)
  534. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1.3),.2)
  535. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  536. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1,0,.4)*euler(0,-.1,0),.2)
  537. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  538. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.3),.25)
  539. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.2,0,0),.25)
  540. end
  541. for i=0,1,0.3 do
  542. swait()
  543. Humanoid.WalkSpeed=0
  544. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  545. wld1.C0=clerp(wld1.C0,cf(0,-.5,0),.2)
  546. Neck.C0=clerp(Neck.C0,necko*euler(-.3,0,-.5),.2)
  547. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.5)*euler(.8,0,-3),.2)
  548. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
  549. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  550. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1.2,0,.8)*euler(0,-.1,0),.2)
  551. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  552. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.6),.25)
  553. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(.1,0,.7),.25)
  554. end
  555. for i=0,1,0.3 do
  556. swait()
  557. Humanoid.WalkSpeed=0
  558. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  559. wld1.C0=clerp(wld1.C0,cf(0,-.5,0),.2)
  560. Neck.C0=clerp(Neck.C0,necko*euler(-.3,0,-1),.2)
  561. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2)*euler(1.57,0,-3),.2)
  562. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
  563. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  564. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8)*euler(0,-.1,0),.2)
  565. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  566. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.2,0,.6),.25)
  567. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.1,0,.3),.25)
  568. end
  569. gairo=Instance.new("BodyGyro")
  570. gairo.Parent=RootPart
  571. gairo.maxTorque=Vector3.new(4e+005,4e+005,4e+005)*math.huge
  572. gairo.P=20e+003
  573. gairo.cframe=RootPart.CFrame
  574. v=Instance.new("BodyVelocity",RootPart)
  575. v.Name="BodVel"
  576. v.P=2000
  577. v.maxForce=Vector3.new(500000000,50000000,500000000)
  578. v.velocity=vt(0,-50,0)
  579. for i=0,1,0.1 do
  580. swait()
  581. Humanoid.WalkSpeed=0
  582. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  583. wld1.C0=clerp(wld1.C0,cf(0,-.5,0),.2)
  584. v.velocity=vt(0,-50,0)
  585. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.57),.3)
  586. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2.5)*euler(1.57,0,-3.14),.3)
  587. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1.5)*euler(.2,0,0),.3)
  588. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  589. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.5,0,-1.57)*euler(0,0,0),.3)
  590. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  591. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(-.3,.5,0),.3)
  592. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(-.1,.2,0),.3)
  593. end
  594. for i=1,70 do
  595. swait()
  596. Humanoid.WalkSpeed=0
  597. v.velocity=vt(0,-50,0)
  598. end
  599. v.velocity=vt(0,0,0)
  600. for i=0,1,0.2 do
  601. swait()
  602. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  603. wld1.C0=clerp(wld1.C0,cf(0,-.5,0),.2)
  604. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0),.3)
  605. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2)*euler(1,0,-4),.3)
  606. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1)*euler(.2,-1,0),.3)
  607. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  608. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,.2)*euler(0,0,0),.3)
  609. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  610. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(-.3,.5,.4),.3)
  611. LH.C0=clerp(LH.C0,cf(-1,-1,-1)*euler(0,-1.57,0)*euler(-.1,.2,1),.3)
  612. end
  613. gairo.Parent=nil
  614. v.Parent=nil
  615. combo=0
  616. Stunned.Value=false
  617. attack=false
  618. end
  619.  
  620. function dattackone()
  621. attack=true
  622. for i=0,1,0.15 do
  623. swait()
  624. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  625. wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(-1,0,0),.3)
  626. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.5),.3)
  627. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.5),.3)
  628. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,.2),.3)
  629. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  630. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(2,0,-.4),.3)
  631. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  632. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,-.5,0),.3)
  633. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,-.5,0),.3)
  634. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  635. break
  636. end
  637. end
  638. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,5,10,math.random(5,10),"Normal",RootPart,.5,1,math.random(10,15),nil,true) end)
  639. hitbox.Parent=modelzorz
  640. hitbox.Size=vt(.5,4.5,1.2)
  641. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  642. hitbox.CFrame=hitboxCF
  643. blcf=nil
  644. scfr=nil
  645. for i=0,1,0.1 do
  646. swait()
  647. local blcf = prt5.CFrame*cf(0,2.5,0)
  648. if scfr and (prt5.Position-scfr.p).magnitude > .1 then
  649. local h = 5
  650. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  651. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  652. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  653. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  654. scfr = blcf
  655. elseif not scfr then
  656. scfr = blcf
  657. end
  658. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  659. hitbox.CFrame=hitboxCF
  660. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.35)
  661. wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(.8,0,0),.35)
  662. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5),.35)
  663. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.5),.35)
  664. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.2),.35)
  665. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.35)
  666. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.3)*euler(.5,0,-.1)*euler(0,.5,0),.35)
  667. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.35)
  668. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.5,0),.35)
  669. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.35)
  670. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  671. break
  672. end
  673. end
  674. con1:disconnect()
  675. hitbox.Parent=nil
  676. attack=false
  677. end
  678.  
  679. function dattacktwo()
  680. attack=true
  681. for i=0,1,0.15 do
  682. swait()
  683. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  684. wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(-1,0,0),.3)
  685. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.8),.3)
  686. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.8),.3)
  687. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.2,0,.5),.3)
  688. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  689. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1,0,-.8)*euler(0,-.5,0),.3)
  690. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  691. RH.C0=clerp(RH.C0,cf(.8,-1,.4)*euler(0,1.57,0)*euler(0,-.8,0),.3)
  692. LH.C0=clerp(LH.C0,cf(-.8,-1,-.4)*euler(0,-1.57,0)*euler(0,-.8,0),.3)
  693. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  694. break
  695. end
  696. end
  697. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,5,10,math.random(20,25),"Normal",RootPart,.5,2,math.random(10,15),nil,true) end)
  698. hitbox.Parent=modelzorz
  699. hitbox.Size=vt(.5,4.5,1.2)
  700. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  701. hitbox.CFrame=hitboxCF
  702. blcf=nil
  703. scfr=nil
  704. for i=0,1,0.1 do
  705. swait()
  706. local blcf = prt5.CFrame*cf(0,2.5,0)
  707. if scfr and (prt5.Position-scfr.p).magnitude > .1 then
  708. local h = 5
  709. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  710. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  711. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  712. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  713. scfr = blcf
  714. elseif not scfr then
  715. scfr = blcf
  716. end
  717. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  718. hitbox.CFrame=hitboxCF
  719. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  720. wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(1,0,0),.3)
  721. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.8),.3)
  722. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.8),.3)
  723. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,.2),.3)
  724. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  725. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.3)*euler(1,0,-.5)*euler(0,.5,0),.3)
  726. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  727. RH.C0=clerp(RH.C0,cf(.8,-1,-.4)*euler(0,1.57,0)*euler(0,.8,0),.3)
  728. LH.C0=clerp(LH.C0,cf(-.8,-1,.4)*euler(0,-1.57,0)*euler(0,.8,0),.3)
  729. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  730. break
  731. end
  732. end
  733. con1:disconnect()
  734. hitbox.Parent=nil
  735. attack=false
  736. end
  737.  
  738. function dattackthree()
  739. attack=true
  740. for i=0,1,0.15 do
  741. swait()
  742. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  743. wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(-.5,0,0),.3)
  744. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5),.3)
  745. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.5),.3)
  746. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.2),.3)
  747. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  748. LW.C0=clerp(LW.C0,cf(-.5,0.5,-.5)*euler(2,0,1)*euler(0,-1,0),.3)
  749. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  750. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.5,0),.3)
  751. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.3)
  752. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  753. break
  754. end
  755. end
  756. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,10,15,math.random(5,10),"Normal",RootPart,.5,1,math.random(5,15),nil,true) end)
  757. hitbox.Parent=modelzorz
  758. hitbox.Size=vt(.5,4.5,1.2)
  759. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  760. hitbox.CFrame=hitboxCF
  761. blcf=nil
  762. scfr=nil
  763. for i=0,1,0.1 do
  764. swait()
  765. local blcf = prt5.CFrame*cf(0,2.5,0)
  766. if scfr and (prt5.Position-scfr.p).magnitude > .1 then
  767. local h = 5
  768. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  769. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  770. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  771. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  772. scfr = blcf
  773. elseif not scfr then
  774. scfr = blcf
  775. end
  776. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  777. hitbox.CFrame=hitboxCF
  778. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  779. wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(.5,0,0),.3)
  780. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.5),.3)
  781. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.5),.3)
  782. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.6,0,.4),.3)
  783. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  784. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.5,0,-1)*euler(0,-.6,0),.3)
  785. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  786. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,-.5,0),.3)
  787. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,-.5,0),.3)
  788. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  789. break
  790. end
  791. end
  792. con1:disconnect()
  793. hitbox.Parent=nil
  794. attack=false
  795. end
  796.  
  797. function dattackfour()
  798. attack=true
  799. blcf=nil
  800. scfr=nil
  801. for i=0,1,0.1 do
  802. swait()
  803. local blcf = prt5.CFrame*cf(0,2.5,0)
  804. if scfr and (prt5.Position-scfr.p).magnitude > .1 then
  805. local h = 5
  806. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  807. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  808. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  809. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  810. scfr = blcf
  811. elseif not scfr then
  812. scfr = blcf
  813. end
  814. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  815. --wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(-.57,0,0),.2)
  816. wld1.C0=cf(0,-.5+1.5*i,0)*euler(-.57+7*i,0,0)
  817. Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,.2),.2)
  818. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.2)
  819. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1,0,-1),.2)
  820. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  821. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(2.8,0,0),.2)
  822. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  823. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,0),.3)
  824. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,0),.3)
  825. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  826. break
  827. end
  828. end
  829. Mvmt.Value=Mvmt.Value-1
  830. for i=0,1,0.15 do
  831. swait()
  832. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.4)
  833. wld1.C0=clerp(wld1.C0,cf(0,.2,0)*euler(0,0,0),.4)
  834. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.2),.4)
  835. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
  836. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.2),.4)
  837. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  838. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,0),.4)
  839. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  840. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  841. break
  842. end
  843. end
  844. hitfloor=nil
  845. while hitfloor==nil do
  846. swait()
  847. hitfloor,posfloor=rayCast(prt4.Position,(CFrame.new(prt4.Position,prt4.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  848. end
  849. MagicWave(BrickColor.new("Teal"),cf(prt4.Position),1,1,1,1.2,.4,1.2,.05)
  850. MagicBlock(BrickColor.new("Teal"),cf(prt4.Position),1,1,1,1,1,1,.05,1)
  851. MagniDamage(prt4,20,5,10,math.random(30,40),"Knockdown2",true)
  852. swait(10)
  853. Mvmt.Value=Mvmt.Value+1
  854. attack=false
  855. end
  856.  
  857. function oattackone()
  858. attack=true
  859. for i=0,1,0.15 do
  860. swait()
  861. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  862. wld1.C0=clerp(wld1.C0,cf(0,1,0)*euler(-.5,0,0),.3)
  863. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.7)*euler(.2,0,0),.3)
  864. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,.7),.3)
  865. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,.5),.3)
  866. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  867. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.4,0,-.4)*euler(0,-.4,0),.3)
  868. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  869. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,-.7,0),.3)
  870. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,-.7,0),.3)
  871. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  872. break
  873. end
  874. end
  875. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,5,10,math.random(5,10),"Normal",RootPart,.5,1,math.random(5,10),nil,true) end)
  876. hitbox.Parent=modelzorz
  877. hitbox.Size=vt(.5,4.5,1.2)
  878. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  879. hitbox.CFrame=hitboxCF
  880. blcf=nil
  881. scfr=nil
  882. for i=0,1,0.1 do
  883. swait()
  884. local blcf = prt5.CFrame*cf(0,2.5,0)
  885. if scfr and (prt5.Position-scfr.p).magnitude > .1 then
  886. local h = 5
  887. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  888. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  889. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  890. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  891. scfr = blcf
  892. elseif not scfr then
  893. scfr = blcf
  894. end
  895. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  896. hitbox.CFrame=hitboxCF
  897. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.4)
  898. wld1.C0=clerp(wld1.C0,cf(0,0,0)*euler(1,0,0),.4)
  899. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5)*euler(-.1,0,0),.4)
  900. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.5),.4)
  901. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.2),.4)
  902. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  903. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1.2,0,-.4)*euler(0,.2,0),.4)
  904. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  905. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.5,0),.4)
  906. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.4)
  907. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  908. break
  909. end
  910. end
  911. con1:disconnect()
  912. hitbox.Parent=nil
  913. attack=false
  914. end
  915.  
  916. function oattacktwo()
  917. attack=true
  918. for i=0,1,0.15 do
  919. swait()
  920. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  921. wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(-.5,0,0),.3)
  922. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5),.3)
  923. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.5),.3)
  924. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.2),.3)
  925. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  926. LW.C0=clerp(LW.C0,cf(-.5,0.5,-.5)*euler(2,0,1)*euler(0,-1,0),.3)
  927. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  928. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.5,0),.3)
  929. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.3)
  930. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  931. break
  932. end
  933. end
  934. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,5,10,math.random(5,10),"Normal",RootPart,.5,1,math.random(5,10),nil,true) end)
  935. hitbox.Parent=modelzorz
  936. hitbox.Size=vt(.5,4.5,1.2)
  937. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  938. hitbox.CFrame=hitboxCF
  939. blcf=nil
  940. scfr=nil
  941. for i=0,1,0.1 do
  942. swait()
  943. local blcf = prt5.CFrame*cf(0,2.5,0)
  944. if scfr and (prt5.Position-scfr.p).magnitude > .1 then
  945. local h = 5
  946. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  947. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  948. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  949. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  950. scfr = blcf
  951. elseif not scfr then
  952. scfr = blcf
  953. end
  954. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  955. hitbox.CFrame=hitboxCF
  956. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  957. wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(.5,0,0),.3)
  958. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.5),.3)
  959. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.5),.3)
  960. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.6,0,.4),.3)
  961. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  962. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.5,0,-1)*euler(0,-.6,0),.3)
  963. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  964. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,-.5,0),.3)
  965. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,-.5,0),.3)
  966. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  967. break
  968. end
  969. end
  970. con1:disconnect()
  971. hitbox.Parent=nil
  972. attack=false
  973. end
  974.  
  975. function oattackthree()
  976. attack=true
  977. for i=0,1,0.15 do
  978. swait()
  979. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  980. wld1.C0=clerp(wld1.C0,cf(0,1,0)*euler(.5,0,0),.3)
  981. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5),.3)
  982. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.5),.3)
  983. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.2),.3)
  984. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  985. LW.C0=clerp(LW.C0,cf(-.5,0.5,-.5)*euler(1.57,0,1)*euler(0,-1.57,0),.3)
  986. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  987. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.5,0),.3)
  988. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.3)
  989. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  990. break
  991. end
  992. end
  993. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,5,10,math.random(10,20),"Normal",RootPart,.5,2,math.random(10,15),nil,true) end)
  994. hitbox.Parent=modelzorz
  995. hitbox.Size=vt(.5,4.5,1.2)
  996. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  997. hitbox.CFrame=hitboxCF
  998. blcf=nil
  999. scfr=nil
  1000. for i=0,1,0.1 do
  1001. swait()
  1002. local blcf = prt5.CFrame*cf(0,2.5,0)
  1003. if scfr and (prt5.Position-scfr.p).magnitude > .1 then
  1004. local h = 5
  1005. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1006. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1007. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1008. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1009. scfr = blcf
  1010. elseif not scfr then
  1011. scfr = blcf
  1012. end
  1013. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  1014. hitbox.CFrame=hitboxCF
  1015. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1016. wld1.C0=clerp(wld1.C0,cf(0,1,0)*euler(.5,0,0),.3)
  1017. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  1018. RootJoint.C0=RootCF*euler(0,0,-.5+6.28*i)
  1019. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,1),.3)
  1020. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1021. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,-1.57)*euler(0,-1.57,0),.3)
  1022. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1023. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,0,0),.3)
  1024. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,0,0),.3)
  1025. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  1026. break
  1027. end
  1028. end
  1029. for i=0,1,0.1 do
  1030. swait()
  1031. local blcf = prt5.CFrame*cf(0,2.5,0)
  1032. if scfr and (prt5.Position-scfr.p).magnitude > .1 then
  1033. local h = 5
  1034. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1035. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1036. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1037. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1038. scfr = blcf
  1039. elseif not scfr then
  1040. scfr = blcf
  1041. end
  1042. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  1043. hitbox.CFrame=hitboxCF
  1044. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1045. wld1.C0=clerp(wld1.C0,cf(0,1,0)*euler(1,0,0),.3)
  1046. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.3)
  1047. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1048. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,1),.3)
  1049. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1050. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.3,0,-1.57)*euler(0,-1.57,0),.3)
  1051. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1052. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  1053. break
  1054. end
  1055. end
  1056. con1:disconnect()
  1057. hitbox.Parent=nil
  1058. attack=false
  1059. end
  1060.  
  1061. function oattackfour()
  1062. attack=true
  1063. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,5,10,math.random(-20,-10),"Normal",RootPart,.2,2,math.random(5,10),nil,true) end)
  1064. hitbox.Parent=modelzorz
  1065. hitbox.Size=vt(.5,4.5,1.2)
  1066. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  1067. hitbox.CFrame=hitboxCF
  1068. blcf=nil
  1069. scfr=nil
  1070. for i=0,1,0.1 do
  1071. swait()
  1072. local blcf = prt5.CFrame*cf(0,2.5,0)
  1073. if scfr and (prt5.Position-scfr.p).magnitude > .1 then
  1074. local h = 5
  1075. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1076. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1077. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1078. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1079. scfr = blcf
  1080. elseif not scfr then
  1081. scfr = blcf
  1082. end
  1083. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  1084. hitbox.CFrame=hitboxCF
  1085. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1086. wld1.C0=clerp(wld1.C0,cf(0,1,0)*euler(.2,0,0),.3)
  1087. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5),.3)
  1088. --RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.5),.3)
  1089. RootJoint.C0=RootCF*euler(0,0,.5-7.28*i)
  1090. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.6),.3)
  1091. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1092. LW.C0=clerp(LW.C0,cf(-.5,0.5,-.5)*euler(.6,0,1)*euler(0,.8,0),.3)
  1093. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1094. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.5,0),.3)
  1095. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.3)
  1096. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  1097. break
  1098. end
  1099. end
  1100. con1:disconnect()
  1101. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,10,15,math.random(30,50),"Normal",RootPart,.5,2,math.random(10,15),nil,true) end)
  1102. for i=0,1,0.1 do
  1103. swait()
  1104. local blcf = prt5.CFrame*cf(0,2.5,0)
  1105. if scfr and (prt5.Position-scfr.p).magnitude > .1 then
  1106. local h = 5
  1107. local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
  1108. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1109. local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
  1110. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  1111. scfr = blcf
  1112. elseif not scfr then
  1113. scfr = blcf
  1114. end
  1115. hitboxCF=prt5.CFrame*cf(0,2.8,0)
  1116. hitbox.CFrame=hitboxCF
  1117. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1118. wld1.C0=clerp(wld1.C0,cf(0,0,0)*euler(1.4,0,0),.3)
  1119. Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.57),.3)
  1120. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-1.57),.3)
  1121. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.6),.3)
  1122. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1123. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.4,0,-1.4)*euler(0,1,0),.3)
  1124. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1125. RH.C0=clerp(RH.C0,cf(.5,-1,-.2)*euler(0,1.57,0)*euler(-.4,1.57,0),.2)
  1126. LH.C0=clerp(LH.C0,cf(-.5,-1,.2)*euler(0,-1.57,0)*euler(.2,1.57,0),.2)
  1127. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  1128. break
  1129. end
  1130. end
  1131. con1:disconnect()
  1132. hitbox.Parent=nil
  1133. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  1134. else
  1135. swait(10)
  1136. end
  1137. attack=false
  1138. end
  1139.  
  1140. function ModeChange()
  1141. attack=true
  1142. for i=0,1,0.1 do
  1143. swait()
  1144. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1145. wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(.5,0,0),.3)
  1146. Neck.C0=clerp(Neck.C0,necko*euler(.3,0,0),.3)
  1147. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1148. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(.8,0,-1)*euler(0,1,0),.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,0.5,-.5)*euler(1.2,0,1.1)*euler(0,-1,0),.3)
  1151. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1152. RH.C0=clerp(RH.C0,RHC0,.4)
  1153. RH.C1=clerp(RH.C1,RHC1,.4)
  1154. LH.C0=clerp(LH.C0,LHC0,.4)
  1155. LH.C1=clerp(LH.C1,LHC1,.4)
  1156. end
  1157. if Mode=="Defensive" then
  1158. Mode="Offensive"
  1159. else
  1160. Mode="Defensive"
  1161. end
  1162. for i=0,1,0.05 do
  1163. swait()
  1164. if Mode=="Offensive" then
  1165. wld14.C0=clerp(wld14.C0,euler(3.14,1.57,0)*cf(0.4,0.6,-2)*euler(0,.5,0),.3)
  1166. wld15.C0=clerp(wld15.C0,euler(3.14,-1.57,0)*cf(-0.4,0.6,2)*euler(0,.5,0),.3)
  1167. wld16.C0=clerp(wld16.C0,euler(3.14,1.57,0)*cf(0.4,0.6,2)*euler(0,-.5,0),.3)
  1168. wld17.C0=clerp(wld17.C0,euler(3.14,-1.57,0)*cf(-0.4,0.6,-2)*euler(0,-.5,0),.3)
  1169. else
  1170. wld14.C0=clerp(wld14.C0,euler(3.14,1.57,0)*cf(0.4,0.6,-2),.3)
  1171. wld15.C0=clerp(wld15.C0,euler(3.14,-1.57,0)*cf(-0.4,0.6,2),.3)
  1172. wld16.C0=clerp(wld16.C0,euler(3.14,1.57,0)*cf(0.4,0.6,2),.3)
  1173. wld17.C0=clerp(wld17.C0,euler(3.14,-1.57,0)*cf(-0.4,0.6,-2),.3)
  1174. end
  1175. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  1176. wld1.C0=clerp(wld1.C0,cf(0,1.5,0)*euler(0,0,0),.3)
  1177. Neck.C0=clerp(Neck.C0,necko*euler(.1,0,0),.3)
  1178. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1179. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,0)*euler(0,1.57,0),.3)
  1180. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1181. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1,0,0)*euler(0,1.57,0),.3)
  1182. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1183. end
  1184. attack=false
  1185. end
  1186.  
  1187. function DecreaseStat(Model,Stat,Amount,Duration)
  1188. if Model:findFirstChild("Stats")~=nil then
  1189. if Model.Stats[Stat]~=nil then
  1190. Model.Stats[Stat].Value=Model.Stats[Stat].Value-Amount
  1191. table.insert(Effects,{Model,"DecreaseStat",Stat,Amount,Duration})
  1192. end
  1193. end
  1194. end
  1195.  
  1196. function GetDist(Part1,Part2,magni)
  1197. local targ=Part1.Position-Part2.Position
  1198. local mag=targ.magnitude
  1199. if mag<=magni then
  1200. return true
  1201. else
  1202. return false
  1203. end
  1204. end
  1205.  
  1206. function MagniDamage(Part,magni,mindam,maxdam,knock,Type,Ranged)
  1207. for _,c in pairs(workspace:children()) do
  1208. local hum=c:findFirstChild("Humanoid")
  1209. if hum~=nil then
  1210. local head=c:findFirstChild("Torso")
  1211. if head~=nil then
  1212. local targ=head.Position-Part.Position
  1213. local mag=targ.magnitude
  1214. if mag<=magni and c.Name~=Player.Name then
  1215. Damagefunc(head,mindam,maxdam,knock,Type,RootPart,.2,1,math.random(5,10),nil,nil,Ranged)
  1216. end
  1217. end
  1218. end
  1219. end
  1220. end
  1221.  
  1222. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  1223. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1224. end
  1225.  
  1226. local Point=Torso.CFrame*cf(0,Torso.Size.Y,0)
  1227. LastPoint=Point
  1228. function effect(Color,Ref,LP,P1,returnn)
  1229. if LP==nil or P1==nil then return end
  1230. local effectsmsh=Instance.new("CylinderMesh")
  1231. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  1232. effectsmsh.Name="Mesh"
  1233. local effectsg=Instance.new("Part")
  1234. NoOutline(effectsg)
  1235. effectsg.formFactor=3
  1236. effectsg.CanCollide=false
  1237. effectsg.Name="Eff"
  1238. effectsg.Locked=true
  1239. effectsg.Anchored=true
  1240. effectsg.Size=Vector3.new(0.5,1,0.5)
  1241. effectsg.Parent=workspace
  1242. effectsmsh.Parent=effectsg
  1243. effectsg.BrickColor=BrickColor.new(Color)
  1244. effectsg.Reflectance=Ref
  1245. local point1=P1
  1246. local mg=(LP.p - point1.p).magnitude
  1247. effectsg.Size=Vector3.new(0.5,mg,0.5)
  1248. effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  1249. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  1250. game:GetService("Debris"):AddItem(effectsg,2)
  1251. if returnn then return effectsg end
  1252. if not returnn then
  1253. table.insert(Effects,{effectsg,"Cylinder",0.2,0.01,0,0.01,effectsmsh})
  1254. end
  1255. end
  1256.  
  1257. local function CFrameFromTopBack(at, top, back)
  1258. local right = top:Cross(back)
  1259. return CFrame.new(at.x, at.y, at.z,
  1260. right.x, top.x, back.x,
  1261. right.y, top.y, back.y,
  1262. right.z, top.z, back.z)
  1263. end
  1264.  
  1265. function Triangle(a, b, c)
  1266. local edg1 = (c-a):Dot((b-a).unit)
  1267. local edg2 = (a-b):Dot((c-b).unit)
  1268. local edg3 = (b-c):Dot((a-c).unit)
  1269. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  1270. a, b, c = a, b, c
  1271. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  1272. a, b, c = b, c, a
  1273. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  1274. a, b, c = c, a, b
  1275. else
  1276. assert(false, "unreachable")
  1277. end
  1278.  
  1279. local len1 = (c-a):Dot((b-a).unit)
  1280. local len2 = (b-a).magnitude - len1
  1281. local width = (a + (b-a).unit*len1 - c).magnitude
  1282.  
  1283. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  1284.  
  1285. local list = {}
  1286.  
  1287. if len1 > 0.01 then
  1288. local w1 = Instance.new('WedgePart', m)
  1289. game:GetService("Debris"):AddItem(w1,5)
  1290. w1.Material = "Neon"
  1291. w1.FormFactor = 'Custom'
  1292. w1.BrickColor = BrickColor.new("Teal")
  1293. w1.Transparency = 0
  1294. w1.Reflectance = 0
  1295. w1.Material = "Neon"
  1296. w1.CanCollide = false
  1297. NoOutline(w1)
  1298. local sz = Vector3.new(0.2, width, len1)
  1299. w1.Size = sz
  1300. local sp = Instance.new("SpecialMesh",w1)
  1301. sp.MeshType = "Wedge"
  1302. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  1303. w1:BreakJoints()
  1304. w1.Anchored = true
  1305. w1.Parent = workspace
  1306. w1.Transparency = 0.7
  1307. table.insert(Effects,{w1,"Disappear",.05})
  1308. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  1309. table.insert(list,w1)
  1310. end
  1311.  
  1312. if len2 > 0.01 then
  1313. local w2 = Instance.new('WedgePart', m)
  1314. game:GetService("Debris"):AddItem(w2,5)
  1315. w2.Material = "Neon"
  1316. w2.FormFactor = 'Custom'
  1317. w2.BrickColor = BrickColor.new("Teal")
  1318. w2.Transparency = 0
  1319. w2.Reflectance = 0
  1320. w2.Material = "Neon"
  1321. w2.CanCollide = false
  1322. NoOutline(w2)
  1323. local sz = Vector3.new(0.2, width, len2)
  1324. w2.Size = sz
  1325. local sp = Instance.new("SpecialMesh",w2)
  1326. sp.MeshType = "Wedge"
  1327. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  1328. w2:BreakJoints()
  1329. w2.Anchored = true
  1330. w2.Parent = workspace
  1331. w2.Transparency = 0.7
  1332. table.insert(Effects,{w2,"Disappear",.05})
  1333. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  1334. table.insert(list,w2)
  1335. end
  1336. return unpack(list)
  1337. end
  1338.  
  1339. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type)
  1340. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1341. prt.Anchored=true
  1342. prt.CFrame=cframe
  1343. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1344. game:GetService("Debris"):AddItem(prt,5)
  1345. if Type==1 or Type==nil then
  1346. table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
  1347. elseif Type==2 then
  1348. table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh})
  1349. end
  1350. end
  1351.  
  1352. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1353. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1354. prt.Anchored=true
  1355. prt.CFrame=cframe
  1356. local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
  1357. game:GetService("Debris"):AddItem(prt,2)
  1358. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  1359. end
  1360.  
  1361. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1362. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1363. prt.Anchored=true
  1364. prt.CFrame=cframe
  1365. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1366. game:GetService("Debris"):AddItem(prt,2)
  1367. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  1368. end
  1369.  
  1370. function MagicHead(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1371. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1372. prt.Anchored=true
  1373. prt.CFrame=cframe
  1374. local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
  1375. game:GetService("Debris"):AddItem(prt,2)
  1376. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  1377. end
  1378.  
  1379. function ClangEffect(brickcolor,cframe,duration,decrease,size,power)
  1380. local prt=part(3,workspace,0,1,brickcolor,"Effect",vt())
  1381. prt.Anchored=true
  1382. prt.CFrame=cframe
  1383. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(5,5,5))
  1384. game:GetService("Debris"):AddItem(prt,2)
  1385. table.insert(Effects,{prt,"CylinderClang",duration,decrease,size,power,prt.CFrame,nil})
  1386. end
  1387.  
  1388. function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1389. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1390. prt.Anchored=true
  1391. prt.CFrame=cframe
  1392. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  1393. game:GetService("Debris"):AddItem(prt,5)
  1394. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  1395. end
  1396.  
  1397. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged)
  1398. if hit.Parent==nil then
  1399. return
  1400. end
  1401. if hit.Name=="Hitbox" and hit.Parent~=modelzorz then
  1402. StaggerHit.Value=true
  1403. end
  1404. h=hit.Parent:FindFirstChild("Humanoid")
  1405. for _,v in pairs(hit.Parent:children()) do
  1406. if v:IsA("Humanoid") then
  1407. h=v
  1408. end
  1409. end
  1410. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  1411. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  1412. end
  1413. if hit.Parent.className=="Hat" then
  1414. hit=hit.Parent.Parent:findFirstChild("Head")
  1415. end
  1416. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1417. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  1418. c=Instance.new("ObjectValue")
  1419. c.Name="creator"
  1420. c.Value=game:service("Players").LocalPlayer
  1421. c.Parent=h
  1422. RecentEnemy.Value=hit.Parent
  1423. game:GetService("Debris"):AddItem(c,.5)
  1424. minim=minim*Atk.Value
  1425. maxim=maxim*Atk.Value
  1426. Damage=math.random(minim,maxim)
  1427. blocked=false
  1428. enblock=nil
  1429. Stats=hit.Parent:findFirstChild("Stats")
  1430. if Stats~=nil then
  1431. enblock=Stats:findFirstChild("Block")
  1432. if Stats:findFirstChild("Defense")~=nil then
  1433. Damage=Damage/Stats.Defense.Value
  1434. if Damage<=3 and staghit==true then
  1435. if ranged~=true then
  1436. StaggerHit.Value=true
  1437. end
  1438. end
  1439. end
  1440. if Stats:findFirstChild("Stun")~=nil then
  1441. Stats.Stun.Value=Stats.Stun.Value+incstun
  1442. end
  1443. if Stats:findFirstChild("Stagger")~=nil then
  1444. if stagger==true then
  1445. Stats.Stagger.Value=true
  1446. end
  1447. end
  1448. end
  1449. if enblock~=nil then
  1450. if enblock.Value==true then
  1451. blocked=true
  1452. end
  1453. end
  1454. if blocked==true then
  1455. showDamage(hit.Parent,"Block",.5,BrickColor.new("Bright blue"))
  1456. if ranged~=true then
  1457. enblock.Value=false
  1458. Stagger.Value=true
  1459. end
  1460. else
  1461. Damage=math.floor(Damage)
  1462. h.Health=h.Health-Damage
  1463. showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  1464. if Type=="NormalDecreaseMvmt1" then
  1465. DecreaseStat(hit.Parent,"Movement",.1,200)
  1466. end
  1467. if Type=="Knockdown" then
  1468. hum=hit.Parent.Humanoid
  1469. hum.PlatformStand=true
  1470. coroutine.resume(coroutine.create(function(HHumanoid)
  1471. swait(1)
  1472. HHumanoid.PlatformStand=false
  1473. end),hum)
  1474. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1475. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1476. local bodvol=Instance.new("BodyVelocity")
  1477. bodvol.velocity=angle*knockback
  1478. bodvol.P=5000
  1479. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1480. bodvol.Parent=hit
  1481. rl=Instance.new("BodyAngularVelocity")
  1482. rl.P=3000
  1483. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1484. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1485. rl.Parent=hit
  1486. game:GetService("Debris"):AddItem(bodvol,.5)
  1487. game:GetService("Debris"):AddItem(rl,.5)
  1488. elseif Type=="Knockdown2" then
  1489. hum=hit.Parent.Humanoid
  1490. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1491. local bodvol=Instance.new("BodyVelocity")
  1492. bodvol.velocity=angle*knockback
  1493. bodvol.P=5000
  1494. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1495. bodvol.Parent=hit
  1496. game:GetService("Debris"):AddItem(bodvol,.5)
  1497. elseif Type=="Normal" or Type=="NormalDecreaseMvmt1" then
  1498. vp=Instance.new("BodyVelocity")
  1499. vp.P=500
  1500. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1501. if KnockbackType==1 then
  1502. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  1503. elseif KnockbackType==2 then
  1504. vp.velocity=Property.CFrame.lookVector*knockback
  1505. end
  1506. game:GetService("Debris"):AddItem(vp,.5)
  1507. if knockback>0 then
  1508. vp.Parent=hit.Parent.Torso
  1509. end
  1510. end
  1511. end
  1512. debounce=Instance.new("BoolValue")
  1513. debounce.Name="DebounceHit"
  1514. debounce.Parent=hit.Parent
  1515. debounce.Value=true
  1516. game:GetService("Debris"):AddItem(debounce,Delay)
  1517. c=Instance.new("ObjectValue")
  1518. c.Name="creator"
  1519. c.Value=Player
  1520. c.Parent=h
  1521. game:GetService("Debris"):AddItem(c,.5)
  1522. CRIT=false
  1523. end
  1524. end
  1525.  
  1526. showDamage=function(Char,Dealt,du,Color)
  1527. m=Instance.new("Model")
  1528. m.Name=tostring(Dealt)
  1529. h=Instance.new("Humanoid")
  1530. h.Health=0
  1531. h.MaxHealth=0
  1532. h.Parent=m
  1533. c=Instance.new("Part")
  1534. c.Transparency=0
  1535. c.BrickColor=Color
  1536. c.Name="Head"
  1537. c.TopSurface=0
  1538. c.BottomSurface=0
  1539. c.formFactor="Plate"
  1540. c.Size=Vector3.new(1,.4,1)
  1541. ms=Instance.new("CylinderMesh")
  1542. ms.Scale=Vector3.new(.8,.8,.8)
  1543. if CRIT==true then
  1544. ms.Scale=Vector3.new(1,1.25,1)
  1545. end
  1546. ms.Parent=c
  1547. c.Reflectance=0
  1548. Instance.new("BodyGyro").Parent=c
  1549. c.Parent=m
  1550. if Char:findFirstChild("Head")~=nil then
  1551. c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1552. elseif Char.Parent:findFirstChild("Head")~=nil then
  1553. c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1554. end
  1555. f=Instance.new("BodyPosition")
  1556. f.P=2000
  1557. f.D=100
  1558. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1559. f.position=c.Position+Vector3.new(0,3,0)
  1560. f.Parent=c
  1561. game:GetService("Debris"):AddItem(m,.5+du)
  1562. c.CanCollide=false
  1563. m.Parent=workspace
  1564. c.CanCollide=false
  1565. end
  1566.  
  1567. combo=0
  1568. function ob1d(mouse)
  1569. if attack==true or equipped==false then return end
  1570. hold=true
  1571. if Mode=="Defensive" then
  1572. if combo==0 then
  1573. combo=1
  1574. dattackone()
  1575. elseif combo==1 then
  1576. combo=2
  1577. dattacktwo()
  1578. elseif combo==2 then
  1579. combo=3
  1580. dattackthree()
  1581. elseif combo==3 then
  1582. combo=0
  1583. dattackfour()
  1584. end
  1585. else
  1586. if combo==0 then
  1587. combo=1
  1588. oattackone()
  1589. elseif combo==1 then
  1590. combo=2
  1591. oattacktwo()
  1592. elseif combo==2 then
  1593. combo=3
  1594. oattackthree()
  1595. elseif combo==3 then
  1596. combo=0
  1597. oattackfour()
  1598. end
  1599. end
  1600. coroutine.resume(coroutine.create(function()
  1601. for i=1,50 do
  1602. if attack==false then
  1603. swait()
  1604. end
  1605. end
  1606. if attack==false then
  1607. combo=0
  1608. end
  1609. end))
  1610. end
  1611.  
  1612. function ob1u(mouse)
  1613. hold = false
  1614. end
  1615.  
  1616. buttonhold = false
  1617.  
  1618. eul=0
  1619. equipped=false
  1620. function key(key)
  1621. if attack==true then return end
  1622. if key=="f" then
  1623. attack=true
  1624. if equipped==false then
  1625. equipped=true
  1626. RSH=ch.Torso["Right Shoulder"]
  1627. LSH=ch.Torso["Left Shoulder"]
  1628. --
  1629. RSH.Parent=nil
  1630. LSH.Parent=nil
  1631. --
  1632. RW.Name="Right Shoulder"
  1633. RW.Part0=ch.Torso
  1634. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1635. RW.C1=cf(0, 0.5, 0)
  1636. RW.Part1=ch["Right Arm"]
  1637. RW.Parent=ch.Torso
  1638. --
  1639. LW.Name="Left Shoulder"
  1640. LW.Part0=ch.Torso
  1641. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1642. LW.C1=cf(0, 0.5, 0)
  1643. LW.Part1=ch["Left Arm"]
  1644. LW.Parent=ch.Torso
  1645. --
  1646. equipanim()
  1647. else
  1648. equipped=false
  1649. hideanim()
  1650. swait(0)
  1651. RW.Parent=nil
  1652. LW.Parent=nil
  1653. RSH.Parent=player.Character.Torso
  1654. LSH.Parent=player.Character.Torso
  1655. end
  1656. attack=false
  1657. end
  1658. if equipped==false then return end
  1659. if key=="g" then
  1660. ModeChange()
  1661. end
  1662. if key=="q" then
  1663. --Punishment()
  1664. end
  1665. if key=="h" then
  1666. mana=100
  1667. end
  1668. if attack==false then
  1669. RecentEnemy.Value=nil
  1670. end
  1671. end
  1672.  
  1673. function key2(key)
  1674.  
  1675.  
  1676. end
  1677.  
  1678. function s(mouse)
  1679. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1680. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1681. mouse.KeyDown:connect(key)
  1682. mouse.KeyUp:connect(key2)
  1683.  
  1684. player=Player
  1685. ch=Character
  1686. MMouse=mouse
  1687. end
  1688.  
  1689. function ds(mouse)
  1690. end
  1691.  
  1692. Bin.Selected:connect(s)
  1693. Bin.Deselected:connect(ds)
  1694. print("Commander loaded.")
  1695.  
  1696. local mananum=0
  1697. local donum=0
  1698. local stunnum=0
  1699. local staggeranim=false
  1700. local stunanim=false
  1701. while true do
  1702. hitbox2.Parent=hitbox.Parent
  1703. hitbox2.Size=hitbox.Size
  1704. hitbox2.CFrame=hitboxCF
  1705. game:service'RunService'.RenderStepped:wait(0)
  1706. if Stagger.Value==true and staggeranim==false then
  1707. coroutine.resume(coroutine.create(function()
  1708. staggeranim=true
  1709. while attack==true do
  1710. swait()
  1711. end
  1712. StaggerAnim()
  1713. StaggerHit.Value=false
  1714. Stagger.Value=false
  1715. staggeranim=false
  1716. end))
  1717. end
  1718. if StaggerHit.Value==true and staggeranim==false then
  1719. coroutine.resume(coroutine.create(function()
  1720. staggeranim=true
  1721. while attack==true do
  1722. swait()
  1723. end
  1724. StaggerHitt()
  1725. StaggerHit.Value=false
  1726. Stagger.Value=false
  1727. staggeranim=false
  1728. end))
  1729. end
  1730. if Mvmt.Value<0 or Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  1731. Humanoid.WalkSpeed=0
  1732. else
  1733. Humanoid.WalkSpeed=16*Mvmt.Value
  1734. end
  1735. if Stun.Value>=100 and stunanim==false then
  1736. coroutine.resume(coroutine.create(function()
  1737. stunanim=true
  1738. while attack==true do
  1739. swait()
  1740. end
  1741. StunAnim()
  1742. Stun.Value=0
  1743. stunanim=false
  1744. end))
  1745. end
  1746. if stunnum>=10 then
  1747. if Stun.Value>0 then
  1748. Stun.Value=Stun.Value-1
  1749. end
  1750. stunnum=0
  1751. end
  1752. stunnum=stunnum+1
  1753. if donum>=.5 then
  1754. handidle=true
  1755. elseif donum<=0 then
  1756. handidle=false
  1757. end
  1758. if handidle==false then
  1759. donum=donum+0.003
  1760. else
  1761. donum=donum-0.003
  1762. end
  1763. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1764. local velderp=RootPart.Velocity.y
  1765. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1766. if equipped==true then
  1767. if attack==false then
  1768. idle=idle+1
  1769. else
  1770. idle=0
  1771. end
  1772. if idle>=500 then
  1773. if attack==false then
  1774. --Sheath()
  1775. end
  1776. end
  1777. if RootPart.Velocity.y > 1 and hitfloor==nil then
  1778. Anim="Jump"
  1779. if attack==false then
  1780. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  1781. wld1.C0=clerp(wld1.C0,cf(0,0,0),.2)
  1782. Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.2)
  1783. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.2)
  1784. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.2)
  1785. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.2),.2)
  1786. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1787. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.4,0,-.2),.2)
  1788. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1789. RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
  1790. LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
  1791. end
  1792. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  1793. Anim="Fall"
  1794. if attack==false then
  1795. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  1796. wld1.C0=clerp(wld1.C0,cf(0,0,0),.2)
  1797. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.2)
  1798. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.2)
  1799. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.2)
  1800. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.8),.2)
  1801. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1802. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.8),.2)
  1803. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1804. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
  1805. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
  1806. end
  1807. elseif torvel<1 and hitfloor~=nil then
  1808. Anim="Idle"
  1809. if attack==false then
  1810. if Mode=="Defensive" then
  1811. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.15)
  1812. wld1.C0=clerp(wld1.C0,cf(0,-.5,0)*euler(-.57,0,0),.15)
  1813. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.15)
  1814. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.15)
  1815. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,.2+(donum/3)),.15)
  1816. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.15)
  1817. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1,0,0-(donum/2))*euler(0,0+donum/1.5,0),.15)
  1818. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.15)
  1819. RH.C0=clerp(RH.C0,RHC0,.2)
  1820. RH.C1=clerp(RH.C1,RHC1,.2)
  1821. LH.C0=clerp(LH.C0,LHC0,.2)
  1822. LH.C1=clerp(LH.C1,LHC1,.2)
  1823. else
  1824. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  1825. wld1.C0=clerp(wld1.C0,cf(0,1,0)*euler(-.2,0,0),.2)
  1826. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.5),.2)
  1827. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,.5),.2)
  1828. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.5-(donum/2),0,.5-(donum/2)),.2)
  1829. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1830. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4+(donum/2)),.2)
  1831. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1832. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,-.5,0),.2)
  1833. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,-.5,0),.2)
  1834. end
  1835. end
  1836. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  1837. Anim="Walk"
  1838. if attack==false then
  1839. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  1840. wld1.C0=clerp(wld1.C0,cf(0,1.5,0),.2)
  1841. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1),.2)
  1842. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,1),.2)
  1843. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.57,0,-1),.2)
  1844. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1845. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.2),.2)
  1846. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1847. RH.C0=clerp(RH.C0,cf(.6,-1,.5)*euler(0,1.57,0)*euler(0,-1,-.2),.2)
  1848. LH.C0=clerp(LH.C0,cf(-.6,-1,-.5)*euler(0,-1.57,0)*euler(0,-1,-.2),.2)
  1849. end
  1850. elseif torvel>=22 and hitfloor~=nil then
  1851. Anim="Run"
  1852. if attack==false then
  1853. handlewld.C0=clerp(handlewld.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  1854. wld1.C0=clerp(wld1.C0,cf(0,1.5,0),.2)
  1855. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1),.2)
  1856. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,1),.2)
  1857. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.57,0,-1),.2)
  1858. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1859. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.2),.2)
  1860. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1861. RH.C0=clerp(RH.C0,cf(.6,-1,.5)*euler(0,1.57,0)*euler(0,-1,-.2),.2)
  1862. LH.C0=clerp(LH.C0,cf(-.6,-1,-.5)*euler(0,-1.57,0)*euler(0,-1,-.2),.2)
  1863. end
  1864. end
  1865. end
  1866. if #Effects>0 then
  1867. --table.insert(Effects,{prt,"Block1",delay})
  1868. for e=1,#Effects do
  1869. if Effects[e]~=nil then
  1870. --for j=1,#Effects[e] do
  1871. local Thing=Effects[e]
  1872. if Thing~=nil then
  1873. local Part=Thing[1]
  1874. local Mode=Thing[2]
  1875. local Delay=Thing[3]
  1876. local IncX=Thing[4]
  1877. local IncY=Thing[5]
  1878. local IncZ=Thing[6]
  1879. if Thing[2]=="DecreaseStat" then
  1880. Thing[5]=Thing[5]-1
  1881. if Thing[5]<=0 then
  1882. if Thing[1]:findFirstChild("Stats")~=nil then
  1883. Thing[1].Stats[Thing[3]].Value=Thing[1].Stats[Thing[3]].Value+Thing[4]
  1884. end
  1885. table.remove(Effects,e)
  1886. end
  1887. end
  1888. if Thing[2]=="CylinderClang" then
  1889. if Thing[3]<=1 then
  1890. Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0)
  1891. Thing[7]=Thing[1].CFrame
  1892. effect("New Yeller",0,Thing[8],Thing[7])
  1893. Thing[8]=Thing[7]
  1894. Thing[3]=Thing[3]+Thing[4]
  1895. else
  1896. Part.Parent=nil
  1897. table.remove(Effects,e)
  1898. end
  1899. --[[Mesh=Thing[7]
  1900. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1901. Thing[1].Transparency=Thing[1].Transparency+Thing[3]]
  1902. end
  1903. if Thing[2]~="DecreaseStat" then
  1904. if Thing[1].Transparency<=1 then
  1905. if Thing[2]=="Block1" then
  1906. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1907. Mesh=Thing[7]
  1908. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1909. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1910. elseif Thing[2]=="Block2" then
  1911. Thing[1].CFrame=Thing[1].CFrame
  1912. Mesh=Thing[7]
  1913. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1914. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1915. elseif Thing[2]=="Cylinder" then
  1916. Mesh=Thing[7]
  1917. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1918. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1919. elseif Thing[2]=="Blood" then
  1920. Mesh=Thing[7]
  1921. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  1922. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1923. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1924. elseif Thing[2]=="Elec" then
  1925. Mesh=Thing[7]
  1926. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  1927. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1928. elseif Thing[2]=="Disappear" then
  1929. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1930. end
  1931. else
  1932. Part.Parent=nil
  1933. table.remove(Effects,e)
  1934. end
  1935. end
  1936. end
  1937. --end
  1938. end
  1939. end
  1940. end
  1941. fenbarmana2:TweenSize(UDim2.new(4*mana/100,0,0.2,0),nil,1,0.4,true)
  1942. fenbarmana4.Text="Mana("..mana..")"
  1943. if mana>=100 then
  1944. mana=100
  1945. else
  1946. if mananum<=8 then
  1947. mananum=mananum+1
  1948. else
  1949. mananum=0
  1950. mana=mana+1
  1951. end
  1952. end
  1953. end
  1954.  
  1955.  
  1956. --[[
  1957. Copyrighted (C) Fenrier 2014
  1958. ]]
Add Comment
Please, Sign In to add comment