lolz3456

Untitled

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