Advertisement
Robloxlover12445

Flute shooter

Oct 20th, 2016
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.07 KB | None | 0 0
  1. Player = game:GetService("Players")["robloxlover12445"]
  2. Character = Player.Character
  3. PlayerGui = Player.PlayerGui
  4. Backpack = Player.Backpack
  5. Torso = Character.Torso
  6. Head = Character.Head
  7. LeftArm = Character["Left Arm"]
  8. LeftLeg = Character["Left Leg"]
  9. RightArm = Character["Right Arm"]
  10. RightLeg = Character["Right Leg"]
  11. LS = Torso["Left Shoulder"]
  12. LH = Torso["Left Hip"]
  13. RS = Torso["Right Shoulder"]
  14. RH = Torso["Right Hip"]
  15. attack = false
  16. attackdebounce = false
  17. combo = 0
  18. mana = 400
  19. necko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  20. ammo=true
  21. --player
  22. player = nil
  23. --save shoulders
  24. RSH, LSH = nil, nil
  25. --welds
  26. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  27. --what anim
  28. anim = "none"
  29. if Character:findFirstChild("Flute Shooter",true) ~= nil then
  30. Character:findFirstChild("Flute Shooter",true).Parent = nil
  31. end
  32. if Player.PlayerGui:findFirstChild("manaGUI",true) ~= nil then
  33. Player.PlayerGui:findFirstChild("manaGUI",true).Parent = nil
  34. end
  35. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  36. local fp = Instance.new("Part")
  37. fp.formFactor = formfactor
  38. fp.Parent = parent
  39. fp.Reflectance = reflectance
  40. fp.Transparency = transparency
  41. fp.CanCollide = false
  42. fp.BrickColor = brickcolor
  43. fp.Name = name
  44. fp.Size = size
  45. fp.Position = Torso.Position
  46. fp.BottomSurface="Smooth"
  47. fp.TopSurface="Smooth"
  48. fp.Locked=true
  49. fp:BreakJoints()
  50. return fp
  51. end
  52. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  53. local mesh = Instance.new(Mesh)
  54. mesh.Parent = part
  55. if Mesh=="SpecialMesh" then
  56. mesh.MeshType = meshtype
  57. mesh.MeshId = meshid
  58. end
  59. mesh.Offset=offset
  60. mesh.Scale=scale
  61. return mesh
  62. end
  63. local modelzorz = Instance.new("Model")
  64. modelzorz.Name = "Flute Shooter"
  65. modelzorz.Parent = Character
  66. part1=part(1,modelzorz,0,0,BrickColor.new("Black"),"Part",Vector3.new(1,3.6,1))
  67. part2=part(1,modelzorz,0,0,BrickColor.new("Reddish brown"),"Part",Vector3.new(1,3.6,1))
  68. part3=part(1,modelzorz,0.05,0,BrickColor.new("Reddish brown"),"Part",Vector3.new(1, 1, 3))
  69. part4=part(1,modelzorz,0,0,BrickColor.new("Reddish brown"),"Part",Vector3.new(1, 1.2, 1))
  70. part5=part(1,modelzorz,0,0,BrickColor.new("Dark orange"),"Part",Vector3.new(0.2, 2.4, 0.2))
  71. part6=part(1,modelzorz,0,0,BrickColor.new("Dark orange"),"Part",Vector3.new(0.2, 2.4, 0.2))
  72. part7=part(1,modelzorz,0,0,BrickColor.new("Dark orange"),"Part",Vector3.new(0.2, 2.4, 0.2))
  73. part8=part(1,modelzorz,0,0,BrickColor.new("Dark orange"),"Part",Vector3.new(0.2, 2.4, 0.2))
  74. modelzorz:BreakJoints()
  75. mesh1=mesh("CylinderMesh",part1,"","",Vector3.new(0,0,0),Vector3.new(1, 1.001, 0.3))
  76. mesh2=mesh("CylinderMesh",part2,"","",Vector3.new(0,0,0),Vector3.new(1, 1, 0.4))
  77. mesh3=mesh("SpecialMesh",part3,"FileMesh","http://www.roblox.com/asset/?id=3270017",Vector3.new(0,0,0),Vector3.new(0.7, 0.7, 18))
  78. mesh4=mesh("CylinderMesh",part4,"","",Vector3.new(0,0,0),Vector3.new(1, 0.1, 0.7))
  79. mesh5=mesh("SpecialMesh",part5,"FileMesh","http://www.roblox.com/asset/?id=1033714",Vector3.new(0,0,0),Vector3.new(0.1, 4, 0.1))
  80. mesh6=mesh("SpecialMesh",part6,"FileMesh","http://www.roblox.com/asset/?id=1033714",Vector3.new(0,0,0),Vector3.new(0.1, 4, 0.1))
  81. mesh7=mesh("SpecialMesh",part7,"FileMesh","http://www.roblox.com/asset/?id=1033714",Vector3.new(0,0,0),Vector3.new(0.1, 4, 0.1))
  82. mesh8=mesh("SpecialMesh",part8,"FileMesh","http://www.roblox.com/asset/?id=1033714",Vector3.new(0,0,0),Vector3.new(0.1, 4, 0.1))
  83. local wld1 = Instance.new("Weld")
  84. wld1.Parent = part1
  85. wld1.Part0 = part1
  86. wld1.Part1 = Torso
  87. wld1.C0 = CFrame.fromEulerAnglesXYZ(0,0,1.37) * CFrame.new(-0.3,0.5,-0.7)
  88. local wld2 = Instance.new("Weld")
  89. wld2.Parent = part2
  90. wld2.Part0 = part2
  91. wld2.Part1 = part1
  92. wld2.C0 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0,0,0)
  93. local wld3 = Instance.new("Weld")
  94. wld3.Parent = part3
  95. wld3.Part0 = part3
  96. wld3.Part1 = Torso
  97. wld3.C0 = CFrame.fromEulerAnglesXYZ(-0.2,1.57,0) * CFrame.new(0,0.7,-0.7)
  98. local wld4 = Instance.new("Weld")
  99. wld4.Parent = part4
  100. wld4.Part0 = part4
  101. wld4.Part1 = part3
  102. wld4.C0 = CFrame.fromEulerAnglesXYZ(1.57,0,0) * CFrame.new(0,0,-1.5)
  103. local wld5 = Instance.new("Weld")
  104. wld5.Parent = part5
  105. wld5.Part0 = part5
  106. wld5.Part1 = part3
  107. wld5.C0 = CFrame.fromEulerAnglesXYZ(-1.57,0,0) * CFrame.new(0,0.25,0)
  108. local wld6 = Instance.new("Weld")
  109. wld6.Parent = part6
  110. wld6.Part0 = part6
  111. wld6.Part1 = part3
  112. wld6.C0 = CFrame.fromEulerAnglesXYZ(-1.57,0,0) * CFrame.new(0.15,0.2,0)
  113. local wld7 = Instance.new("Weld")
  114. wld7.Parent = part7
  115. wld7.Part0 = part7
  116. wld7.Part1 = part3
  117. wld7.C0 = CFrame.fromEulerAnglesXYZ(-1.57,0,0) * CFrame.new(-0.15,0.2,0)
  118. local wld8 = Instance.new("Weld")
  119. wld8.Parent = part8
  120. wld8.Part0 = part8
  121. wld8.Part1 = part3
  122. wld8.C0 = CFrame.fromEulerAnglesXYZ(-1.57,0,0) * CFrame.new(0,0.1,0)
  123. counter=1
  124. for i=1,4 do
  125. Part=part(1,modelzorz,0,0,BrickColor.new("Black"),"Part",Vector3.new(1, 1.2, 1))
  126. Mesh=mesh("CylinderMesh",Part,"","",Vector3.new(0,0,0),Vector3.new(0.2, 0.2, 0.2))
  127. local wld = Instance.new("Weld")
  128. wld.Parent = Part
  129. wld.Part0 = Part
  130. wld.Part1 = part2
  131. wld.C0 = CFrame.fromEulerAnglesXYZ(1.57,0,0) * CFrame.new(0,counter,-0.1)
  132. counter=counter-0.7
  133. end
  134. local fengui = Instance.new("GuiMain")
  135. fengui.Parent = Player.PlayerGui
  136. fengui.Name = "manaGUI"
  137. local fenframe = Instance.new("Frame")
  138. fenframe.Parent = fengui
  139. fenframe.BackgroundColor3 = Color3.new(255,255,255)
  140. fenframe.BackgroundTransparency = 1
  141. fenframe.BorderColor3 = Color3.new(17,17,17)
  142. fenframe.Size = UDim2.new(0.0500000007, 0, 0.100000001, 0)
  143. local fentext = Instance.new("TextLabel")
  144. fentext.Parent = fenframe
  145. fentext.Text = "Mana("..mana..")"
  146. fentext.BackgroundTransparency = 1
  147. fentext.SizeConstraint = "RelativeXY"
  148. fentext.TextXAlignment = "Center"
  149. fentext.TextYAlignment = "Center"
  150. fentext.Position = UDim2.new(0,80,1,200)
  151. local fentext2 = Instance.new("TextLabel")
  152. fentext2.Parent = fenframe
  153. fentext2.Text = " "
  154. fentext2.BackgroundTransparency = 0
  155. fentext2.BackgroundColor3 = Color3.new(0,0,0)
  156. fentext2.SizeConstraint = "RelativeXY"
  157. fentext2.TextXAlignment = "Center"
  158. fentext2.TextYAlignment = "Center"
  159. fentext2.Position = UDim2.new(0,10,1,170)
  160. fentext2.Size = UDim2.new(2.79999995,0,0.210000306,0)
  161. local fentext3 = Instance.new("TextLabel")
  162. fentext3.Parent = fenframe
  163. fentext3.Text = " "
  164. fentext3.BackgroundTransparency = 0
  165. fentext3.BackgroundColor3 = Color3.new(1,1,0)
  166. fentext3.SizeConstraint = "RelativeXY"
  167. fentext3.TextXAlignment = "Center"
  168. fentext3.TextYAlignment = "Center"
  169. fentext3.Position = UDim2.new(0,10,1,170)
  170. fentext3.Size = UDim2.new(mana*0.007,0,0.400000006,0)
  171. --2.9000001, 0}, {0.450000018, 0}
  172. local gairo = Instance.new("BodyGyro")
  173. gairo.Parent = nil
  174. gairo.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  175. gairo.P = 20e+003
  176. if (script.Parent.className ~= "HopperBin") then
  177. Tool = Instance.new("HopperBin")
  178. Tool.Parent = Backpack
  179. Tool.Name = "Flute Shooter"
  180. script.Parent = Tool
  181. end
  182. Bin = script.Parent
  183. function hideanim()
  184. wld1.Part1 = Torso
  185. wld1.C0 = CFrame.fromEulerAnglesXYZ(0,0,1.37) * CFrame.new(-0.3,0.5,-0.7)
  186. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,0) * CFrame.new(0,0,-0.5)
  187. end
  188. function equipanim()
  189. for i=0,1,0.1 do
  190. wait()
  191. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57+0.3*i,3.14,0.5*i) * CFrame.new(0,0,-0.5)
  192. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  193. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  194. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(-0.5*i,0,-0.5*i)
  195. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  196. end
  197. wld1.Part1 = RightArm
  198. wld1.C0 = CFrame.fromEulerAnglesXYZ(0,0,0.85) * CFrame.new(0,1,0)
  199. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0,0,0)
  200. for i=0,1,0.1 do
  201. wait()
  202. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57+0.3,3.14,0.5) * CFrame.new(0,0,-0.5)
  203. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  204. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  205. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(-0.5+0.5*i,0,-0.5+0.5*i)
  206. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  207. end
  208. for i=0,1,0.1 do
  209. wait()
  210. wld1.C0 = CFrame.fromEulerAnglesXYZ(0.45*i,3.14*i,0.85+2*i) * CFrame.new(0,1,0)
  211. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57+0.3-0.3*i,3.14,0.5-0.5*i) * CFrame.new(0,0,-0.5)
  212. LW.C0 = CFrame.new(-1.5+0.5*i,0.5,-0.5*i) * CFrame.fromEulerAnglesXYZ(1.7*i,0,0.3*i)
  213. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  214. RW.C0 = CFrame.new(1.5-0.9*i,0.5,-0.9*i) * CFrame.fromEulerAnglesXYZ(2*i,0,-0.3*i)
  215. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  216. end
  217. wld1.Part1=Head
  218. wld1.C0 = CFrame.fromEulerAnglesXYZ(1.57,0,0) * CFrame.new(0,0.25,2)
  219. end
  220. function Shoot()
  221. attack=true
  222. shoottrail2(part1,50)
  223. for i=0,1,0.2 do
  224. wait()
  225. wld1.C0 = CFrame.fromEulerAnglesXYZ(1.57-0.3*i,0,0) * CFrame.new(0,0.25-0.4*i,2)
  226. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,0) * CFrame.new(0,0,-0.5)
  227. LW.C0 = CFrame.new(-1.5+0.5,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(1.7+0.5*i,0,0.3)
  228. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  229. RW.C0 = CFrame.new(1.5-0.9,0.5,-0.9) * CFrame.fromEulerAnglesXYZ(2+0.5*i,0,-0.3)
  230. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  231. end
  232. for i=0,1,0.2 do
  233. wait()
  234. wld1.C0 = CFrame.fromEulerAnglesXYZ(1.57-0.3+0.3*i,0,0) * CFrame.new(0,0.25-0.4+0.4*i,2)
  235. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,0) * CFrame.new(0,0,-0.5)
  236. LW.C0 = CFrame.new(-1.5+0.5,0.5,-0.5) * CFrame.fromEulerAnglesXYZ(1.7+0.5-0.5*i,0,0.3)
  237. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  238. RW.C0 = CFrame.new(1.5-0.9,0.5,-0.9) * CFrame.fromEulerAnglesXYZ(2+0.5-0.5*i,0,-0.3)
  239. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  240. end
  241. attack=false
  242. end
  243. function Reload()
  244. attack=true
  245. for i=0,1,0.1 do
  246. wait()
  247. wld1.C0 = CFrame.fromEulerAnglesXYZ(1.57,0,0) * CFrame.new(0,0.25,2)
  248. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,0) * CFrame.new(0,0,-0.5)
  249. LW.C0 = CFrame.new(-1.5+0.5+0.2*i,0.5,-0.5-0.2*i) * CFrame.fromEulerAnglesXYZ(1.7+0.3*i,0,0.3+0.2*i)
  250. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  251. RW.C0 = CFrame.new(1.5-0.9,0.5,-0.9) * CFrame.fromEulerAnglesXYZ(2,0,-0.3)
  252. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  253. end
  254. for i=0,1,0.1 do
  255. wait()
  256. wld1.C0 = CFrame.fromEulerAnglesXYZ(1.57,0,0) * CFrame.new(0,0.25,2)
  257. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57,3.14,0) * CFrame.new(0,0,-0.5)
  258. LW.C0 = CFrame.new(-1.5+0.7,0.5,-0.7) * CFrame.fromEulerAnglesXYZ(2,0,0.5)
  259. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  260. RW.C0 = CFrame.new(1.5-0.9+0.9*i,0.5,-0.9+0.9*i) * CFrame.fromEulerAnglesXYZ(2-2.5*i,0,-0.3)
  261. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  262. end
  263. wld1.Part1 = LeftArm
  264. wld1.C0 = CFrame.fromEulerAnglesXYZ(-0.7,3.14,0.3) * CFrame.new(0,1,0)
  265. for i=0,1,0.1 do
  266. wait()
  267. wld1.C0 = CFrame.fromEulerAnglesXYZ(-0.7+1*i,3.14,0.3+1.5*i) * CFrame.new(0.8*i,1,0)
  268. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57+0.3*i,3.14,0.5*i) * CFrame.new(0,0,-0.5)
  269. LW.C0 = CFrame.new(-1.5+0.7,0.5,-0.7) * CFrame.fromEulerAnglesXYZ(2-0.5*i,0,0.5+0.2*i)
  270. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  271. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(2-2.5,0,-0.3)
  272. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  273. end
  274. DPart=part(1,modelzorz,0,0,BrickColor.new("Dark orange"),"Part",Vector3.new(0.2, 2.4, 0.2))
  275. DMesh=mesh("SpecialMesh",DPart,"FileMesh","http://www.roblox.com/asset/?id=1033714",Vector3.new(0,0,0),Vector3.new(0.1, 4, 0.1))
  276. local DWeld = Instance.new("Weld")
  277. DWeld.Parent = DPart
  278. DWeld.Part0 = DPart
  279. DWeld.Part1 = RightArm
  280. DWeld.C0 = CFrame.fromEulerAnglesXYZ(1.57,-1.57,-0.5) * CFrame.new(1,1,0)
  281. for i=0,1,0.1 do
  282. wait()
  283. wld1.C0 = CFrame.fromEulerAnglesXYZ(-0.7+1,3.14,0.3+1.5) * CFrame.new(0.8,1,0)
  284. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57+0.3-0.3*i,3.14,0.5-0.5*i) * CFrame.new(0,0,-0.5)
  285. LW.C0 = CFrame.new(-1.5+0.7,0.5,-0.7) * CFrame.fromEulerAnglesXYZ(2-0.5-0.2*i,0,0.5+0.2)
  286. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  287. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(-0.5+1.5*i,0,-0.3)
  288. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  289. DWeld.C0 = CFrame.fromEulerAnglesXYZ(1.57,-1.57+0.3*i,-0.5-0.2*i) * CFrame.new(1-1*i,1+0.2*i,0.2*i)
  290. DWeld.C1 = CFrame.fromEulerAnglesXYZ(0,0,0)
  291. end
  292. for i=0,1,0.1 do
  293. wait()
  294. wld1.C0 = CFrame.fromEulerAnglesXYZ(-0.7+1,3.14,0.3+1.5) * CFrame.new(0.8,1,0)
  295. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57+0.3-0.3,3.14,0.5-0.5) * CFrame.new(0,0,-0.5)
  296. LW.C0 = CFrame.new(-1.5+0.7,0.5,-0.7) * CFrame.fromEulerAnglesXYZ(2-0.5-0.2,0,0.5+0.2)
  297. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  298. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(-0.5+1.5+0.1*i,0,-0.3-0.2*i)
  299. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  300. DWeld.C0 = CFrame.fromEulerAnglesXYZ(1.57,-1.57+0.3+0.1*i,-0.5-0.2-0.2*i) * CFrame.new(1-1+0.9*i,1+0.2+1.2*i,0.2+0.4*i)
  301. DWeld.C1 = CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0.3*i,0,0)
  302. end
  303. DPart.Parent=nil
  304. for i=0,1,0.1 do
  305. wait()
  306. wld1.C0 = CFrame.fromEulerAnglesXYZ(-0.7+1-0.5*i,3.14,0.3+1.5-1.5*i) * CFrame.new(0.8-1.4*i,1,0.5*i)
  307. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57+0.3-0.3,3.14,0.5-0.5) * CFrame.new(0,0,-0.5)
  308. LW.C0 = CFrame.new(-1.5+0.7-0.2*i,0.5,-0.7+0.2*i) * CFrame.fromEulerAnglesXYZ(1.3+0.4*i,0,0.7-0.4*i)
  309. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  310. RW.C0 = CFrame.new(1.5-0.9*i,0.5,-0.9*i) * CFrame.fromEulerAnglesXYZ(1.1+0.9*i,0,-0.3-0.2+0.2*i)
  311. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  312. end
  313. wld1.Part1=Head
  314. wld1.C0 = CFrame.fromEulerAnglesXYZ(1.57,0,0) * CFrame.new(0,0.25,2)
  315. attack=false
  316. end
  317. function onehit()
  318. end
  319. function twohit()
  320. end
  321. function threehit()
  322. end
  323. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  324. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  325. end
  326. function shoottrail2(pos1,Damage)
  327. coroutine.resume(coroutine.create(function()
  328. spread2 = 0
  329. range2 = 1000
  330. rangepower = 10
  331. local spreadvector = (Vector3.new(math.random(-spread2,spread2),math.random(-spread2,spread2),math.random(-spread2,spread2)) / 100) --* (pos1.Position).magnitude/100
  332. --local dir = Head.CFrame.lookVector+spreadvector
  333. local dir = Head.CFrame.lookVector+spreadvector
  334. local ammount = 100
  335. local hit2,pos = rayCast(pos1.Position,dir,10,Character)
  336. local rangepos = range2
  337. local function drawtrail(From,To)
  338. local effectsmsh = Instance.new("CylinderMesh")
  339. local Damg = Damage*2
  340. effectsmsh.Name = "Mesh"
  341. local effectsg = Instance.new("Part")
  342. effectsg.formFactor = 3
  343. effectsg.CanCollide = false
  344. effectsg.Name = "Eff"
  345. effectsg.Locked = true
  346. effectsg.Anchored = true
  347. effectsg.Size = Vector3.new(1,0.4,1)
  348. effectsg.Parent = Character
  349. effectsmsh.Parent = effectsg
  350. effectsg.BrickColor = BrickColor.new("Dark orange")
  351. effectsg.Reflectance = 0.25
  352. local LP = From
  353. local point1 = To
  354. local mg = (LP - point1).magnitude
  355. effectsmsh.Scale = Vector3.new(0.4,mg*5,0.4)
  356. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  357. coroutine.resume(coroutine.create(function()
  358. for i = 0 , 1 , 0.2 do
  359. wait()
  360. effectsg.Transparency = 1*i
  361. effectsmsh.Scale = Vector3.new(0.4-0.4*i,mg*5,0.4-0.4*i)
  362. end
  363. effectsg.Transparency = 1
  364. wait()
  365. effectsg.Parent = nil
  366. end))
  367. end
  368. local newpos = pos1.Position
  369. local inc = rangepower
  370. local Damg = Damage*2
  371. local decr = 0
  372. repeat
  373. wait()
  374. rangepos = rangepos - 10
  375. dir = dir
  376. --dir = dir
  377. --print(Damg)
  378. hit2,pos = rayCast(newpos,dir,inc,Character)
  379. drawtrail(newpos,pos)
  380. newpos = newpos + (dir * inc)
  381. if alt==1 then
  382. inc = 10
  383. if inc >= 20 then
  384. inc = inc - 10
  385. end
  386. end
  387. if hit2 ~= nil then
  388. rangepos = 0
  389. end
  390. until rangepos <= 0
  391. if hit2 ~= nil then
  392. local effectsmsh = Instance.new("SpecialMesh")
  393. effectsmsh.MeshId = "http://www.roblox.com/asset/?id=1033714"
  394. --effectsmsh.Scale = Vector3.new(1,1,2.5)
  395. effectsmsh.Scale = Vector3.new(0.1,4,0.1)
  396. local effectsg = Instance.new("Part")
  397. effectsg.formFactor = 3
  398. effectsg.CanCollide = false
  399. effectsg.Name = "Arrow"
  400. effectsg.Locked = true
  401. effectsg.Transparency = 1
  402. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  403. effectsg.Parent = Character
  404. effectsg.BrickColor = BrickColor.new("Dark orange")
  405. effectsmsh.Parent = effectsg
  406. effectsg.CFrame = CFrame.new(newpos,pos) + CFrame.new(newpos,pos).lookVector*2.5*2
  407. local weld = Instance.new("Weld")
  408. weld.Part0 = effectsg
  409. weld.Part1 = hit2
  410. local HitPos = effectsg.Position + CFrame.new(newpos,pos).lookVector*0.75
  411. local CJ = CFrame.new(HitPos)
  412. local C0 = effectsg.CFrame:inverse() * CJ
  413. local C1 = hit2.CFrame:inverse() * CJ
  414. weld.C0 = C0
  415. weld.C1 = C1
  416. weld.Parent = effectsg
  417. coroutine.resume(coroutine.create(function()
  418. wait()
  419. effectsg.Parent = nil
  420. end))
  421. if hit2.Parent:FindFirstChild("Humanoid") ~= nil then
  422. hum = hit2.Parent.Humanoid
  423. attackdebounce=false
  424. Damagefunc1(hit2,math.floor(Damg/4),5)
  425. elseif hit2.Parent.Parent ~= nil and hit2.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  426. hum = hit2.Parent.Parent.Humanoid
  427. attackdebounce=false
  428. Damagefunc1(hit2,math.floor(Damg/4),5)
  429. elseif hit2.Parent.Parent.Parent ~= nil and hit2.Parent.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  430. hum = hit2.Parent.Parent.Humanoid
  431. attackdebounce=false
  432. Damagefunc1(hit2,math.floor(Damg/4),5)
  433. end
  434. end
  435. end))
  436. end
  437. function MMMAGIC(part,x1,y1,z1,x2,y2,z2,color)
  438. local msh1 = Instance.new("BlockMesh")
  439. msh1.Scale = Vector3.new(0.5,0.5,0.5)
  440. S=Instance.new("Part")
  441. S.Name="Effect"
  442. S.formFactor=0
  443. S.Size=Vector3.new(x1,y1,z1)
  444. S.BrickColor=color
  445. S.Reflectance = 0
  446. S.TopSurface=0
  447. S.BottomSurface=0
  448. S.Transparency=0
  449. S.Anchored=true
  450. S.CanCollide=false
  451. S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  452. S.Parent=Character
  453. msh1.Parent = S
  454. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.1,0.1,0.1) Part.CFrame=Part.CFrame*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  455. end
  456. function UltimaMMMAGIC(part,x1,y1,z1,x2,y2,z2,color)
  457. local msh1 = Instance.new("BlockMesh")
  458. msh1.Scale = Vector3.new(x1,y1,z1)
  459. S=Instance.new("Part")
  460. S.Name="Effect"
  461. S.formFactor=0
  462. S.Size=Vector3.new(1,1,1)
  463. S.BrickColor=color
  464. S.Reflectance = 0
  465. S.TopSurface=0
  466. S.BottomSurface=0
  467. S.Transparency=0
  468. S.Anchored=true
  469. S.CanCollide=false
  470. S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  471. S.Parent=Character
  472. msh1.Parent = S
  473. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.1,0.1,0.1) Part.CFrame=Part.CFrame*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  474. end
  475. function MOREMAGIX(part,cframe,x,y,z,color)
  476. p2=Instance.new("Part")
  477. p2.Name="Blast"
  478. p2.TopSurface=0
  479. p2.BottomSurface=0
  480. p2.CanCollide=false
  481. p2.Anchored=true
  482. p2.BrickColor=color
  483. p2.Size=Vector3.new(x,y,z)
  484. p2.formFactor="Symmetric"
  485. p2.CFrame=part.CFrame*CFrame.new(0,cframe,0)
  486. p2.Parent=workspace
  487. m=Instance.new("BlockMesh")
  488. m.Parent=p2
  489. m.Name="BlastMesh"
  490. coroutine.resume(coroutine.create(function(part,dir) for loll=1, 15 do part.BlastMesh.Scale=part.BlastMesh.Scale-Vector3.new(.09,.09,.09) part.Transparency=loll/20 part.CFrame=part.CFrame*CFrame.new(dir)*CFrame.fromEulerAnglesXYZ(math.random(-100,100)/100, math.random(-100,100)/100, math.random(-100,100)/100) wait() end part.Parent=nil end),p2,Vector3.new(math.random(-10,10)/10,math.random(-10,10)/10,math.random(-10,10)/10))
  491. end
  492. function EVENMOARMAGIX(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  493. local msh1 = Instance.new("SpecialMesh")
  494. msh1.Scale = Vector3.new(0.5,0.5,0.5)
  495. msh1.MeshType = "Sphere"
  496. S=Instance.new("Part")
  497. S.Name="Effect"
  498. S.formFactor=0
  499. S.Size=Vector3.new(x1,y1,z1)
  500. S.BrickColor=color
  501. if Style == "WingBlade" and element == "Dark" then
  502. S.BrickColor=BrickColor.new("Black")
  503. end
  504. S.Reflectance = 0
  505. S.TopSurface=0
  506. S.BottomSurface=0
  507. S.Transparency=0
  508. S.Anchored=true
  509. S.CanCollide=false
  510. S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(x3,y3,z3)
  511. S.Parent=Character
  512. msh1.Parent = S
  513. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.15,0.3,0.15) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  514. end
  515. function WaveEffect(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  516. local msh1 = Instance.new("SpecialMesh")
  517. msh1.Scale = Vector3.new(x1,y1,z1)
  518. msh1.MeshId = "http://www.roblox.com/asset/?id=20329976"
  519. S=Instance.new("Part")
  520. S.Name="Effect"
  521. S.formFactor=0
  522. S.Size=Vector3.new(1,1,1)
  523. S.BrickColor=color
  524. S.Reflectance = 0
  525. S.TopSurface=0
  526. S.BottomSurface=0
  527. S.Transparency=0
  528. S.Anchored=true
  529. S.CanCollide=false
  530. S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(x3,y3,z3)
  531. S.Parent=Character
  532. msh1.Parent = S
  533. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.15,0.3,0.15) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  534. end
  535. function BlastEffect(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  536. local msh1 = Instance.new("SpecialMesh")
  537. msh1.Scale = Vector3.new(x1,y1,z1)
  538. msh1.MeshId = "http://www.roblox.com/asset/?id=1323306"
  539. S=Instance.new("Part")
  540. S.Name="Effect"
  541. S.formFactor=0
  542. S.Size=Vector3.new(1,1,1)
  543. S.BrickColor=color
  544. S.Reflectance = 0
  545. S.TopSurface=0
  546. S.BottomSurface=0
  547. S.Transparency=0
  548. S.Anchored=true
  549. S.CanCollide=false
  550. S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(x3,y3,z3)
  551. S.Parent=Character
  552. msh1.Parent = S
  553. coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.15,0.3,0.15) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  554. end
  555. function ss(pitch)
  556. local SlashSound = Instance.new("Sound")
  557. --SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
  558. SlashSound.SoundId = "http://roblox.com/asset/?id=10209645"
  559. SlashSound.Parent = workspace
  560. SlashSound.Volume = .7
  561. SlashSound.Pitch = pitch
  562. SlashSound.PlayOnRemove = true
  563. coroutine.resume(coroutine.create(function()
  564. wait(0)
  565. SlashSound.Parent = nil
  566. end))
  567. end
  568. function equipsound(pitch)
  569. local SlashSound = Instance.new("Sound")
  570. SlashSound.SoundId = "rbxasset://sounds\\unsheath.wav"
  571. SlashSound.Parent = workspace
  572. SlashSound.Volume = .5
  573. SlashSound.Pitch = pitch
  574. SlashSound.PlayOnRemove = true
  575. coroutine.resume(coroutine.create(function()
  576. wait(0)
  577. SlashSound.Parent = nil
  578. end))
  579. end
  580. function magicsound(pitch)
  581. local SlashSound = Instance.new("Sound")
  582. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2248511"
  583. SlashSound.Parent = workspace
  584. SlashSound.Volume = .5
  585. SlashSound.Pitch = pitch
  586. SlashSound.PlayOnRemove = true
  587. coroutine.resume(coroutine.create(function()
  588. wait(0)
  589. SlashSound.Parent = nil
  590. end))
  591. end
  592. function critsound(pitch)
  593. local SlashSound = Instance.new("Sound")
  594. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2801263"
  595. SlashSound.Parent = workspace
  596. SlashSound.Volume = .7
  597. SlashSound.Pitch = pitch
  598. SlashSound.PlayOnRemove = true
  599. coroutine.resume(coroutine.create(function()
  600. wait(0)
  601. SlashSound.Parent = nil
  602. end))
  603. end
  604. function spikesound(pitch)
  605. local SlashSound = Instance.new("Sound")
  606. SlashSound.SoundId = "http://www.roblox.com/asset/?id=3264793"
  607. SlashSound.Parent = workspace
  608. SlashSound.Volume = .7
  609. SlashSound.Pitch = pitch
  610. SlashSound.PlayOnRemove = true
  611. coroutine.resume(coroutine.create(function()
  612. wait(0)
  613. SlashSound.Parent = nil
  614. end))
  615. end
  616. Damagefunc1=function(hit,Damage,Knockback)
  617. if attackdebounce == false then
  618. attackdebounce = true
  619. coroutine.resume(coroutine.create(function()
  620. wait(0.1)
  621. attackdebounce = false
  622. end))
  623. if hit.Parent==nil then
  624. return
  625. end
  626. CPlayer=Bin
  627. h=hit.Parent:FindFirstChild("Humanoid")
  628. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  629. if mana < 400 then
  630. mana = mana + math.random(10,20)
  631. end
  632. if mana > 400 then
  633. mana = 400
  634. end
  635. Damage=Damage
  636. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  637. return
  638. end]]
  639. c=Instance.new("ObjectValue")
  640. c.Name="creator"
  641. c.Value=game.Players.LocalPlayer
  642. c.Parent=h
  643. game:GetService("Debris"):AddItem(c,.5)
  644. -- print(c.Value)
  645. if math.random(0,99)+math.random()<=5 then
  646. CRIT=true
  647. Damage=Damage*1.5
  648. --[[ Knockback=Knockback*2
  649. r=Instance.new("BodyAngularVelocity")
  650. r.P=3000
  651. r.maxTorque=Vector3.new(500000000,50000000000,500000000)*50000
  652. r.angularvelocity=Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  653. r.Parent=hit.Parent.Torso]]
  654. critsound(2)
  655.  
  656. end
  657. Damage=Damage+math.random(0,10)
  658. -- Blood(hit.CFrame*CFrame.new(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2))
  659. h:TakeDamage(Damage)
  660. showDamage(hit.Parent,Damage,.5)
  661. vp=Instance.new("BodyVelocity")
  662. vp.P=500
  663. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  664. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  665. vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05
  666. if Knockback>0 then
  667. vp.Parent=hit.Parent.Torso
  668. end
  669. game:GetService("Debris"):AddItem(vp,.25)
  670. --[[ r=Instance.new("BodyAngularVelocity")
  671. r.P=3000
  672. r.maxTorque=Vector3.new(500000000,50000000000,500000000)*50000
  673. r.angularvelocity=Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  674. r.Parent=hit.Parent.Torso]]
  675. game:GetService("Debris"):AddItem(r,.5)
  676. c=Instance.new("ObjectValue")
  677. c.Name="creator"
  678. c.Value=Player
  679. c.Parent=h
  680. game:GetService("Debris"):AddItem(c,.5)
  681. CRIT=false
  682. hitDeb=true
  683. AttackPos=6
  684. end
  685. end
  686. end
  687. showDamage=function(Char,Dealt,du)
  688. m=Instance.new("Model")
  689. m.Name=tostring(Dealt)
  690. h=Instance.new("Humanoid")
  691. h.Health=0
  692. h.MaxHealth=0
  693. h.Parent=m
  694. c=Instance.new("Part")
  695. c.Transparency=0
  696. c.BrickColor=BrickColor:Red()
  697. if CRIT==true then
  698. c.BrickColor=BrickColor.new("Really red")
  699. end
  700. c.Name="Head"
  701. c.TopSurface=0
  702. c.BottomSurface=0
  703. c.formFactor="Plate"
  704. c.Size=Vector3.new(1,.4,1)
  705. ms=Instance.new("CylinderMesh")
  706. ms.Bevel=.1
  707. ms.Scale=Vector3.new(.8,.8,.8)
  708. if CRIT==true then
  709. ms.Scale=Vector3.new(1.25,1.5,1.25)
  710. ms.Bevel=.2
  711. end
  712. ms.Parent=c
  713. c.Reflectance=0
  714. Instance.new("BodyGyro").Parent=c
  715. c.Parent=m
  716. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  717. f=Instance.new("BodyPosition")
  718. f.P=2000
  719. f.D=100
  720. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  721. f.position=c.Position+Vector3.new(0,3,0)
  722. f.Parent=c
  723. game:GetService("Debris"):AddItem(m,.5+du)
  724. c.CanCollide=false
  725. m.Parent=workspace
  726. c.CanCollide=false
  727. end
  728. hold = false
  729. function ob1d(mouse)
  730. if attack == true then return end
  731. if stancing == true then return end
  732. hold = true
  733. if combo == 0 then
  734. combo = 1
  735. onehit()
  736. coroutine.resume(coroutine.create(function()
  737. wait(0.5)
  738. if attack == false then
  739. combo = 0
  740. wld.C0 = CFrame.fromEulerAnglesXYZ(1.57,0,1.57) * CFrame.new(0,1,0)
  741. wld1.C0 = CFrame.new(0,2,0) * CFrame.fromEulerAnglesXYZ(0,0,0.2)
  742. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0,0,0)
  743. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(2,1.1,0)
  744. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  745. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(0.8,1,0)
  746. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  747. end
  748. end))
  749. elseif combo == 1 then
  750. combo = 2
  751. twohit()
  752. coroutine.resume(coroutine.create(function()
  753. wait(0.5)
  754. if attack == false then
  755. combo = 0
  756. wld.C0 = CFrame.fromEulerAnglesXYZ(1.57,0,1.57) * CFrame.new(0,1,0)
  757. wld1.C0 = CFrame.new(0,2,0) * CFrame.fromEulerAnglesXYZ(0,0,0.2)
  758. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0,0,0)
  759. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(2,1.1,0)
  760. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  761. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(0.8,1,0)
  762. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  763. end
  764. end))
  765. elseif combo == 2 then
  766. combo = 3
  767. threehit()
  768. wait(0.5)
  769. combo = 0
  770. wld.C0 = CFrame.fromEulerAnglesXYZ(1.57,0,1.57) * CFrame.new(0,1,0)
  771. wld1.C0 = CFrame.new(0,2,0) * CFrame.fromEulerAnglesXYZ(0,0,0.2)
  772. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0,0,0)
  773. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(2,1.1,0)
  774. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  775. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(0.8,1,0)
  776. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  777. end
  778. end
  779. function ob1u(mouse)
  780. hold = false
  781. end
  782. buttonhold = false
  783. function Key(key,mouse)
  784. if attack == true then return end
  785. if key == "q" then
  786. if ammo==true then
  787. Shoot()
  788. ammo=false
  789. elseif ammo==false then
  790. Reload()
  791. ammo=true
  792. end
  793. end
  794. end
  795. function Key2(key,mouse)
  796. end
  797. function s(mouse)
  798. mouse.Button1Down:connect(function() ob1d(mouse) end)
  799. mouse.Button1Up:connect(function() ob1u(mouse) end)
  800. mouse.KeyDown:connect(function(key) Key(key,mouse) end)
  801. mouse.KeyUp:connect(function(key) Key2(key,mouse) end)
  802. --mouse.KeyDown:connect(key,mouse)
  803. --mouse.KeyUp:connect(key2,mouse)
  804. player = Player
  805. ch = Character
  806. RSH = ch.Torso["Right Shoulder"]
  807. LSH = ch.Torso["Left Shoulder"]
  808. --
  809. RW.Part0 = ch.Torso
  810. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  811. RW.C1 = CFrame.new(0, 0.5, 0)
  812. RW.Part1 = ch["Right Arm"]
  813. RW.Parent = ch.Torso
  814. --_G.R = RW
  815. --
  816. LW.Part0 = ch.Torso
  817. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  818. LW.C1 = CFrame.new(0, 0.5, 0)
  819. LW.Part1 = ch["Left Arm"]
  820. LW.Parent = ch.Torso
  821. --_G.L = LW
  822. --
  823. equipanim()
  824. end
  825. function ds(mouse)
  826. hideanim()
  827. RW.Parent = nil
  828. LW.Parent = nil
  829. RSH.Parent = player.Character.Torso
  830. LSH.Parent = player.Character.Torso
  831. end
  832. Bin.Selected:connect(s)
  833. Bin.Deselected:connect(ds)
  834. function onRunning(speed)
  835. if attack == true then return end
  836. if speed>0 then
  837. walking = true
  838. --[[wld.Part1 = LeftArm
  839. wld.C0 = CFrame.fromEulerAnglesXYZ(1.57,0,1.57) * CFrame.new(0,1,0)
  840. wld1.C0 = CFrame.new(0,2,0) * CFrame.fromEulerAnglesXYZ(0,0,0.2)
  841. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0,0,0)
  842. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(2,1.1,0)
  843. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  844. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(0.8,1,0)
  845. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0) ]]
  846. else
  847. walking = false
  848. end
  849. end
  850. Character.Humanoid.Running:connect(onRunning)
  851. while true do
  852. wait(0)
  853. fentext3.Size = UDim2.new(mana*0.007,0,0.200000006,0)
  854. fentext.Text = "Mana("..mana..")"
  855. fentext3.BackgroundColor3 = Color3.new(1,1,1)
  856. end
  857. -- mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement