Advertisement
astronaut32

lance ting

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