Dark_EccentricYT

Untitled

Nov 28th, 2016
436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 52.45 KB | None | 0 0
  1. Player=game:GetService("Players").LocalPlayer
  2. Character=Player.Character
  3. PlayerGui=Player.PlayerGui
  4. Backpack=Player.Backpack
  5. Torso=Character.Torso
  6. Head=Character.Head
  7. Humanoid=Character.Humanoid
  8. m=Instance.new('Model',Character)
  9. LeftArm=Character["Left Arm"]
  10. LeftLeg=Character["Left Leg"]
  11. RightArm=Character["Right Arm"]
  12. RightLeg=Character["Right Leg"]
  13. LS=Torso["Left Shoulder"]
  14. LH=Torso["Left Hip"]
  15. RS=Torso["Right Shoulder"]
  16. RH=Torso["Right Hip"]
  17. Face = Head.face
  18. Neck=Torso.Neck
  19. it=Instance.new
  20. attacktype=1
  21. vt=Vector3.new
  22. cf=CFrame.new
  23. euler=CFrame.fromEulerAnglesXYZ
  24. angles=CFrame.Angles
  25. cloaked=false
  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. deb=false
  38. equipped=true
  39. hand=false
  40. MMouse=nil
  41. combo=0
  42. mana=0
  43. trispeed=.2
  44. attackmode='none'
  45. local idle=0
  46. local Anim="Idle"
  47. local Effects={}
  48. local gun=false
  49. local shoot=false
  50. player=nil
  51. mana=0
  52.  
  53. mouse=Player:GetMouse()
  54. --save shoulders
  55. RSH, LSH=nil, nil
  56. --welds
  57. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  58. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  59. LH=Torso["Left Hip"]
  60. RH=Torso["Right Hip"]
  61. TorsoColor=Torso.BrickColor
  62. function NoOutline(Part)
  63. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  64. end
  65. player=Player
  66. ch=Character
  67. RSH=ch.Torso["Right Shoulder"]
  68. LSH=ch.Torso["Left Shoulder"]
  69. --
  70. RSH.Parent=nil
  71. LSH.Parent=nil
  72. --
  73. RW.Name="Right Shoulder"
  74. RW.Part0=ch.Torso
  75. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  76. RW.C1=cf(0, 0.5, 0)
  77. RW.Part1=ch["Right Arm"]
  78. RW.Parent=ch.Torso
  79. --
  80. LW.Name="Left Shoulder"
  81. LW.Part0=ch.Torso
  82. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  83. LW.C1=cf(0, 0.5, 0)
  84. LW.Part1=ch["Left Arm"]
  85. LW.Parent=ch.Torso
  86.  
  87. Player=game:GetService('Players').LocalPlayer
  88. Character=Player.Character
  89. Mouse=Player:GetMouse()
  90. m=Instance.new('Model',Character)
  91.  
  92.  
  93. local function weldBetween(a, b)
  94. local weldd = Instance.new("ManualWeld")
  95. weldd.Part0 = a
  96. weldd.Part1 = b
  97. weldd.C0 = CFrame.new()
  98. weldd.C1 = b.CFrame:inverse() * a.CFrame
  99. weldd.Parent = a
  100. return weldd
  101. end
  102.  
  103. it=Instance.new
  104.  
  105. function nooutline(part)
  106. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  107. end
  108.  
  109. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  110. local fp=it("Part")
  111. fp.formFactor=formfactor
  112. fp.Parent=parent
  113. fp.Reflectance=reflectance
  114. fp.Transparency=transparency
  115. fp.CanCollide=false
  116. fp.Locked=true
  117. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  118. fp.Name=name
  119. fp.Size=size
  120. fp.Position=Character.Torso.Position
  121. nooutline(fp)
  122. fp.Material=material
  123. fp:BreakJoints()
  124. return fp
  125. end
  126.  
  127. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  128. local mesh=it(Mesh)
  129. mesh.Parent=part
  130. if Mesh=="SpecialMesh" then
  131. mesh.MeshType=meshtype
  132. mesh.MeshId=meshid
  133. end
  134. mesh.Offset=offset
  135. mesh.Scale=scale
  136. return mesh
  137. end
  138.  
  139. function weld(parent,part0,part1,c0,c1)
  140. local weld=it("Weld")
  141. weld.Parent=parent
  142. weld.Part0=part0
  143. weld.Part1=part1
  144. weld.C0=c0
  145. weld.C1=c1
  146. return weld
  147. end
  148.  
  149. handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Handle",Vector3.new(0.325260222, 0.487890393, 0.325260192))
  150. handleweld=weld(m,Character["Right Arm"],handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.00006843, -0.11853981, 0.100028992, 0, 0.999999881, 0, 0, 0, -1, -1, 0, 0))
  151. mesh("CylinderMesh",handle,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  152. Hitbox=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,1,"Really black","Hitbox",Vector3.new(0.273318797, 4.06367111, 0.650520384))
  153. Hitboxweld=weld(m,handle,Hitbox,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.90734863e-006, 6.34182358, -0.000163793564, 5.65841162e-007, 3.16612329e-007, 0.999996066, -3.4916394e-007, -0.999998033, 3.16614091e-007, 0.999998033, -3.49163827e-007, -5.65839969e-007))
  154. mesh("BlockMesh",Hitbox,"","",Vector3.new(0, 0, 0),Vector3.new(0.595019877, 1, 1))
  155. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.650520384, 0.325260222, 0.650520384))
  156. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.487652063, 0, -3.49754333, 1, 0, 0, 0, 0, -1, 0, 1, 0))
  157. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  158. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.325260222, 0.273318827, 0.34152317))
  159. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-3.81469727e-006, -2.92838097, 0, 0.999997139, 0, 0, 0, 0.999997139, 0, 0, 0, 1))
  160. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.595019877, 1))
  161. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.330000013, 0.626189232, 0.300000012))
  162. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0023651123, 2.37741184, 0.175241947, -1.17832087e-007, 8.94067682e-008, -0.999998212, -1.17250796e-008, -0.999998212, -2.98022531e-008, -0.999997675, 1.17250742e-008, -6.09815629e-008))
  163. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  164. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.325260222, 1.62630117, 0.325260192))
  165. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, 1.87019825, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  166. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  167. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.273318797, 0.813150585, 0.325260192))
  168. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-2.31991673, -2.22977638, 0, 0.86602509, 0.499999791, 0, -0.499999791, 0.86602509, 0, 0, 0, 1))
  169. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.595019877, 1, 1))
  170. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.330000013, 1.4261893, 0.319999993))
  171. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00238227844, -5.02258682, 0.165237427, -2.84253847e-008, 2.98023224e-008, -0.999999404, -1.17251009e-008, -0.999999762, -8.94069672e-008, -0.999999821, 1.17250964e-008, 2.84253776e-008))
  172. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  173. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.330000013, 0.82618922, 0.319999993))
  174. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00238418579, -4.72257996, 0.154758215, 4.47034658e-008, 8.94069103e-008, 0.999998212, 1.17250885e-008, -0.999999285, 2.98022123e-008, 0.999999106, 1.17250964e-008, 4.47034267e-008))
  175. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  176. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.273318797, 0.813150585, 0.325260192))
  177. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.732203484, -3.90410805, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  178. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.595019877, 1, 1))
  179. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.273318797, 1.46367109, 0.650520384))
  180. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.90734863e-006, 5.04182816, -0.000163316727, 5.65841162e-007, 3.16612329e-007, 0.999996066, -3.4916394e-007, -0.999998033, 3.16614091e-007, 0.999998033, -3.49163827e-007, -5.65839969e-007))
  181. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.595019877, 1, 1))
  182. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.325260222, 0.273318827, 0.325260192))
  183. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, 0.325282097, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  184. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.595019877, 1))
  185. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.325260222, 0.273318827, 0.325260192))
  186. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, -0.32526207, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  187. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.595019877, 1))
  188. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.325260222, 0.273318827, 0.325260192))
  189. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, 0.487874031, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  190. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.595019877, 1))
  191. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.325260222, 1.62630117, 0.325260192))
  192. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, -1.87132168, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  193. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  194. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.650520384, 0.325260222, 0.650520384))
  195. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.487545967, 0, -3.49754333, 1, 0, 0, 0, 0, -1, 0, 1, 0))
  196. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  197. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Light stone grey","Part",Vector3.new(0.273318797, 1.46367109, 0.325260222))
  198. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.90734863e-006, 5.04182816, -0.000163316727, 5.65841162e-007, 3.16612329e-007, 0.999996066, -3.4916394e-007, -0.999998033, 3.16614091e-007, 0.999998033, -3.49163827e-007, -5.65839969e-007))
  199. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.654521883, 1, 1))
  200. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.65047574, 0.341500849, 0.32523787))
  201. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, 9.53674316e-006, 3.33380222, 1, 0, 0, 0, 0, -1, 0, 1, 0))
  202. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  203. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.650520384, 1.62630117, 0.325260192))
  204. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, -3.49754333, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  205. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.325260222, 0.325260222, 0.325260192))
  206. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, 0.894457817, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  207. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  208. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.65047574, 0.341500849, 0.273318797))
  209. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, 9.53674316e-006, 2.92722988, 1, 0, 0, 0, 0, -1, 0, 1, 0))
  210. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.595019877))
  211. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.325260222, 0.273318827, 0.325260192))
  212. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, -0.650509834, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  213. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.595019877, 1))
  214. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.975780606, 0.273318827, 0.34152317))
  215. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.49758148, -3.81469727e-006, 0, -2.98023224e-008, -0.999999821, 0, 0.999999821, -2.98023224e-008, 0, 0, 0, 1))
  216. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.595019877, 1))
  217. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.650520384, 0.3415232, 0.325260192))
  218. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.487652063, 0, -3.49754333, 1, 0, 0, 0, 0, -1, 0, 1, 0))
  219. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  220. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.273318797, 0.813150585, 0.325260192))
  221. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.732181072, -3.90410805, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  222. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.595019877, 1, 1))
  223. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.325260222, 0.273318827, 0.325260192))
  224. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, 0.650484085, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  225. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.595019877, 1))
  226. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.65047574, 0.341500849, 0.487856805))
  227. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, 9.53674316e-006, 3.90297031, 1, 0, 0, 0, 0, -1, 0, 1, 0))
  228. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  229. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.325260222, 0.273318827, 0.3415232))
  230. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-3.81469727e-006, -4.06662655, 0, 0.999996424, 0, 0, 0, 0.999996424, 0, 0, 0, 1))
  231. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.595019877, 1))
  232. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.273318797, 0.813150585, 0.325260192))
  233. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.31982613, -2.22982979, 0, 0.866025329, -0.5, 0, 0.5, 0.866025329, 0, 0, 0, 1))
  234. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.595019877, 1, 1))
  235. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.65047574, 1.62618923, 0.32523784))
  236. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.38418579e-007, 3.49640274, 0, 0.999998569, 6.21724894e-015, 8.94068108e-008, 8.8817842e-016, 0.999999046, 6.4472997e-014, 8.94068819e-008, -2.07921296e-014, 0.999997616))
  237. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.330000013, 0.626189232, 0.349999994))
  238. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00236701965, 2.3774128, 0.149743199, 4.47034409e-008, 8.94066972e-008, 0.999997914, 1.17250671e-008, -0.999997616, 2.98022478e-008, 0.999996722, 1.17250654e-008, 1.34110451e-007))
  239. mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  240. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.650520384, 0.34152323, 0.325260192))
  241. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.487545967, 0, -3.49754333, 1, 0, 0, 0, 0, -1, 0, 1, 0))
  242. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  243. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.325260222, 0.325260222, 0.325260192))
  244. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, -0.894445419, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  245. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  246. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.325260222, 0.273318827, 0.325260192))
  247. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(9.53674316e-007, -0.487901688, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  248. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.595019877, 1))
  249. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Wedge",Vector3.new(0.325260192, 0.325260222, 0.273318797))
  250. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -0.487545967, 3.41505909, 4.92214713e-010, 0, -0.999999642, -1, -2.45083971e-008, -4.92215435e-010, -1.97962411e-008, 0.999999642, 0))
  251. mesh("SpecialMesh",Wedge,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.595019877))
  252. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Wedge",Vector3.new(0.273318797, 2.60208178, 0.325260192))
  253. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, -7.07472134, 0.162785649, 0, -5.41302938e-007, -0.999998033, 2.9919542e-007, 0.999998808, -5.71104749e-007, 0.999997318, -2.99195932e-007, -7.4505806e-008))
  254. mesh("SpecialMesh",Wedge,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.595019877, 1, 1))
  255. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Wedge",Vector3.new(0.325260192, 0.650520444, 0.325260192))
  256. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 2.35806179, 0.162777185, -5.96044885e-008, 8.8817842e-016, -0.99999851, 0, 0.999998808, 3.55270944e-015, 0.999997318, 0, -5.96045737e-008))
  257. mesh("SpecialMesh",Wedge,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  258. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Wedge",Vector3.new(0.325260192, 0.325260222, 0.273318797))
  259. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -0.487545967, 2.92715549, 4.92214713e-010, 0, -0.999999642, -1, -2.45083971e-008, -4.92215435e-010, -1.97962411e-008, 0.999999642, 0))
  260. mesh("SpecialMesh",Wedge,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.595019877))
  261. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Wedge",Vector3.new(0.325260192, 0.487890393, 0.273318797))
  262. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -0.569425941, -2.76451397, -2.41811932e-010, -5.640171e-009, 1, -1, 2.98023224e-008, -2.41810849e-010, -3.45144855e-008, -1, -5.640171e-009))
  263. mesh("SpecialMesh",Wedge,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.595019877))
  264. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Wedge",Vector3.new(0.325260192, 0.487890393, 0.273318797))
  265. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -0.569425821, -3.74025059, -2.41811932e-010, -5.640171e-009, 1, -1, 2.98023224e-008, -2.41810849e-010, -3.45144855e-008, -1, -5.640171e-009))
  266. mesh("SpecialMesh",Wedge,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.595019877))
  267. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Light stone grey","Wedge",Vector3.new(0.273318797, 2.27682185, 0.273318797))
  268. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.81469727e-006, -6.91205883, 0.0809696913, 0, -5.41302938e-007, -0.999998033, 2.9919542e-007, 0.999998808, -5.71104749e-007, 0.999997318, -2.99195932e-007, -7.4505806e-008))
  269. mesh("SpecialMesh",Wedge,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.654521883, 1, 0.595019877))
  270. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Wedge",Vector3.new(0.325260192, 0.650520444, 0.325260192))
  271. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 2.35809898, 0.162807703, 1.65436123e-024, -3.98708368e-017, 0.999998331, 0, 0.999998808, 3.9872726e-017, -0.999997318, -0, -1.49011612e-008))
  272. mesh("SpecialMesh",Wedge,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  273. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Wedge",Vector3.new(0.325260192, 0.325260222, 0.273318797))
  274. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -0.487545967, 3.90288067, 4.92214713e-010, 0, -0.999999642, -1, -2.45083971e-008, -4.92215435e-010, -1.97962411e-008, 0.999999642, 0))
  275. mesh("SpecialMesh",Wedge,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.595019877))
  276. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Wedge",Vector3.new(0.273318797, 1.62630105, 0.325260192))
  277. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -6.5868082, 0.162807941, 2.45382346e-008, 1.42210678e-017, 0.999998331, -8.34963032e-009, 0.999998808, -2.98023224e-008, -0.999997318, -8.34964098e-009, 2.45382541e-008))
  278. mesh("SpecialMesh",Wedge,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.595019877, 1, 1))
  279. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Wedge",Vector3.new(0.325260192, 0.487890393, 0.273318797))
  280. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -0.569425821, -3.25242233, -2.41811932e-010, -5.640171e-009, 1, -1, 2.98023224e-008, -2.41810849e-010, -3.45144855e-008, -1, -5.640171e-009))
  281. mesh("SpecialMesh",Wedge,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.595019877))
  282. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Light stone grey","Wedge",Vector3.new(0.273318797, 1.30104089, 0.273318797))
  283. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -6.4241457, 0.0810163021, 2.45382346e-008, 1.42210678e-017, 0.999998331, -8.34963032e-009, 0.999998808, -2.98023224e-008, -0.999997318, -8.34964098e-009, 2.45382541e-008))
  284. mesh("SpecialMesh",Wedge,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.654521883, 1, 0.595019877))
  285.  
  286. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  287. if hit.Parent==nil then
  288. return
  289. end
  290. h=hit.Parent:FindFirstChild("Humanoid")
  291. for _,v in pairs(hit.Parent:children()) do
  292. if v:IsA("Humanoid") then
  293. h=v
  294. end
  295. end
  296. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  297. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  298. end
  299. if hit.Parent.className=="Hat" then
  300. hit=hit.Parent.Parent:findFirstChild("Head")
  301. end
  302. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  303. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  304. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  305. return
  306. end]]
  307. -- hs(hit,1.2)
  308. c=Instance.new("ObjectValue")
  309. c.Name="creator"
  310. c.Value=game:service("Players").LocalPlayer
  311. c.Parent=h
  312. game:GetService("Debris"):AddItem(c,.5)
  313. Damage=math.random(minim,maxim)
  314. -- h:TakeDamage(Damage)
  315. blocked=false
  316. block=hit.Parent:findFirstChild("Block")
  317. if block~=nil then
  318. print(block.className)
  319. if block.className=="NumberValue" then
  320. if block.Value>0 then
  321. blocked=true
  322. if decreaseblock==nil then
  323. block.Value=block.Value-1
  324. end
  325. end
  326. end
  327. if block.className=="IntValue" then
  328. if block.Value>0 then
  329. blocked=true
  330. if decreaseblock~=nil then
  331. block.Value=block.Value-1
  332. end
  333. end
  334. end
  335. end
  336. if blocked==false then
  337. -- h:TakeDamage(Damage)
  338. h.Health=h.Health-Damage
  339. showDamage(hit.Parent,Damage,.5,BrickColor.new("Neon green"))
  340. else
  341. h.Health=h.Health-(Damage/2)
  342. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  343. end
  344. if Type=="Knockdown" then
  345. hum=hit.Parent.Humanoid
  346. hum.PlatformStand=true
  347. coroutine.resume(coroutine.create(function(HHumanoid)
  348. swait(1)
  349. HHumanoid.PlatformStand=false
  350. end),hum)
  351. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  352. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  353. local bodvol=Instance.new("BodyVelocity")
  354. bodvol.velocity=angle*knockback
  355. bodvol.P=5000
  356. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  357. bodvol.Parent=hit
  358. rl=Instance.new("BodyAngularVelocity")
  359. rl.P=3000
  360. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  361. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  362. rl.Parent=hit
  363. game:GetService("Debris"):AddItem(bodvol,.5)
  364. game:GetService("Debris"):AddItem(rl,.5)
  365. elseif Type=="Normal" then
  366. vp=Instance.new("BodyVelocity")
  367. vp.P=500
  368. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  369. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  370. if KnockbackType==1 then
  371. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  372. elseif KnockbackType==2 then
  373. vp.velocity=Property.CFrame.lookVector*knockback
  374. end
  375. if knockback>0 then
  376. vp.Parent=hit.Parent.Torso
  377. end
  378. game:GetService("Debris"):AddItem(vp,.5)
  379. elseif Type=="Up" then
  380. local bodyVelocity=Instance.new("BodyVelocity")
  381. bodyVelocity.velocity=vt(0,60,0)
  382. bodyVelocity.P=5000
  383. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  384. bodyVelocity.Parent=hit
  385. game:GetService("Debris"):AddItem(bodyVelocity,1)
  386. rl=Instance.new("BodyAngularVelocity")
  387. rl.P=3000
  388. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  389. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  390. rl.Parent=hit
  391. game:GetService("Debris"):AddItem(rl,.5)
  392. elseif Type=="Snare" then
  393. bp=Instance.new("BodyPosition")
  394. bp.P=2000
  395. bp.D=100
  396. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  397. bp.position=hit.Parent.Torso.Position
  398. bp.Parent=hit.Parent.Torso
  399. game:GetService("Debris"):AddItem(bp,1)
  400. elseif Type=="Target" then
  401. if Targetting==false then
  402. ZTarget=hit.Parent.Torso
  403. coroutine.resume(coroutine.create(function(Part)
  404. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  405. swait(5)
  406. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  407. end),ZTarget)
  408. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  409. targetgui=Instance.new("BillboardGui")
  410. targetgui.Parent=ZTarget
  411. targetgui.Size=UDim2.new(10,100,10,100)
  412. targ=Instance.new("ImageLabel")
  413. targ.Parent=targetgui
  414. targ.BackgroundTransparency=1
  415. targ.Image="rbxassetid://4834067"
  416. targ.Size=UDim2.new(1,0,1,0)
  417. cam.CameraType="Scriptable"
  418. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  419. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  420. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  421. Targetting=true
  422. RocketTarget=ZTarget
  423. for i=1,Property do
  424. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  425. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  426. swait()
  427. end
  428. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  429. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  430. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  431. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  432. end
  433. Targetting=false
  434. RocketTarget=nil
  435. targetgui.Parent=nil
  436. cam.CameraType="Custom"
  437. end
  438. end
  439. debounce=Instance.new("BoolValue")
  440. debounce.Name="DebounceHit"
  441. debounce.Parent=hit.Parent
  442. debounce.Value=true
  443. game:GetService("Debris"):AddItem(debounce,Delay)
  444. c=Instance.new("ObjectValue")
  445. c.Name="creator"
  446. c.Value=Player
  447. c.Parent=h
  448. game:GetService("Debris"):AddItem(c,.5)
  449. CRIT=false
  450. hitDeb=true
  451. AttackPos=6
  452. end
  453. end
  454.  
  455. showDamage=function(Char,Dealt,du,Color)
  456. m=Instance.new("Model")
  457. m.Name=tostring(Dealt)
  458. h=Instance.new("Humanoid")
  459. h.Health=0
  460. h.MaxHealth=0
  461. h.Parent=m
  462. c=Instance.new("Part")
  463. c.Transparency=0
  464. c.BrickColor=Color
  465. c.Name="Head"
  466. c.TopSurface=0
  467. c.BottomSurface=0
  468. c.formFactor="Plate"
  469. c.Size=Vector3.new(1,.4,1)
  470. ms=Instance.new("CylinderMesh")
  471. ms.Scale=Vector3.new(.8,.8,.8)
  472. if CRIT==true then
  473. ms.Scale=Vector3.new(1,1.25,1)
  474. end
  475. ms.Parent=c
  476. c.Reflectance=0
  477. Instance.new("BodyGyro").Parent=c
  478. c.Parent=m
  479. if Char:findFirstChild("Head")~=nil then
  480. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  481. elseif Char.Parent:findFirstChild("Head")~=nil then
  482. c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  483. end
  484. f=Instance.new("BodyPosition")
  485. f.P=2000
  486. f.D=100
  487. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  488. f.position=c.Position+Vector3.new(0,3,0)
  489. f.Parent=c
  490. game:GetService("Debris"):AddItem(m,.5+du)
  491. c.CanCollide=false
  492. m.Parent=workspace
  493. c.CanCollide=false
  494. end
  495.  
  496.  
  497. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  498. local fp=it("Part")
  499. fp.formFactor=formfactor
  500. fp.Parent=parent
  501. fp.Reflectance=reflectance
  502. fp.Transparency=transparency
  503. fp.CanCollide=false
  504. fp.Locked=true
  505. fp.BrickColor=brickcolor
  506. fp.Name=name
  507. fp.Size=size
  508. fp.Position=Torso.Position
  509. NoOutline(fp)
  510. fp.Material="SmoothPlastic"
  511. fp:BreakJoints()
  512. return fp
  513. end
  514.  
  515. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  516. local mesh=it(Mesh)
  517. mesh.Parent=part
  518. if Mesh=="SpecialMesh" then
  519. mesh.MeshType=meshtype
  520. if meshid~="nil" then
  521. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  522. end
  523. end
  524. mesh.Offset=offset
  525. mesh.Scale=scale
  526. return mesh
  527. end
  528.  
  529. function weld(parent,part0,part1,c0)
  530. local weld=it("Weld")
  531. weld.Parent=parent
  532. weld.Part0=part0
  533. weld.Part1=part1
  534. weld.C0=c0
  535. return weld
  536. end
  537.  
  538. local Color1=Torso.BrickColor
  539.  
  540. local bodvel=Instance.new("BodyVelocity")
  541. local bg=Instance.new("BodyGyro")
  542.  
  543. function swait(num)
  544. if num==0 or num==nil then
  545. game:service'RunService'.Stepped:wait(0)
  546. else
  547. for i=0,num do
  548. game:service'RunService'.Stepped:wait(0)
  549. end
  550. end
  551. end
  552.  
  553.  
  554. so = function(id,par,vol,pit)
  555. coroutine.resume(coroutine.create(function()
  556. local sou = Instance.new("Sound",par or workspace)
  557. sou.Volume=vol
  558. sou.Pitch=pit or 1
  559. sou.SoundId=id
  560. swait()
  561. sou:play()
  562. game:GetService("Debris"):AddItem(sou,6)
  563. end))
  564. end
  565.  
  566. function clerp(a,b,t)
  567. local qa = {QuaternionFromCFrame(a)}
  568. local qb = {QuaternionFromCFrame(b)}
  569. local ax, ay, az = a.x, a.y, a.z
  570. local bx, by, bz = b.x, b.y, b.z
  571. local _t = 1-t
  572. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  573. end
  574.  
  575. function QuaternionFromCFrame(cf)
  576. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  577. local trace = m00 + m11 + m22
  578. if trace > 0 then
  579. local s = math.sqrt(1 + trace)
  580. local recip = 0.5/s
  581. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  582. else
  583. local i = 0
  584. if m11 > m00 then
  585. i = 1
  586. end
  587. if m22 > (i == 0 and m00 or m11) then
  588. i = 2
  589. end
  590. if i == 0 then
  591. local s = math.sqrt(m00-m11-m22+1)
  592. local recip = 0.5/s
  593. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  594. elseif i == 1 then
  595. local s = math.sqrt(m11-m22-m00+1)
  596. local recip = 0.5/s
  597. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  598. elseif i == 2 then
  599. local s = math.sqrt(m22-m00-m11+1)
  600. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  601. end
  602. end
  603. end
  604.  
  605. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  606. local xs, ys, zs = x + x, y + y, z + z
  607. local wx, wy, wz = w*xs, w*ys, w*zs
  608. local xx = x*xs
  609. local xy = x*ys
  610. local xz = x*zs
  611. local yy = y*ys
  612. local yz = y*zs
  613. local zz = z*zs
  614. 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))
  615. end
  616.  
  617. function QuaternionSlerp(a, b, t)
  618. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  619. local startInterp, finishInterp;
  620. if cosTheta >= 0.0001 then
  621. if (1 - cosTheta) > 0.0001 then
  622. local theta = math.acos(cosTheta)
  623. local invSinTheta = 1/math.sin(theta)
  624. startInterp = math.sin((1-t)*theta)*invSinTheta
  625. finishInterp = math.sin(t*theta)*invSinTheta
  626. else
  627. startInterp = 1-t
  628. finishInterp = t
  629. end
  630. else
  631. if (1+cosTheta) > 0.0001 then
  632. local theta = math.acos(-cosTheta)
  633. local invSinTheta = 1/math.sin(theta)
  634. startInterp = math.sin((t-1)*theta)*invSinTheta
  635. finishInterp = math.sin(t*theta)*invSinTheta
  636. else
  637. startInterp = t-1
  638. finishInterp = t
  639. end
  640. end
  641. 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
  642. end
  643.  
  644. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  645. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  646. end
  647.  
  648. function SkullEffect(brickcolor,cframe,x1,y1,z1,delay)
  649. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  650. prt.Anchored=true
  651. prt.CFrame=cframe
  652. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1))
  653. --http://www.roblox.com/asset/?id=4770560
  654. game:GetService("Debris"):AddItem(prt,2)
  655. CF=prt.CFrame
  656. coroutine.resume(coroutine.create(function(Part,Mesh,TehCF)
  657. for i=0,1,0.2 do
  658. wait()
  659. Part.CFrame=CF*cf(0,0,-0.4)
  660. end
  661. for i=0,1,delay do
  662. wait()
  663. --Part.CFrame=CF*cf((math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5)
  664. Mesh.Scale=Mesh.Scale
  665. end
  666. for i=0,1,0.1 do
  667. wait()
  668. Part.Transparency=i
  669. end
  670. Part.Parent=nil
  671. end),prt,msh,CF)
  672. end
  673.  
  674. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  675. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  676. prt.Anchored=true
  677. prt.CFrame=cframe
  678. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  679. game:GetService("Debris"):AddItem(prt,5)
  680. coroutine.resume(coroutine.create(function(Part,Mesh)
  681. for i=0,1,delay do
  682. wait()
  683. Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  684. Part.Transparency=i
  685. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  686. end
  687. Part.Parent=nil
  688. end),prt,msh)
  689. end
  690.  
  691. function MagicBlock2(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
  692. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  693. prt.Anchored=false
  694. prt.CFrame=cframe
  695. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  696. local wld=weld(prt,prt,Parent,cframe)
  697. game:GetService("Debris"):AddItem(prt,5)
  698. coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
  699. for i=0,1,delay do
  700. wait()
  701. Weld.C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cframe
  702. --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  703. Part.Transparency=i
  704. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  705. end
  706. Part.Parent=nil
  707. end),prt,msh,wld)
  708. end
  709.  
  710. function MagicBlock3(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
  711. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  712. prt.Anchored=false
  713. prt.CFrame=cframe
  714. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  715. local wld=weld(prt,prt,Parent,euler(0,0,0)*cf(0,0,0))
  716. game:GetService("Debris"):AddItem(prt,5)
  717. coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
  718. for i=0,1,delay do
  719. wait()
  720. Weld.C0=euler(i*20,0,0)
  721. --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  722. Part.Transparency=i
  723. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  724. end
  725. Part.Parent=nil
  726. end),prt,msh,wld)
  727. end
  728.  
  729. function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  730. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  731. prt.Anchored=true
  732. prt.CFrame=cframe
  733. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  734. game:GetService("Debris"):AddItem(prt,2)
  735. coroutine.resume(coroutine.create(function(Part,Mesh)
  736. for i=0,1,delay do
  737. wait()
  738. Part.CFrame=Part.CFrame
  739. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  740. local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  741. prt2.Anchored=true
  742. prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  743. local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  744. game:GetService("Debris"):AddItem(prt2,2)
  745. coroutine.resume(coroutine.create(function(Part,Mesh)
  746. for i=0,1,0.1 do
  747. wait()
  748. Part.CFrame=Part.CFrame*cf(0,0.5,0)
  749. end
  750. Part.Parent=nil
  751. end),prt2,msh2)
  752. end
  753. for i=0,1,delay*2 do
  754. wait()
  755. Part.CFrame=Part.CFrame
  756. Mesh.Scale=vt((x1+x3)-(x1+x3)*i,(y1+y3)-(y1+y3)*i,(z1+z3)-(z1+z3)*i)
  757. end
  758. Part.Parent=nil
  759. end),prt,msh)
  760. end
  761.  
  762. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  763. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  764. prt.Anchored=true
  765. prt.CFrame=cframe
  766. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  767. game:GetService("Debris"):AddItem(prt,2)
  768. coroutine.resume(coroutine.create(function(Part,Mesh)
  769. for i=0,1,delay do
  770. wait()
  771. Part.CFrame=Part.CFrame
  772. Part.Transparency=i
  773. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  774. end
  775. Part.Parent=nil
  776. end),prt,msh)
  777. end
  778.  
  779. function MagicRing(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
  780. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  781. prt.Anchored=true
  782. prt.CFrame=cframe*euler(x2,y2,z2)
  783. --"http://www.roblox.com/asset/?id=168892465"
  784. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  785. game:GetService("Debris"):AddItem(prt,2)
  786. coroutine.resume(coroutine.create(function(Part,Mesh)
  787. for i=0,1,0.03 do
  788. wait()
  789. Part.CFrame=Part.CFrame
  790. Part.Transparency=i
  791. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  792. end
  793. Part.Parent=nil
  794. end),prt,msh)
  795. end
  796.  
  797. function BreakEffect(brickcolor,cframe,x1,y1,z1)
  798. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  799. prt.Anchored=true
  800. prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  801. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  802. game:GetService("Debris"):AddItem(prt,2)
  803. coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb)
  804. CF=Part.CFrame
  805. Numbb=0
  806. randnumb=math.random()/10
  807. rand1=math.random()/10
  808. for i=0,1,rand1 do
  809. wait()
  810. CF=CF*cf(0,math.random()/2,0)
  811. --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0)
  812. Part.CFrame=CF*euler(Numbb,0,0)
  813. Part.Transparency=i
  814. Numbb=Numbb+randnumb
  815. end
  816. Part.Parent=nil
  817. end),prt,CF,Numbb,randnumb)
  818. end
  819.  
  820. function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  821. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  822. prt.Anchored=true
  823. prt.CFrame=cframe
  824. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1))
  825. game:GetService("Debris"):AddItem(prt,5)
  826. coroutine.resume(coroutine.create(function(Part,Mesh)
  827. for i=0,1,delay do
  828. wait()
  829. Part.CFrame=Part.CFrame*euler(0,0.7,0)
  830. Part.Transparency=i
  831. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  832. end
  833. Part.Parent=nil
  834. end),prt,msh)
  835. end
  836.  
  837. function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  838. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  839. prt.Anchored=true
  840. prt.CFrame=cframe
  841. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  842. game:GetService("Debris"):AddItem(prt,2)
  843. coroutine.resume(coroutine.create(function(Part,Mesh)
  844. for i=0,1,delay do
  845. wait()
  846. Part.CFrame=Part.CFrame*cf(0,y3/2,0)
  847. Part.Transparency=i
  848. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  849. end
  850. Part.Parent=nil
  851. end),prt,msh)
  852. end
  853.  
  854. function StravEffect(brickcolor,cframe,x,y,z,x1,y1,z1,delay)
  855. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  856. prt.Anchored=true
  857. prt.CFrame=cframe*cf(x,y,z)
  858. msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://168892363",vt(0,0,0),vt(x1,y1,z1))
  859. game:GetService("Debris"):AddItem(prt,5)
  860. coroutine.resume(coroutine.create(function(Part,Mesh,ex,why,zee)
  861. local num=math.random()
  862. local num2=math.random(-3,2)+math.random()
  863. local numm=0
  864. for i=0,1,delay*2 do
  865. swait()
  866. Part.CFrame=cframe*euler(0,numm*num*10,0)*cf(ex,why,zee)*cf(-i*10,num2,0)
  867. Part.Transparency=i
  868. numm=numm+0.01
  869. end
  870. Part.Parent=nil
  871. Mesh.Parent=nil
  872. end),prt,msh,x,y,z)
  873. end
  874.  
  875. ring=function(way,way2,where,vector,rv1,rv2,rv3,c1,c2,color)
  876. local rng = Instance.new("Part", char.Torso)
  877. rng.Anchored = true
  878. rng.BrickColor = BrickColor.new(tostring(color))
  879. rng.CanCollide = false
  880. rng.FormFactor = 3
  881. rng.Name = "Ring"
  882. rng.Size = Vector3.new(1, 1, 1)
  883. rng.Transparency = .5
  884. rng.TopSurface = 0
  885. rng.BottomSurface = 0
  886. rng.CFrame = where * CFrame.Angles(math.rad(way), math.rad(way2), 0)
  887. local rngm = Instance.new("SpecialMesh", rng)
  888. rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
  889. rngm.Scale = vector--10,10,1
  890. for i = 1, 20, 1 do
  891. rngm.Scale = Vector3.new(rv1 + i*c1, rv2 + i*c2, rv3)--(10 + i*2, 10 + i*2, 1)
  892. rng.Transparency = i/20
  893. swait()
  894. end
  895. wait()
  896. rng:destroy''
  897. end
  898.  
  899. mouse.Button1Down:connect(function()
  900. if attack==false then
  901. if attacktype==1 then
  902. attack=true
  903. attacktype=2
  904. attackone()
  905. elseif attacktype==2 then
  906. attack=true
  907. attacktype=3
  908. attacktwo()
  909. elseif attacktype==3 then
  910. attack=true
  911. attacktype=1
  912. attackthree()
  913. end
  914. end
  915. end)
  916.  
  917. function attackone()
  918. attack=true
  919. con1=Hitbox.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(10,20),"Normal",RootPart,.2,1) end)
  920. for i=0,1.5,0.1 do
  921. swait()
  922. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-60),math.rad(0),math.rad(20)),.3)
  923. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(35),math.rad(0),math.rad(0)),.3)
  924. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-25),math.rad(0),math.rad(0)),.3)
  925. RH.C0=clerp(RH.C0,cf(1,-1,-.25)*angles(math.rad(0),math.rad(90),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(15)),.3)
  926. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  927. handleweld.C0=clerp(handleweld.C0,cf(0,0,.4)*angles(math.rad(80),math.rad(-20),math.rad(0)),.3)
  928. end
  929. so("http://roblox.com/asset/?id=189505639",Hitbox,1,1)
  930. for i=0,1,0.1 do
  931. swait()
  932. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(120),math.rad(0),math.rad(10)),.3)
  933. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(25),math.rad(0),math.rad(0)),.3)
  934. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-25),math.rad(0),math.rad(0)),.3)
  935. RH.C0=clerp(RH.C0,cf(1,-1,-.25)*angles(math.rad(0),math.rad(90),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(15)),.3)
  936. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  937. handleweld.C0=clerp(handleweld.C0,cf(0,-1,-1)*angles(math.rad(-80),math.rad(20),math.rad(0)),.3)
  938. end
  939. attack=false
  940. con1:disconnect()
  941. end
  942.  
  943. function attacktwo()
  944. con1=Hitbox.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(10,20),"Normal",RootPart,.2,1) end)
  945. attack=true
  946. for i=0,1.5,0.1 do
  947. swait()
  948. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(130),math.rad(0),math.rad(20)),.3)
  949. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(30),math.rad(0),math.rad(-40)),.3)
  950. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  951. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-25),math.rad(0),math.rad(0)),.3)
  952. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  953. --handleweld.C0=clerp(handleweld.C0,cf(0,0,.4)*angles(math.rad(80),math.rad(-20),math.rad(0)),.3)
  954. end
  955. so("http://roblox.com/asset/?id=189505662",Hitbox,1,1)
  956. for i=0,1,0.1 do
  957. swait()
  958. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(10),math.rad(20),math.rad(-30)),.3)
  959. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(30),math.rad(0),math.rad(-40)),.3)
  960. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  961. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  962. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  963. handleweld.C0=clerp(handleweld.C0,cf(0,0,.4)*angles(math.rad(-40),math.rad(0),math.rad(0)),.3)
  964. end
  965. attack=false
  966. con1:disconnect()
  967. end
  968.  
  969. function attackthree()
  970. con1=Hitbox.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(10,20),"Normal",RootPart,.2,1) end)
  971. attack=true
  972. for i=0,1.5,0.1 do
  973. swait()
  974. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(130),math.rad(0),math.rad(10)),.3)
  975. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(math.rad(100),math.rad(15),math.rad(50)),.3)
  976. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  977. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-25),math.rad(0),math.rad(0)),.3)
  978. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  979. --handleweld.C0=clerp(handleweld.C0,cf(0,0,.4)*angles(math.rad(80),math.rad(-20),math.rad(0)),.3)
  980. end
  981. so("http://roblox.com/asset/?id=189505649",Hitbox,1,1)
  982. for i=0,1,0.1 do
  983. swait()
  984. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(10),math.rad(20),math.rad(50)),.3)
  985. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(math.rad(100),math.rad(15),math.rad(50)),.3)
  986. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  987. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  988. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  989. handleweld.C0=clerp(handleweld.C0,cf(0,0,.4)*angles(math.rad(-40),math.rad(0),math.rad(0)),.3)
  990. end
  991. attack=false
  992. con1:disconnect()
  993. end
  994.  
  995.  
  996. local sine = 0
  997. local change = 1
  998. local val = 0
  999.  
  1000. local mananum=0
  1001. while true do
  1002. swait()
  1003. sine = sine + change
  1004. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1005. local velderp=RootPart.Velocity.y
  1006. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1007. if equipped==true or equipped==false then
  1008. if attack==false then
  1009. idle=idle+1
  1010. else
  1011. idle=0
  1012. end
  1013. if idle>=500 then
  1014. if attack==false then
  1015. --Sheath()
  1016. end
  1017. end
  1018. if RootPart.Velocity.y > 1 and hitfloor==nil then
  1019. Anim="Jump"
  1020. if attack==false then
  1021. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1022. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(5),math.rad(0),math.rad(0)),.3)
  1023. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-60),math.rad(0),math.rad(50)),.3)
  1024. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(50),math.rad(0),math.rad(-40)),.3)
  1025. RH.C0=clerp(RH.C0,cf(1,-1,-.25)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(15)),.3)
  1026. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1027. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1028. end
  1029. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  1030. Anim="Fall"
  1031. if attack==false then
  1032. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(5),math.rad(0),math.rad(0)),.3)
  1033. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  1034. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-50),math.rad(0),math.rad(40)),.3)
  1035. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(40),math.rad(0),math.rad(-30)),.3)
  1036. RH.C0=clerp(RH.C0,cf(1,-1,-.25)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(15)),.3)
  1037. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1038. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  1039. end
  1040. elseif torvel<1 and hitfloor~= nil then
  1041. local idleanim=0
  1042. Anim="Idle"
  1043. if attack==false then
  1044. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(0)),.3)
  1045. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  1046. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-30),math.rad(0),math.rad(30)),.3)
  1047. LW.C0=clerp(LW.C0,cf(-1,0.5,-0.5)*euler(math.rad(100),math.rad(15),math.rad(50)),.3)
  1048. RH.C0=clerp(RH.C0,cf(1,-1,-.25)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(15)),.3)
  1049. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1050. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(40),math.rad(-20),math.rad(0)),.3)
  1051. end
  1052. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  1053. Anim="Walk"
  1054. if attack==false then
  1055. change=1
  1056. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(30),math.rad(0),math.rad(0)),.3)
  1057. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
  1058. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-50),math.rad(0),math.rad(30)),.3)
  1059. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(30),math.rad(0),math.rad(-40)),.3)
  1060. handleweld.C0=clerp(handleweld.C0,cf(0,0,.3)*angles(math.rad(70),math.rad(-20),math.rad(0)),.3)
  1061. end
  1062. elseif torvel>=22 and hitfloor~=nil then
  1063. Anim="Run"
  1064. if attack==false then
  1065. end
  1066. end
  1067. end
  1068. end
Add Comment
Please, Sign In to add comment