Blueisim

Frigost

Aug 30th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 52.35 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 guard=false
  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.  
  54. function swait(num)
  55. if num==0 or num==nil then
  56. --if Stagger.Value==false or Stun.Value<=100 then
  57. game:service'RunService'.Stepped:wait(0)
  58. --end
  59. else
  60. for i=0,num do
  61. game:service'RunService'.Stepped:wait(0)
  62. --[[if Stagger.Value==true or Stun.Value>=100 then
  63. break
  64. end]]
  65. end
  66. end
  67. end
  68.  
  69. if Character:findFirstChild("Glaciem",true) ~= nil then
  70. Character:findFirstChild("Glaciem",true).Parent = nil
  71. end
  72. if Player.PlayerGui:findFirstChild("WeaponGUI",true) ~= nil then
  73. Player.PlayerGui:findFirstChild("WeaponGUI",true).Parent = nil
  74. end
  75. if Character:findFirstChild("Stats",true) ~= nil then
  76. Character:findFirstChild("Stats",true).Parent = nil
  77. end
  78. local Stats=Instance.new("BoolValue")
  79. Stats.Name="Stats"
  80. Stats.Parent=Character
  81. local Atk=Instance.new("NumberValue")
  82. Atk.Name="Damage"
  83. Atk.Parent=Stats
  84. Atk.Value=1
  85. local Def=Instance.new("NumberValue")
  86. Def.Name="Defense"
  87. Def.Parent=Stats
  88. Def.Value=1
  89. local Speed=Instance.new("NumberValue")
  90. Speed.Name="Speed"
  91. Speed.Parent=Stats
  92. Speed.Value=1
  93. local Mvmt=Instance.new("NumberValue")
  94. Mvmt.Name="Movement"
  95. Mvmt.Parent=Stats
  96. Mvmt.Value=1
  97. local Block=Instance.new("BoolValue")
  98. Block.Name="Block"
  99. Block.Parent=Stats
  100. Block.Value=false
  101. local Stun=Instance.new("NumberValue")
  102. Stun.Name="Stun"
  103. Stun.Parent=Stats
  104. Stun.Value=0
  105. local Stunned=Instance.new("BoolValue")
  106. Stunned.Name="Stunned"
  107. Stunned.Parent=Stats
  108. Stunned.Value=false
  109. local Stagger=Instance.new("BoolValue")
  110. Stagger.Name="Stagger"
  111. Stagger.Parent=Stats
  112. Stagger.Value=false
  113. local StaggerHit=Instance.new("BoolValue")
  114. StaggerHit.Name="StaggerHit"
  115. StaggerHit.Parent=Stats
  116. StaggerHit.Value=false
  117. local RecentEnemy=Instance.new("ObjectValue")
  118. RecentEnemy.Name="RecentEnemy"
  119. RecentEnemy.Parent=Stats
  120. RecentEnemy.Value=nil
  121.  
  122. function NoOutline(Part)
  123. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  124. end
  125.  
  126. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  127. local fp=it("Part")
  128. fp.formFactor=formfactor
  129. fp.Parent=parent
  130. fp.Reflectance=reflectance
  131. fp.Transparency=transparency
  132. fp.CanCollide=false
  133. fp.Locked=true
  134. fp.BrickColor=brickcolor
  135. fp.Name=name
  136. fp.Size=size
  137. fp.Position=Torso.Position
  138. NoOutline(fp)
  139. fp.Material="SmoothPlastic"
  140. fp:BreakJoints()
  141. return fp
  142. end
  143.  
  144. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  145. local mesh=it(Mesh)
  146. mesh.Parent=part
  147. if Mesh=="SpecialMesh" then
  148. mesh.MeshType=meshtype
  149. if meshid~="nil" then
  150. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  151. end
  152. end
  153. mesh.Offset=offset
  154. mesh.Scale=scale
  155. return mesh
  156. end
  157.  
  158. function weld(parent,part0,part1,c0)
  159. local weld=it("Weld")
  160. weld.Parent=parent
  161. weld.Part0=part0
  162. weld.Part1=part1
  163. weld.C0=c0
  164. return weld
  165. end
  166.  
  167. local Color1=Torso.BrickColor
  168.  
  169. local fengui=it("GuiMain")
  170. fengui.Parent=Player.PlayerGui
  171. fengui.Name="WeaponGUI"
  172. local fenframe=it("Frame")
  173. fenframe.Parent=fengui
  174. fenframe.BackgroundColor3=Color3.new(255,255,255)
  175. fenframe.BackgroundTransparency=1
  176. fenframe.BorderColor3=Color3.new(17,17,17)
  177. fenframe.Size=UDim2.new(0.0500000007, 0, 0.100000001, 0)
  178. fenframe.Position=UDim2.new(0.4,0,0.1,0)
  179. local fenbarmana1=it("TextLabel")
  180. fenbarmana1.Parent=fenframe
  181. fenbarmana1.Text=" "
  182. fenbarmana1.BackgroundTransparency=0
  183. fenbarmana1.BackgroundColor3=Color3.new(0,0,0)
  184. fenbarmana1.SizeConstraint="RelativeXY"
  185. fenbarmana1.TextXAlignment="Center"
  186. fenbarmana1.TextYAlignment="Center"
  187. fenbarmana1.Position=UDim2.new(0,0,0,0)
  188. fenbarmana1.Size=UDim2.new(4,0,0.2,0)
  189. local fenbarmana2=it("TextLabel")
  190. fenbarmana2.Parent=fenframe
  191. fenbarmana2.Text=" "
  192. fenbarmana2.BackgroundTransparency=0
  193. fenbarmana2.BackgroundColor3=Torso.Color
  194. fenbarmana2.SizeConstraint="RelativeXY"
  195. fenbarmana2.TextXAlignment="Center"
  196. fenbarmana2.TextYAlignment="Center"
  197. fenbarmana2.Position=UDim2.new(0,0,0,0)
  198. fenbarmana2.Size=UDim2.new(4*mana/100,0,0.2,0)
  199. local fenbarmana3=it("TextLabel")
  200. fenbarmana3.Parent=fenframe
  201. fenbarmana3.Text=" "
  202. fenbarmana3.BackgroundTransparency=0
  203. fenbarmana3.BackgroundColor3=Color3.new(Col1,Col2,Col3)
  204. fenbarmana3.SizeConstraint="RelativeXY"
  205. fenbarmana3.TextXAlignment="Center"
  206. fenbarmana3.TextYAlignment="Center"
  207. fenbarmana3.Position=UDim2.new(0,0,0,0)
  208. fenbarmana3.Size=UDim2.new(0,0,0.2,0)
  209. local fenbarmana4=it("TextLabel")
  210. fenbarmana4.Parent=fenframe
  211. fenbarmana4.Text="Mana("..mana..")"
  212. fenbarmana4.BackgroundTransparency=1
  213. fenbarmana4.BackgroundColor3=Color3.new(0,0,0)
  214. fenbarmana4.SizeConstraint="RelativeXY"
  215. fenbarmana4.TextXAlignment="Center"
  216. fenbarmana4.TextYAlignment="Center"
  217. fenbarmana4.Position=UDim2.new(0,0,-0.3,0)
  218. fenbarmana4.Size=UDim2.new(4,0,0.2,0)
  219. fenbarmana4.FontSize="Size9"
  220. fenbarmana4.TextStrokeTransparency=0
  221. fenbarmana4.TextColor=BrickColor.new("White")
  222.  
  223. local modelzorz=Instance.new("Model")
  224. modelzorz.Parent=Character
  225. modelzorz.Name="Glaciem"
  226.  
  227. local prt1=part(3,modelzorz,0,0,TorsoColor,"Part01",vt())
  228. local prt2=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part02",vt())
  229. local prt3=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Part03",vt())
  230. local prt4=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Part04",vt())
  231. local prt5=part(3,modelzorz,0,0,BrickColor.new("Cyan"),"Part05",vt())
  232. local prt6=part(3,modelzorz,0,0,BrickColor.new("Cyan"),"Part06",vt())
  233. local prt7=part(3,modelzorz,0,0,BrickColor.new("Cyan"),"Part07",vt())
  234. local prtt=part(3,modelzorz,0.8,0,BrickColor.new("Medium blue"),"Part09",vt())
  235. local sprt1=part(3,modelzorz,0,0,BrickColor.new("Black"),"Shield Part01",vt())
  236. local sprt2=part(3,modelzorz,0.5,0,BrickColor.new("Cyan"),"Shield Part02",vt())
  237. local sprt3=part(3,modelzorz,0.5,0,BrickColor.new("Cyan"),"Shield Part03",vt())
  238. local sprt4=part(3,modelzorz,0.5,0,BrickColor.new("Cyan"),"Shield Part04",vt())
  239. local sprt5=part(3,modelzorz,0.5,0,BrickColor.new("Cyan"),"Shield Part05",vt())
  240. local sprt6=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Shield Part06",vt())
  241. local sprt7=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Shield Part07",vt())
  242. local sprt8=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Shield Part08",vt())
  243. local sprt9=part(3,modelzorz,0,0,BrickColor.new("Bright blue"),"Shield Part09",vt())
  244. local sprt10=part(3,modelzorz,0,0,BrickColor.new("Medium blue"),"Shield Part10",vt())
  245.  
  246. local msh1=mesh("SpecialMesh",prt1,"Head","nil",vt(0,0,0),vt(2,6,2))
  247. local msh2=mesh("CylinderMesh",prt2,"","",vt(0,0,0),vt(1.5,8,1.5))
  248. local msh3=mesh("SpecialMesh",prt3,"FileMesh","9756362",vt(0,0,0),vt(.6,.5,.6))
  249. local msh4=mesh("SpecialMesh",prt4,"FileMesh","9756362",vt(0,0,0),vt(1.35,.35,.7))
  250. local msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(10,1,3))
  251. local msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(3,1.2,3.1))
  252. local msh7=mesh("BlockMesh",prt7,"","",vt(0,0,0),vt(3,1.2,3.1))
  253. local msht=mesh("SpecialMesh",prtt,"FileMesh","9756362",vt(0,0,0),vt(0.8,1.4,0.31))
  254. local smsh1=mesh("BlockMesh",sprt1,"","",vt(0,0,0),vt(1,1,1))
  255. local smsh2=mesh("SpecialMesh",sprt2,"Wedge","nil",vt(0,0,0),vt(1.5,6,10))
  256. local smsh3=mesh("SpecialMesh",sprt3,"Wedge","nil",vt(0,0,0),vt(1.5,6,10))
  257. local smsh4=mesh("SpecialMesh",sprt4,"Wedge","nil",vt(0,0,0),vt(1.5,6,5))
  258. local smsh5=mesh("SpecialMesh",sprt5,"Wedge","nil",vt(0,0,0),vt(1.5,6,5))
  259. local smsh6=mesh("SpecialMesh",sprt6,"Wedge","nil",vt(0,0,0),vt(1.2,8,12))
  260. local smsh7=mesh("SpecialMesh",sprt7,"Wedge","nil",vt(0,0,0),vt(1.2,8,12))
  261. local smsh8=mesh("SpecialMesh",sprt8,"Wedge","nil",vt(0,0,0),vt(1.2,8,7))
  262. local smsh9=mesh("SpecialMesh",sprt9,"Wedge","nil",vt(0,0,0),vt(1.2,8,7))
  263. local smsh10=mesh("SpecialMesh",sprt10,"FileMesh","187687193",vt(0,0,0),vt(3,1,3))
  264. --Meshes = {187687161, 187687175, 187687193}
  265.  
  266. local wld1=weld(prt1,prt1,sprt1,euler(0,0,0)*cf(0,2.5,0))
  267. --local wld1=weld(prt1,prt1,RightArm,euler(1.57,0,0)*cf(0,1,0))
  268. local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0,0))
  269. local wld3=weld(prt3,prt3,prt2,euler(0,0,0)*cf(0,.8,0))
  270. local wld4=weld(prt4,prt4,prt2,euler(0,1.57,0)*cf(0,-.9,0))
  271. local wld5=weld(prt5,prt5,prt4,euler(0,0,0)*cf(0,-.05,0))
  272. local wld6=weld(prt6,prt6,prt5,euler(0,0,-1.4)*cf(-1,-.2,0))
  273. local wld7=weld(prt7,prt7,prt5,euler(0,0,1.4)*cf(1,-.2,0))
  274. local wldt=weld(prtt,prtt,prt4,euler(0,0,0)*cf(0,-3.45,0))
  275. local swld1=weld(sprt1,sprt1,LeftArm,euler(-1.57,0,0)*cf(.5,.5,0))
  276. local swld2=weld(sprt2,sprt2,sprt1,euler(-1.57,0,0)*cf(.1,-.8,-.6))
  277. local swld3=weld(sprt3,sprt3,sprt1,euler(-1.57,3.14,0)*cf(.1,-.8,.6))
  278. local swld4=weld(sprt4,sprt4,sprt1,euler(-1.57,0,3.14)*cf(.1,.7,-.6))
  279. local swld5=weld(sprt5,sprt5,sprt1,euler(-1.57,3.14,3.14)*cf(.1,.7,.6))
  280. local swld6=weld(sprt6,sprt6,sprt1,euler(-1.57,0,0)*cf(.1,-1,-.8))
  281. local swld7=weld(sprt7,sprt7,sprt1,euler(-1.57,3.14,0)*cf(.1,-1,.8))
  282. local swld8=weld(sprt8,sprt8,sprt1,euler(-1.57,0,3.14)*cf(.1,.9,-.8))
  283. local swld9=weld(sprt9,sprt9,sprt1,euler(-1.57,3.14,3.14)*cf(.1,.9,.8))
  284. local swld10=weld(sprt10,sprt10,sprt1,euler(0,0,1.57)*cf(.25,0,0))
  285.  
  286. for i=0,180,180 do
  287. for x=-20,20,40 do
  288. local lol=i-90
  289. local lol2=math.abs(lol/480)
  290. local lol3=x/90
  291. local prt8=part(3,modelzorz,0.8,0,BrickColor.new("Medium blue"),"Part08",vt())
  292. local msh8=mesh("BlockMesh",prt8,"","",vt(0,0,0),vt(0.2,17.5,2.97))
  293. --local wld8=weld(prt8,prt4,prt8,euler(0,0,0)*cf(.2,-1.7,0)*euler(0,-0.3-0.785,0))
  294. local wld8=weld(prt8,prt4,prt8,cf(0,1.7,0)*euler(0,math.rad(i+x)+1.57,0))
  295. wld8.C1=cf(lol2,0,-lol3)*euler(0,0,0)
  296. end
  297. end
  298.  
  299. local hitbox=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
  300. hitbox.Anchored=false
  301. local hitbox2=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
  302. hitbox2.Anchored=true
  303.  
  304. if (script.Parent.className~="HopperBin") then
  305. Tool=Instance.new("HopperBin")
  306. Tool.Parent=Backpack
  307. Tool.Name="Glaciem"
  308. script.Parent=Tool
  309. end
  310. Bin=script.Parent
  311.  
  312. local bodvel=Instance.new("BodyVelocity")
  313. local bg=Instance.new("BodyGyro")
  314.  
  315. so = function(id,par,vol,pit)
  316. coroutine.resume(coroutine.create(function()
  317. local sou = Instance.new("Sound",par or workspace)
  318. sou.Volume=vol
  319. sou.Pitch=pit or 1
  320. sou.SoundId=id
  321. swait()
  322. sou:play()
  323. game:GetService("Debris"):AddItem(sou,6)
  324. end))
  325. end
  326.  
  327. function clerp(a,b,t)
  328. local qa = {QuaternionFromCFrame(a)}
  329. local qb = {QuaternionFromCFrame(b)}
  330. local ax, ay, az = a.x, a.y, a.z
  331. local bx, by, bz = b.x, b.y, b.z
  332. local _t = 1-t
  333. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  334. end
  335.  
  336. function QuaternionFromCFrame(cf)
  337. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  338. local trace = m00 + m11 + m22
  339. if trace > 0 then
  340. local s = math.sqrt(1 + trace)
  341. local recip = 0.5/s
  342. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  343. else
  344. local i = 0
  345. if m11 > m00 then
  346. i = 1
  347. end
  348. if m22 > (i == 0 and m00 or m11) then
  349. i = 2
  350. end
  351. if i == 0 then
  352. local s = math.sqrt(m00-m11-m22+1)
  353. local recip = 0.5/s
  354. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  355. elseif i == 1 then
  356. local s = math.sqrt(m11-m22-m00+1)
  357. local recip = 0.5/s
  358. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  359. elseif i == 2 then
  360. local s = math.sqrt(m22-m00-m11+1)
  361. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  362. end
  363. end
  364. end
  365.  
  366. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  367. local xs, ys, zs = x + x, y + y, z + z
  368. local wx, wy, wz = w*xs, w*ys, w*zs
  369. local xx = x*xs
  370. local xy = x*ys
  371. local xz = x*zs
  372. local yy = y*ys
  373. local yz = y*zs
  374. local zz = z*zs
  375. 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))
  376. end
  377.  
  378. function QuaternionSlerp(a, b, t)
  379. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  380. local startInterp, finishInterp;
  381. if cosTheta >= 0.0001 then
  382. if (1 - cosTheta) > 0.0001 then
  383. local theta = math.acos(cosTheta)
  384. local invSinTheta = 1/math.sin(theta)
  385. startInterp = math.sin((1-t)*theta)*invSinTheta
  386. finishInterp = math.sin(t*theta)*invSinTheta
  387. else
  388. startInterp = 1-t
  389. finishInterp = t
  390. end
  391. else
  392. if (1+cosTheta) > 0.0001 then
  393. local theta = math.acos(-cosTheta)
  394. local invSinTheta = 1/math.sin(theta)
  395. startInterp = math.sin((t-1)*theta)*invSinTheta
  396. finishInterp = math.sin(t*theta)*invSinTheta
  397. else
  398. startInterp = t-1
  399. finishInterp = t
  400. end
  401. end
  402. 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
  403. end
  404.  
  405. function hideanim()
  406. equipped=false
  407. for i=0,1,0.2 do
  408. swait()
  409. wld1.C0=clerp(wld1.C0,euler(1.7,-.2,.5)*cf(0,1,0),.4)
  410. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,.4),.4)
  411. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
  412. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.5,0,-.5)*euler(0,1.57,0),.4)
  413. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  414. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.3,-1.2,-.5),.4)
  415. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  416. RH.C0=clerp(RH.C0,RHC0,.4)
  417. RH.C1=clerp(RH.C1,RHC1,.4)
  418. LH.C0=clerp(LH.C0,LHC0,.4)
  419. LH.C1=clerp(LH.C1,LHC1,.4)
  420. end
  421. Mvmt.Value=Mvmt.Value+.1
  422. wld1.Part1=sprt1
  423. wld1.C0=euler(0,0,0)*cf(0,2.5,0)
  424. for i=0,1,0.3 do
  425. swait()
  426. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.4)
  427. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
  428. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0),.4)
  429. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  430. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.4)
  431. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  432. end
  433. end
  434.  
  435. function equipanim()
  436. equipped=true
  437. for i=0,1,0.2 do
  438. swait()
  439. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,.4),.4)
  440. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
  441. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.5,0,-.5)*euler(0,1.57,0),.4)
  442. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  443. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.3,-1.2,-.5),.4)
  444. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  445. end
  446. Mvmt.Value=Mvmt.Value-.1
  447. wld1.Part1=RightArm
  448. wld1.C0=euler(1.7,-.2,.5)*cf(0,1,0)
  449. local hit,pos=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,200,Character)
  450. if hit~=nil then
  451. local ref=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  452. ref.Anchored=true
  453. ref.CFrame=cf(pos)
  454. game:GetService("Debris"):AddItem(ref,1)
  455. MagicWave(BrickColor.new("Medium blue"),cf(ref.Position),1,1,1,1,.5,1,.1)
  456. end
  457. for i=0,1,0.1 do
  458. swait()
  459. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  460. Neck.C0=clerp(Neck.C0,necko*euler(.1,0,-.2),.3)
  461. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  462. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,1)*euler(0,1,0),.3)
  463. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  464. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.1,0,-1.4)*euler(0,-.2,0),.3)
  465. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  466. end
  467. end
  468.  
  469. function StaggerAnim()
  470. attack=true
  471. for i=1,math.random(2,4) do
  472. 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)
  473. end
  474. for i=0,1,0.35 do
  475. swait()
  476. Torso.Velocity=RootPart.CFrame.lookVector*-40
  477. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  478. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5)*euler(.1,0,0),.3)
  479. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,-.4),.3)
  480. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.7)*euler(0,-.7,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(-.2,0,-.4)*euler(0,.4,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,-.8,0)*euler(0,1.57,0)*euler(-.5,0,.6),.3)
  485. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.2,.2),.3)
  486. end
  487. for i=0,1,0.2 do
  488. swait()
  489. Torso.Velocity=RootPart.CFrame.lookVector*-40
  490. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.4)
  491. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5)*euler(.1,0,0),.4)
  492. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(-.5,0,-.4),.4)
  493. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.7)*euler(0,-.7,0),.4)
  494. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  495. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4)*euler(0,.4,0),.4)
  496. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  497. RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.5,0,.6),.4)
  498. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.2,.5),.4)
  499. end
  500. for i=0,1,0.1 do
  501. swait()
  502. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  503. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.4)*euler(.5,0,0),.3)
  504. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.8)*euler(-.2,0,-.4),.3)
  505. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.3,0,.4)*euler(0,-.4,0),.3)
  506. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  507. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.3,0,-.2)*euler(0,.4,0),.3)
  508. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  509. RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.5,0,1.2),.3)
  510. LH.C0=clerp(LH.C0,cf(-1,0,-1)*euler(0,-1.57,0)*euler(0,.2,.2),.3)
  511. end
  512. swait(15)
  513. combo=0
  514. attack=false
  515. end
  516.  
  517. function StaggerHitt()
  518. attack=true
  519. for i=1,math.random(2,4) do
  520. 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)
  521. end
  522. for i=0,1,0.1 do
  523. swait()
  524. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  525. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.7)*euler(.1,0,0),.3)
  526. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,-.6),.3)
  527. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.9)*euler(0,-.7,0),.3)
  528. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  529. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4)*euler(0,.4,0),.3)
  530. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  531. RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.2,0,-.4),.3)
  532. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.2,.2),.3)
  533. end
  534. attack=false
  535. end
  536.  
  537. function StunAnim()
  538. attack=true
  539. Stunned.Value=true
  540. for i=0,1,0.3 do
  541. swait()
  542. Humanoid.WalkSpeed=0
  543. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  544. Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,-.5),.2)
  545. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.2,0,-3),.2)
  546. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,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,0,.4)*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,.3),.25)
  551. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.2,0,0),.25)
  552. end
  553. for i=0,1,0.3 do
  554. swait()
  555. Humanoid.WalkSpeed=0
  556. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  557. Neck.C0=clerp(Neck.C0,necko*euler(-.3,0,-.5),.2)
  558. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.5)*euler(.8,0,-3),.2)
  559. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
  560. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  561. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1.2,0,.8)*euler(0,-.1,0),.2)
  562. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  563. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.6),.25)
  564. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(.1,0,.7),.25)
  565. end
  566. for i=0,1,0.3 do
  567. swait()
  568. Humanoid.WalkSpeed=0
  569. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  570. Neck.C0=clerp(Neck.C0,necko*euler(-.3,0,-1),.2)
  571. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2)*euler(1.57,0,-3),.2)
  572. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
  573. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  574. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8)*euler(0,-.1,0),.2)
  575. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  576. RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.2,0,.6),.25)
  577. LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.1,0,.3),.25)
  578. end
  579. gairo=Instance.new("BodyGyro")
  580. gairo.Parent=RootPart
  581. gairo.maxTorque=Vector3.new(4e+005,4e+005,4e+005)*math.huge
  582. gairo.P=20e+003
  583. gairo.cframe=RootPart.CFrame
  584. v=Instance.new("BodyVelocity",RootPart)
  585. v.Name="BodVel"
  586. v.P=2000
  587. v.maxForce=Vector3.new(500000000,50000000,500000000)
  588. v.velocity=vt(0,-50,0)
  589. for i=0,1,0.1 do
  590. swait()
  591. Humanoid.WalkSpeed=0
  592. v.velocity=vt(0,-50,0)
  593. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  594. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.57),.3)
  595. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2.5)*euler(1.57,0,-3.14),.3)
  596. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1.5)*euler(.2,0,0),.3)
  597. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  598. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.5,0,-1.57)*euler(0,0,0),.3)
  599. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  600. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(-.3,.5,0),.3)
  601. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(-.1,.2,0),.3)
  602. end
  603. for i=1,70 do
  604. swait()
  605. Humanoid.WalkSpeed=0
  606. v.velocity=vt(0,-50,0)
  607. end
  608. v.velocity=vt(0,0,0)
  609. for i=0,1,0.2 do
  610. swait()
  611. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  612. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0),.3)
  613. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2)*euler(1,0,-4),.3)
  614. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1)*euler(.2,-1,0),.3)
  615. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  616. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,.2)*euler(0,0,0),.3)
  617. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  618. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(-.3,.5,.4),.3)
  619. LH.C0=clerp(LH.C0,cf(-1,-1,-1)*euler(0,-1.57,0)*euler(-.1,.2,1),.3)
  620. end
  621. gairo.Parent=nil
  622. v.Parent=nil
  623. combo=0
  624. Stunned.Value=false
  625. attack=false
  626. end
  627.  
  628. function attackone()
  629. attack=true
  630. for i=0,1,0.2 do
  631. swait()
  632. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.2),.4)
  633. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.3),.4)
  634. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,1.2)*euler(0,-2,0),.4)
  635. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  636. LW.C0=clerp(LW.C0,cf(-1.4,0.5,-.2)*euler(.7,0,.1)*euler(0,-.4,0),.4)
  637. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  638. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.3,0),.4)
  639. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.3,0),.4)
  640. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  641. break
  642. end
  643. end
  644. hitbox.Parent=modelzorz
  645. hitbox.Size=vt(1.1,4,.5)
  646. hitbox.Transparency=1
  647. hitbox.CFrame=prtt.CFrame*cf(0,-1.2,0)
  648. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,10,15,math.random(5,10),"Normal",RootPart,.5,1,math.random(2,8),nil,true) end)
  649. blcf=nil
  650. scfr=nil
  651. for i=0,1,0.1 do
  652. swait()
  653. local blcf = prtt.CFrame*cf(0,-1.2,0)
  654. if scfr and (prtt.Position-scfr.p).magnitude > .1 then
  655. local h = 4.3
  656. 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)
  657. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  658. 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)
  659. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  660. scfr = blcf
  661. elseif not scfr then
  662. scfr = blcf
  663. end
  664. hitbox.CFrame=prtt.CFrame*cf(0,-1.2,0)
  665. wld1.C0=clerp(wld1.C0,euler(2.9,0,0)*cf(0,.8,-.2),.25)
  666. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,-.3),.25)
  667. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.3),.25)
  668. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.2,0,-1)*euler(0,-1,0),.25)
  669. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.25)
  670. LW.C0=clerp(LW.C0,cf(-1.4,0.5,-.2)*euler(.7,0,-.7)*euler(0,0,0),.25)
  671. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.25)
  672. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,-.3,0),.25)
  673. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,-.3,0),.25)
  674. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  675. break
  676. end
  677. end
  678. con1:disconnect()
  679. hitbox.Parent=nil
  680. attack=false
  681. end
  682.  
  683. function attacktwo()
  684. attack=true
  685. for i=0,1,0.2 do
  686. swait()
  687. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.4)
  688. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.2)*euler(-.2,0,0),.4)
  689. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.2),.4)
  690. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(2.2,0,-.8)*euler(0,1,0),.4)
  691. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  692. LW.C0=clerp(LW.C0,cf(-1.4,0.5,-.2)*euler(.5,0,-.5),.4)
  693. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  694. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,-.2,0),.4)
  695. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,-.2,0),.4)
  696. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  697. break
  698. end
  699. end
  700. hitbox.Parent=modelzorz
  701. hitbox.Size=vt(1.1,4,.5)
  702. hitbox.Transparency=1
  703. hitbox.CFrame=prtt.CFrame*cf(0,-1.2,0)
  704. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,10,15,math.random(5,10),"Normal",RootPart,.5,1,math.random(2,8),nil,true) end)
  705. blcf=nil
  706. scfr=nil
  707. for i=0,1,0.15 do
  708. swait()
  709. local blcf = prtt.CFrame*cf(0,-1.2,0)
  710. if scfr and (prtt.Position-scfr.p).magnitude > .1 then
  711. local h = 4.3
  712. 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)
  713. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  714. 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)
  715. if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
  716. scfr = blcf
  717. elseif not scfr then
  718. scfr = blcf
  719. end
  720. hitbox.CFrame=prtt.CFrame*cf(0,-1.2,0)
  721. wld1.C0=clerp(wld1.C0,euler(2.2,0,0)*cf(0,.8,0),.4)
  722. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.2)*euler(.4,0,0),.4)
  723. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.5),.4)
  724. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.2,0,.3)*euler(0,.2,0),.4)
  725. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  726. LW.C0=clerp(LW.C0,cf(-1.4,0.5,-.2)*euler(-.5,0,-.2),.4)
  727. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  728. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.5,0),.4)
  729. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.4)
  730. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  731. break
  732. end
  733. end
  734. con1:disconnect()
  735. hitbox.Parent=nil
  736. attack=false
  737. end
  738.  
  739. function attackthree()
  740. attack=true
  741. for i=0,1,0.2 do
  742. swait()
  743. wld1.C0=clerp(wld1.C0,euler(2,0,0)*cf(0,.8,0),.4)
  744. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.4)*euler(-.4,0,0),.4)
  745. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.4),.4)
  746. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(2.9,0,-.6)*euler(0,.2,0),.4)
  747. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  748. LW.C0=clerp(LW.C0,cf(-1,0.5,-.4)*euler(3,0,.8)*euler(0,0,0),.4)
  749. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
  750. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,-.4,0),.4)
  751. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,-.4,0),.4)
  752. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  753. break
  754. end
  755. end
  756. hitbox.Parent=modelzorz
  757. hitbox.Size=vt(1.1,4,.5)
  758. hitbox.Transparency=1
  759. hitbox.CFrame=prtt.CFrame*cf(0,-1.2,0)
  760. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,15,20,math.random(5,10),"Normal",RootPart,.5,1,math.random(4,10),nil,true) end)
  761. blcf=nil
  762. scfr=nil
  763. for i=0,1,0.1 do
  764. swait()
  765. local blcf = prtt.CFrame*cf(0,-1.2,0)
  766. if scfr and (prtt.Position-scfr.p).magnitude > .1 then
  767. local h = 4.3
  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. hitbox.CFrame=prtt.CFrame*cf(0,-1.2,0)
  777. wld1.C0=clerp(wld1.C0,euler(2.4,0,0)*cf(0,.8,0),.3)
  778. Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.6)*euler(.4,0,0),.3)
  779. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.6),.3)
  780. RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(.5,0,0)*euler(0,-1,0),.3)
  781. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  782. LW.C0=clerp(LW.C0,cf(-.6,0.5,-.5)*euler(.2,0,.6)*euler(0,-1,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,-.6,0),.3)
  785. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,-.6,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 attackfour()
  796. attack=true
  797. for i=0,1,0.2 do
  798. swait()
  799. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  800. Neck.C0=clerp(Neck.C0,necko*euler(.2,0,.5),.3)
  801. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.5),.3)
  802. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.4),.3)
  803. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  804. LW.C0=clerp(LW.C0,cf(-.8,0.5,-.5)*euler(1.57,0,1.2)*euler(0,.2,0),.3)
  805. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  806. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.5,0),.25)
  807. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.25)
  808. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  809. break
  810. end
  811. end
  812. Torso.Velocity=RootPart.CFrame.lookVector*100
  813. hitbox.Parent=modelzorz
  814. hitbox.Size=vt(1,3.5,3)
  815. hitbox.Transparency=1
  816. hitbox.CFrame=sprt1.CFrame*cf(0,.3,0)
  817. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,10,15,math.random(20,30),"Knockdown2",RootPart,.5,1,math.random(5,15),nil,false) end)
  818. for i=0,1,0.1 do
  819. swait()
  820. hitbox.CFrame=sprt1.CFrame*cf(0,.3,0)
  821. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  822. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.3),.3)
  823. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.3),.3)
  824. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.6),.3)
  825. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  826. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.57,0,1),.3)
  827. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  828. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  829. break
  830. end
  831. end
  832. con1:disconnect()
  833. hitbox.Parent=nil
  834. --swait(10)
  835. for i=1,5 do
  836. swait()
  837. if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  838. break
  839. end
  840. end
  841. attack=false
  842. end
  843.  
  844. function Guard()
  845. attack=true
  846. guard=true
  847. Mvmt.Value=Mvmt.Value-.4
  848. Block.Value=true
  849. for i=0,1,0.15 do
  850. swait()
  851. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  852. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.3),.3)
  853. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.3),.3)
  854. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.2),.3)
  855. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  856. LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.57,0,1.27),.3)
  857. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  858. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.3,0),.3)
  859. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.3,0),.3)
  860. end
  861. while guard==true and Block.Value==true do
  862. swait()
  863. end
  864. Block.Value=false
  865. Mvmt.Value=Mvmt.Value+.4
  866. attack=false
  867. end
  868.  
  869. function ShieldSlam()
  870. attack=true
  871. local ref=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
  872. ref.Anchored=true
  873. ref.CFrame=RootPart.CFrame*cf(0,0,-2)
  874. game:GetService("Debris"):AddItem(ref,1)
  875. for _,c in pairs(workspace:children()) do
  876. local hum=c:findFirstChild("Humanoid")
  877. if hum~=nil then
  878. local head=c:findFirstChild("HumanoidRootPart")
  879. if head~=nil then
  880. if GetDist(head,ref,3)==true then
  881. if head.Parent:findFirstChild("Stats")~=nil then
  882. if head.Parent.Stats.Stunned.Value==true then
  883. Humanoid.WalkSpeed=0
  884. for i=0,1,0.2 do
  885. swait()
  886. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  887. Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,0),.3)
  888. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  889. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.4),.3)
  890. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  891. LW.C0=clerp(LW.C0,cf(-1,1,-.5)*euler(2.5,0,1.3)*euler(0,0,0),.3)
  892. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  893. end
  894. hitbox.Parent=modelzorz
  895. hitbox.Size=vt(1,3.5,3)
  896. hitbox.Transparency=1
  897. hitbox.CFrame=sprt1.CFrame*cf(0,.3,0)
  898. con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,20,25,math.random(5,10),"Normal",RootPart,1,1,math.random(5,15),nil,false) end)
  899. for i=0,1,0.15 do
  900. swait()
  901. hitbox.CFrame=sprt1.CFrame*cf(0,.3,0)
  902. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
  903. Neck.C0=clerp(Neck.C0,necko*euler(.4,0,.6),.3)
  904. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.8)*euler(0,0,-.6),.3)
  905. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.4),.3)
  906. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  907. LW.C0=clerp(LW.C0,cf(-1.3,.2,-.5)*euler(1.3,0,1)*euler(0,0,0),.3)
  908. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  909. RH.C0=clerp(RH.C0,cf(1.1,-1,0)*euler(0,1.57,0)*euler(0,0,-1),.3)
  910. LH.C0=clerp(LH.C0,cf(-1,.2,-.4)*euler(0,-1.57,0)*euler(-.2,0,.2),.3)
  911. end
  912. con1:disconnect()
  913. hitbox.Parent=nil
  914. Humanoid.WalkSpeed=16
  915. end
  916. end
  917. end
  918. end
  919. end
  920. end
  921. attack=false
  922. end
  923.  
  924. function GetDist(Part1,Part2,magni)
  925. local targ=Part1.Position-Part2.Position
  926. local mag=targ.magnitude
  927. if mag<=magni then
  928. return true
  929. else
  930. return false
  931. end
  932. end
  933.  
  934. function MagniDamage(Part,magni,mindam,maxdam,knock,Type)
  935. for _,c in pairs(workspace:children()) do
  936. local hum=c:findFirstChild("Humanoid")
  937. if hum~=nil then
  938. local head=c:findFirstChild("Torso")
  939. if head~=nil then
  940. local targ=head.Position-Part.Position
  941. local mag=targ.magnitude
  942. if mag<=magni and c.Name~=Player.Name then
  943. Damagefunc(head,mindam,maxdam,knock,Type,RootPart,.2,1,3)
  944. end
  945. end
  946. end
  947. end
  948. end
  949.  
  950. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  951. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  952. end
  953.  
  954. local Point=Torso.CFrame*cf(0,Torso.Size.Y,0)
  955. LastPoint=Point
  956. function effect(Color,Ref,LP,P1,returnn)
  957. if LP==nil or P1==nil then return end
  958. local effectsmsh=Instance.new("CylinderMesh")
  959. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  960. effectsmsh.Name="Mesh"
  961. local effectsg=Instance.new("Part")
  962. NoOutline(effectsg)
  963. effectsg.formFactor=3
  964. effectsg.CanCollide=false
  965. effectsg.Name="Eff"
  966. effectsg.Locked=true
  967. effectsg.Anchored=true
  968. effectsg.Size=Vector3.new(0.5,1,0.5)
  969. effectsg.Parent=workspace
  970. effectsmsh.Parent=effectsg
  971. effectsg.BrickColor=BrickColor.new(Color)
  972. effectsg.Reflectance=Ref
  973. local point1=P1
  974. local mg=(LP.p - point1.p).magnitude
  975. effectsg.Size=Vector3.new(0.5,mg,0.5)
  976. effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
  977. effectsmsh.Scale=Vector3.new(0.2,1,0.2)
  978. game:GetService("Debris"):AddItem(effectsg,2)
  979. if returnn then return effectsg end
  980. if not returnn then
  981. table.insert(Effects,{effectsg,"Cylinder",0.2,0.01,0,0.01,effectsmsh})
  982. end
  983. end
  984.  
  985. local function CFrameFromTopBack(at, top, back)
  986. local right = top:Cross(back)
  987. return CFrame.new(at.x, at.y, at.z,
  988. right.x, top.x, back.x,
  989. right.y, top.y, back.y,
  990. right.z, top.z, back.z)
  991. end
  992.  
  993. function Triangle(a, b, c)
  994. local edg1 = (c-a):Dot((b-a).unit)
  995. local edg2 = (a-b):Dot((c-b).unit)
  996. local edg3 = (b-c):Dot((a-c).unit)
  997. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  998. a, b, c = a, b, c
  999. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  1000. a, b, c = b, c, a
  1001. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  1002. a, b, c = c, a, b
  1003. else
  1004. assert(false, "unreachable")
  1005. end
  1006.  
  1007. local len1 = (c-a):Dot((b-a).unit)
  1008. local len2 = (b-a).magnitude - len1
  1009. local width = (a + (b-a).unit*len1 - c).magnitude
  1010.  
  1011. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  1012.  
  1013. local list = {}
  1014.  
  1015. if len1 > 0.01 then
  1016. local w1 = Instance.new('WedgePart', m)
  1017. game:GetService("Debris"):AddItem(w1,5)
  1018. w1.Material = "SmoothPlastic"
  1019. w1.FormFactor = 'Custom'
  1020. w1.BrickColor = BrickColor.new("Medium blue")
  1021. w1.Transparency = 0
  1022. w1.Reflectance = 0
  1023. w1.Material = "SmoothPlastic"
  1024. w1.CanCollide = false
  1025. NoOutline(w1)
  1026. local sz = Vector3.new(0.2, width, len1)
  1027. w1.Size = sz
  1028. local sp = Instance.new("SpecialMesh",w1)
  1029. sp.MeshType = "Wedge"
  1030. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  1031. w1:BreakJoints()
  1032. w1.Anchored = true
  1033. w1.Parent = workspace
  1034. w1.Transparency = 0.7
  1035. table.insert(Effects,{w1,"Disappear",.05})
  1036. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  1037. table.insert(list,w1)
  1038. end
  1039.  
  1040. if len2 > 0.01 then
  1041. local w2 = Instance.new('WedgePart', m)
  1042. game:GetService("Debris"):AddItem(w2,5)
  1043. w2.Material = "SmoothPlastic"
  1044. w2.FormFactor = 'Custom'
  1045. w2.BrickColor = BrickColor.new("Medium blue")
  1046. w2.Transparency = 0
  1047. w2.Reflectance = 0
  1048. w2.Material = "SmoothPlastic"
  1049. w2.CanCollide = false
  1050. NoOutline(w2)
  1051. local sz = Vector3.new(0.2, width, len2)
  1052. w2.Size = sz
  1053. local sp = Instance.new("SpecialMesh",w2)
  1054. sp.MeshType = "Wedge"
  1055. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  1056. w2:BreakJoints()
  1057. w2.Anchored = true
  1058. w2.Parent = workspace
  1059. w2.Transparency = 0.7
  1060. table.insert(Effects,{w2,"Disappear",.05})
  1061. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  1062. table.insert(list,w2)
  1063. end
  1064. return unpack(list)
  1065. end
  1066.  
  1067. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type,parent)
  1068. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1069. prt.Anchored=true
  1070. prt.CFrame=cframe
  1071. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1072. game:GetService("Debris"):AddItem(prt,5)
  1073. if Type==1 or Type==nil then
  1074. table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
  1075. elseif Type==2 then
  1076. table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh})
  1077. end
  1078. end
  1079.  
  1080. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1081. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1082. prt.Anchored=true
  1083. prt.CFrame=cframe
  1084. local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
  1085. game:GetService("Debris"):AddItem(prt,2)
  1086. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  1087. end
  1088.  
  1089. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1090. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1091. prt.Anchored=true
  1092. prt.CFrame=cframe
  1093. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1094. game:GetService("Debris"):AddItem(prt,2)
  1095. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  1096. end
  1097.  
  1098. function ClangEffect(brickcolor,cframe,duration,decrease,size,power)
  1099. local prt=part(3,workspace,0,1,brickcolor,"Effect",vt())
  1100. prt.Anchored=true
  1101. prt.CFrame=cframe
  1102. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(5,5,5))
  1103. game:GetService("Debris"):AddItem(prt,2)
  1104. table.insert(Effects,{prt,"CylinderClang",duration,decrease,size,power,prt.CFrame,nil})
  1105. end
  1106.  
  1107. function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  1108. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
  1109. prt.Anchored=true
  1110. prt.CFrame=cframe
  1111. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  1112. game:GetService("Debris"):AddItem(prt,5)
  1113. table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
  1114. end
  1115.  
  1116. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit)
  1117. if hit.Parent==nil then
  1118. return
  1119. end
  1120. if hit.Name=="Hitbox" and hit.Parent~=modelzorz then
  1121. StaggerHit.Value=true
  1122. end
  1123. h=hit.Parent:FindFirstChild("Humanoid")
  1124. for _,v in pairs(hit.Parent:children()) do
  1125. if v:IsA("Humanoid") then
  1126. h=v
  1127. end
  1128. end
  1129. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  1130. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  1131. end
  1132. if hit.Parent.className=="Hat" then
  1133. hit=hit.Parent.Parent:findFirstChild("Head")
  1134. end
  1135. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1136. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  1137. c=Instance.new("ObjectValue")
  1138. c.Name="creator"
  1139. c.Value=game:service("Players").LocalPlayer
  1140. c.Parent=h
  1141. RecentEnemy.Value=hit.Parent
  1142. game:GetService("Debris"):AddItem(c,.5)
  1143. minim=minim*Atk.Value
  1144. maxim=maxim*Atk.Value
  1145. Damage=math.random(minim,maxim)
  1146. blocked=false
  1147. enblock=nil
  1148. Stats=hit.Parent:findFirstChild("Stats")
  1149. if Stats~=nil then
  1150. enblock=Stats:findFirstChild("Block")
  1151. if Stats:findFirstChild("Defense")~=nil then
  1152. Damage=Damage/Stats.Defense.Value
  1153. if Damage<=3 and staghit==true then
  1154. StaggerHit.Value=true
  1155. end
  1156. end
  1157. if Stats:findFirstChild("Stun")~=nil then
  1158. Stats.Stun.Value=Stats.Stun.Value+incstun
  1159. end
  1160. if Stats:findFirstChild("Stagger")~=nil then
  1161. if stagger==true then
  1162. Stats.Stagger.Value=true
  1163. end
  1164. end
  1165. end
  1166. if enblock~=nil then
  1167. if enblock.Value==true then
  1168. blocked=true
  1169. end
  1170. end
  1171. if blocked==true then
  1172. showDamage(hit.Parent,"Block",.5,BrickColor.new("Bright blue"))
  1173. enblock.Value=false
  1174. Stagger.Value=true
  1175. else
  1176. Damage=math.floor(Damage)
  1177. h.Health=h.Health-Damage
  1178. showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  1179. if Type=="Knockdown" then
  1180. hum=hit.Parent.Humanoid
  1181. hum.PlatformStand=true
  1182. coroutine.resume(coroutine.create(function(HHumanoid)
  1183. swait(1)
  1184. HHumanoid.PlatformStand=false
  1185. end),hum)
  1186. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1187. --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1188. local bodvol=Instance.new("BodyVelocity")
  1189. bodvol.velocity=angle*knockback
  1190. bodvol.P=5000
  1191. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1192. bodvol.Parent=hit
  1193. rl=Instance.new("BodyAngularVelocity")
  1194. rl.P=3000
  1195. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1196. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1197. rl.Parent=hit
  1198. game:GetService("Debris"):AddItem(bodvol,.5)
  1199. game:GetService("Debris"):AddItem(rl,.5)
  1200. elseif Type=="Knockdown2" then
  1201. hum=hit.Parent.Humanoid
  1202. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1203. local bodvol=Instance.new("BodyVelocity")
  1204. bodvol.velocity=angle*knockback
  1205. bodvol.P=5000
  1206. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1207. bodvol.Parent=hit
  1208. game:GetService("Debris"):AddItem(bodvol,.5)
  1209. elseif Type=="Normal" then
  1210. vp=Instance.new("BodyVelocity")
  1211. vp.P=500
  1212. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1213. if KnockbackType==1 then
  1214. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  1215. elseif KnockbackType==2 then
  1216. vp.velocity=Property.CFrame.lookVector*knockback
  1217. end
  1218. game:GetService("Debris"):AddItem(vp,.5)
  1219. if knockback>0 then
  1220. vp.Parent=hit.Parent.Torso
  1221. end
  1222. end
  1223. end
  1224. debounce=Instance.new("BoolValue")
  1225. debounce.Name="DebounceHit"
  1226. debounce.Parent=hit.Parent
  1227. debounce.Value=true
  1228. game:GetService("Debris"):AddItem(debounce,Delay)
  1229. c=Instance.new("ObjectValue")
  1230. c.Name="creator"
  1231. c.Value=Player
  1232. c.Parent=h
  1233. game:GetService("Debris"):AddItem(c,.5)
  1234. CRIT=false
  1235. end
  1236. end
  1237.  
  1238. showDamage=function(Char,Dealt,du,Color)
  1239. m=Instance.new("Model")
  1240. m.Name=tostring(Dealt)
  1241. h=Instance.new("Humanoid")
  1242. h.Health=0
  1243. h.MaxHealth=0
  1244. h.Parent=m
  1245. c=Instance.new("Part")
  1246. c.Transparency=0
  1247. c.BrickColor=Color
  1248. c.Name="Head"
  1249. c.TopSurface=0
  1250. c.BottomSurface=0
  1251. c.formFactor="Plate"
  1252. c.Size=Vector3.new(1,.4,1)
  1253. ms=Instance.new("CylinderMesh")
  1254. ms.Scale=Vector3.new(.8,.8,.8)
  1255. if CRIT==true then
  1256. ms.Scale=Vector3.new(1,1.25,1)
  1257. end
  1258. ms.Parent=c
  1259. c.Reflectance=0
  1260. Instance.new("BodyGyro").Parent=c
  1261. c.Parent=m
  1262. if Char:findFirstChild("Head")~=nil then
  1263. c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1264. elseif Char.Parent:findFirstChild("Head")~=nil then
  1265. c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1266. end
  1267. f=Instance.new("BodyPosition")
  1268. f.P=2000
  1269. f.D=100
  1270. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1271. f.position=c.Position+Vector3.new(0,3,0)
  1272. f.Parent=c
  1273. game:GetService("Debris"):AddItem(m,.5+du)
  1274. c.CanCollide=false
  1275. m.Parent=workspace
  1276. c.CanCollide=false
  1277. end
  1278.  
  1279. combo=0
  1280. function ob1d(mouse)
  1281. if attack==true or equipped==false then return end
  1282. hold=true
  1283. if combo==0 then
  1284. combo=1
  1285. attackone()
  1286. elseif combo==1 then
  1287. combo=2
  1288. attacktwo()
  1289. elseif combo==2 then
  1290. combo=3
  1291. attackthree()
  1292. elseif combo==3 then
  1293. combo=0
  1294. attackfour()
  1295. end
  1296. coroutine.resume(coroutine.create(function()
  1297. for i=1,50 do
  1298. if attack==false then
  1299. swait()
  1300. end
  1301. end
  1302. if attack==false then
  1303. combo=0
  1304. end
  1305. end))
  1306. end
  1307.  
  1308. function ob1u(mouse)
  1309. hold = false
  1310. end
  1311.  
  1312. buttonhold = false
  1313.  
  1314. eul=0
  1315. equipped=false
  1316. function key(key)
  1317. if key=="g" then
  1318. if guard==true then
  1319. guard=false
  1320. end
  1321. end
  1322. if attack==true then return end
  1323. if key=="f" then
  1324. attack=true
  1325. if equipped==false then
  1326. equipped=true
  1327. RSH=ch.Torso["Right Shoulder"]
  1328. LSH=ch.Torso["Left Shoulder"]
  1329. --
  1330. RSH.Parent=nil
  1331. LSH.Parent=nil
  1332. --
  1333. RW.Name="Right Shoulder"
  1334. RW.Part0=ch.Torso
  1335. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1336. RW.C1=cf(0, 0.5, 0)
  1337. RW.Part1=ch["Right Arm"]
  1338. RW.Parent=ch.Torso
  1339. --
  1340. LW.Name="Left Shoulder"
  1341. LW.Part0=ch.Torso
  1342. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1343. LW.C1=cf(0, 0.5, 0)
  1344. LW.Part1=ch["Left Arm"]
  1345. LW.Parent=ch.Torso
  1346. --
  1347. equipanim()
  1348. else
  1349. equipped=false
  1350. hideanim()
  1351. swait(0)
  1352. RW.Parent=nil
  1353. LW.Parent=nil
  1354. RSH.Parent=player.Character.Torso
  1355. LSH.Parent=player.Character.Torso
  1356. end
  1357. attack=false
  1358. end
  1359. if equipped==false then return end
  1360. if key=="g" then
  1361. if guard==false then
  1362. Guard()
  1363. end
  1364. end
  1365. if key=="q" then
  1366. ShieldSlam()
  1367. end
  1368. if key=="h" then
  1369. mana=100
  1370. end
  1371. if attack==false then
  1372. RecentEnemy.Value=nil
  1373. end
  1374. end
  1375.  
  1376. function key2(key)
  1377.  
  1378.  
  1379. end
  1380.  
  1381. function s(mouse)
  1382. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1383. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1384. mouse.KeyDown:connect(key)
  1385. mouse.KeyUp:connect(key2)
  1386.  
  1387. player=Player
  1388. ch=Character
  1389. MMouse=mouse
  1390. end
  1391.  
  1392. function ds(mouse)
  1393. end
  1394.  
  1395. Bin.Selected:connect(s)
  1396. Bin.Deselected:connect(ds)
  1397. print("Frigost loaded.")
  1398.  
  1399. local mananum=0
  1400. local donum=0
  1401. local stunnum=0
  1402. local staggeranim=false
  1403. local stunanim=false
  1404. local Point=nil
  1405. local LastPoint=nil
  1406. while true do
  1407. game:service'RunService'.RenderStepped:wait(0)
  1408. hitbox2.Parent=hitbox.Parent
  1409. hitbox2.Size=hitbox.Size
  1410. hitbox2.CFrame=hitbox.CFrame
  1411. if Stagger.Value==true and staggeranim==false then
  1412. coroutine.resume(coroutine.create(function()
  1413. staggeranim=true
  1414. while attack==true do
  1415. swait()
  1416. end
  1417. StaggerAnim()
  1418. StaggerHit.Value=false
  1419. Stagger.Value=false
  1420. staggeranim=false
  1421. end))
  1422. end
  1423. if StaggerHit.Value==true and staggeranim==false then
  1424. coroutine.resume(coroutine.create(function()
  1425. staggeranim=true
  1426. while attack==true do
  1427. swait()
  1428. end
  1429. StaggerHitt()
  1430. StaggerHit.Value=false
  1431. Stagger.Value=false
  1432. staggeranim=false
  1433. end))
  1434. end
  1435. if Mvmt.Value<0 or Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
  1436. Humanoid.WalkSpeed=0
  1437. else
  1438. Humanoid.WalkSpeed=16*Mvmt.Value
  1439. end
  1440. if Stun.Value>=100 and stunanim==false then
  1441. coroutine.resume(coroutine.create(function()
  1442. stunanim=true
  1443. while attack==true do
  1444. swait()
  1445. end
  1446. StunAnim()
  1447. Stun.Value=0
  1448. stunanim=false
  1449. end))
  1450. end
  1451. if stunnum>=10 then
  1452. if Stun.Value>0 then
  1453. Stun.Value=Stun.Value-1
  1454. end
  1455. stunnum=0
  1456. end
  1457. stunnum=stunnum+1
  1458. if donum>=.5 then
  1459. handidle=true
  1460. elseif donum<=0 then
  1461. handidle=false
  1462. end
  1463. if handidle==false then
  1464. donum=donum+0.003
  1465. else
  1466. donum=donum-0.003
  1467. end
  1468. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1469. local velderp=RootPart.Velocity.y
  1470. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1471. if equipped==true then
  1472. if attack==false then
  1473. idle=idle+1
  1474. else
  1475. idle=0
  1476. end
  1477. if idle>=500 then
  1478. if attack==false then
  1479. --Sheath()
  1480. end
  1481. end
  1482. if RootPart.Velocity.y > 1 and hitfloor==nil then
  1483. Anim="Jump"
  1484. if attack==false then
  1485. Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.2)
  1486. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.2)
  1487. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.2)
  1488. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,0.5),.2)
  1489. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1490. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1,0,.8)*euler(0,-.7,0),.2)
  1491. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1492. RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
  1493. LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
  1494. end
  1495. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  1496. Anim="Fall"
  1497. if attack==false then
  1498. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.2)
  1499. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.2)
  1500. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.2)
  1501. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-0.3,0,0.2),.2)
  1502. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1503. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.3,0,-0.2),.2)
  1504. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1505. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
  1506. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
  1507. end
  1508. elseif torvel<1 and hitfloor~=nil then
  1509. Anim="Idle"
  1510. if attack==false then
  1511. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.15)
  1512. Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.15)
  1513. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.15)
  1514. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.15)
  1515. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2+(donum/5),0,.4-(donum/3)),.15)
  1516. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.15)
  1517. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(.7+(donum/3),0,.4+(donum/3))*euler(0,-.4,0),.15)
  1518. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.15)
  1519. RH.C0=clerp(RH.C0,RHC0,.2)
  1520. RH.C1=clerp(RH.C1,RHC1,.2)
  1521. LH.C0=clerp(LH.C0,LHC0,.2)
  1522. LH.C1=clerp(LH.C1,LHC1,.2)
  1523. end
  1524. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  1525. Anim="Walk"
  1526. if attack==false then
  1527. wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,1,0),.2)
  1528. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5),.2)
  1529. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,-.5),.2)
  1530. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4+(donum/2),0,.6-(donum/1)),.2)
  1531. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1532. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(.5+(donum/3),0,.8+(donum/3))*euler(0,-.7,0),.2)
  1533. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1534. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.6,0),.2)
  1535. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.2)
  1536. end
  1537. elseif torvel>=22 and hitfloor~=nil then
  1538. Anim="Run"
  1539. if attack==false then
  1540. Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5),.2)
  1541. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,-.5),.2)
  1542. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4+(donum/5),0,.6-(donum/3)),.2)
  1543. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1544. LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(.5+(donum/3),0,.8+(donum/3))*euler(0,-.7,0),.2)
  1545. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
  1546. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.6,0),.2)
  1547. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.2)
  1548. end
  1549. end
  1550. end
  1551. if #Effects>0 then
  1552. --table.insert(Effects,{prt,"Block1",delay})
  1553. for e=1,#Effects do
  1554. if Effects[e]~=nil then
  1555. --for j=1,#Effects[e] do
  1556. local Thing=Effects[e]
  1557. if Thing~=nil then
  1558. local Part=Thing[1]
  1559. local Mode=Thing[2]
  1560. local Delay=Thing[3]
  1561. local IncX=Thing[4]
  1562. local IncY=Thing[5]
  1563. local IncZ=Thing[6]
  1564. if Thing[2]=="CylinderClang" then
  1565. if Thing[3]<=1 then
  1566. Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0)
  1567. Thing[7]=Thing[1].CFrame
  1568. effect("New Yeller",0,Thing[8],Thing[7])
  1569. Thing[8]=Thing[7]
  1570. Thing[3]=Thing[3]+Thing[4]
  1571. else
  1572. Part.Parent=nil
  1573. table.remove(Effects,e)
  1574. end
  1575. --[[Mesh=Thing[7]
  1576. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1577. Thing[1].Transparency=Thing[1].Transparency+Thing[3]]
  1578. end
  1579. if Thing[1].Transparency<=1 then
  1580. if Thing[2]=="Block1" then
  1581. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1582. Mesh=Thing[7]
  1583. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1584. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1585. elseif Thing[2]=="Block2" then
  1586. Thing[1].CFrame=Thing[1].CFrame
  1587. Mesh=Thing[7]
  1588. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1589. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1590. elseif Thing[2]=="Cylinder" then
  1591. Mesh=Thing[7]
  1592. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1593. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1594. elseif Thing[2]=="Blood" then
  1595. Mesh=Thing[7]
  1596. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  1597. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  1598. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1599. elseif Thing[2]=="Elec" then
  1600. Mesh=Thing[7]
  1601. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  1602. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1603. elseif Thing[2]=="Disappear" then
  1604. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  1605. end
  1606. else
  1607. Part.Parent=nil
  1608. table.remove(Effects,e)
  1609. end
  1610. end
  1611. --end
  1612. end
  1613. end
  1614. end
  1615. fenbarmana2:TweenSize(UDim2.new(4*mana/100,0,0.2,0),nil,1,0.4,true)
  1616. fenbarmana4.Text="Mana("..mana..")"
  1617. if mana>=100 then
  1618. mana=100
  1619. else
  1620. if mananum<=8 then
  1621. mananum=mananum+1
  1622. else
  1623. mananum=0
  1624. mana=mana+1
  1625. end
  1626. end
  1627. end
  1628.  
  1629. --[[
  1630. Copyrighted (C) Fenrier 2014
  1631. ]]
Add Comment
Please, Sign In to add comment