Advertisement
GS1029

Sword Less Damage

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