Advertisement
DylanD2003

Untitled

Oct 18th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 84.97 KB | None | 0 0
  1. --original by noitacinu
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Tool0 = Instance.new("Tool")
  19. Part1 = Instance.new("Part")
  20. Weld2 = Instance.new("Weld")
  21. Weld3 = Instance.new("Weld")
  22. Weld4 = Instance.new("Weld")
  23. Weld5 = Instance.new("Weld")
  24. Weld6 = Instance.new("Weld")
  25. Weld7 = Instance.new("Weld")
  26. Weld8 = Instance.new("Weld")
  27. Weld9 = Instance.new("Weld")
  28. Weld10 = Instance.new("Weld")
  29. Weld11 = Instance.new("Weld")
  30. Weld12 = Instance.new("Weld")
  31. Weld13 = Instance.new("Weld")
  32. Weld14 = Instance.new("Weld")
  33. Weld15 = Instance.new("Weld")
  34. Weld16 = Instance.new("Weld")
  35. Weld17 = Instance.new("Weld")
  36. Weld18 = Instance.new("Weld")
  37. Weld19 = Instance.new("Weld")
  38. Weld20 = Instance.new("Weld")
  39. Weld21 = Instance.new("Weld")
  40. Weld22 = Instance.new("Weld")
  41. Weld23 = Instance.new("Weld")
  42. Weld24 = Instance.new("Weld")
  43. Weld25 = Instance.new("Weld")
  44. Weld26 = Instance.new("Weld")
  45. Weld27 = Instance.new("Weld")
  46. Weld28 = Instance.new("Weld")
  47. Weld29 = Instance.new("Weld")
  48. Weld30 = Instance.new("Weld")
  49. Weld31 = Instance.new("Weld")
  50. Weld32 = Instance.new("Weld")
  51. Weld33 = Instance.new("Weld")
  52. Weld34 = Instance.new("Weld")
  53. Weld35 = Instance.new("Weld")
  54. Weld36 = Instance.new("Weld")
  55. Weld37 = Instance.new("Weld")
  56. Weld38 = Instance.new("Weld")
  57. Weld39 = Instance.new("Weld")
  58. Weld40 = Instance.new("Weld")
  59. Weld41 = Instance.new("Weld")
  60. Weld42 = Instance.new("Weld")
  61. Weld43 = Instance.new("Weld")
  62. Weld44 = Instance.new("Weld")
  63. Weld45 = Instance.new("Weld")
  64. Weld46 = Instance.new("Weld")
  65. Script47 = Instance.new("Script")
  66. Sound48 = Instance.new("Sound")
  67. LocalScript49 = Instance.new("LocalScript")
  68. Script50 = Instance.new("Script")
  69. Script51 = Instance.new("Script")
  70. LocalScript52 = Instance.new("LocalScript")
  71. LocalScript53 = Instance.new("LocalScript")
  72. Part54 = Instance.new("Part")
  73. Part55 = Instance.new("Part")
  74. BlockMesh56 = Instance.new("BlockMesh")
  75. Part57 = Instance.new("Part")
  76. Part58 = Instance.new("Part")
  77. CylinderMesh59 = Instance.new("CylinderMesh")
  78. Part60 = Instance.new("Part")
  79. Part61 = Instance.new("Part")
  80. Part62 = Instance.new("Part")
  81. CylinderMesh63 = Instance.new("CylinderMesh")
  82. Part64 = Instance.new("Part")
  83. CylinderMesh65 = Instance.new("CylinderMesh")
  84. Part66 = Instance.new("Part")
  85. Part67 = Instance.new("Part")
  86. BlockMesh68 = Instance.new("BlockMesh")
  87. Part69 = Instance.new("Part")
  88. BlockMesh70 = Instance.new("BlockMesh")
  89. PointLight71 = Instance.new("PointLight")
  90. Part72 = Instance.new("Part")
  91. BlockMesh73 = Instance.new("BlockMesh")
  92. Part74 = Instance.new("Part")
  93. BlockMesh75 = Instance.new("BlockMesh")
  94. PointLight76 = Instance.new("PointLight")
  95. Part77 = Instance.new("Part")
  96. BlockMesh78 = Instance.new("BlockMesh")
  97. Part79 = Instance.new("Part")
  98. BlockMesh80 = Instance.new("BlockMesh")
  99. Part81 = Instance.new("Part")
  100. BlockMesh82 = Instance.new("BlockMesh")
  101. PointLight83 = Instance.new("PointLight")
  102. Part84 = Instance.new("Part")
  103. BlockMesh85 = Instance.new("BlockMesh")
  104. Part86 = Instance.new("Part")
  105. BlockMesh87 = Instance.new("BlockMesh")
  106. PointLight88 = Instance.new("PointLight")
  107. Part89 = Instance.new("Part")
  108. BlockMesh90 = Instance.new("BlockMesh")
  109. Part91 = Instance.new("Part")
  110. BlockMesh92 = Instance.new("BlockMesh")
  111. Part93 = Instance.new("Part")
  112. Part94 = Instance.new("Part")
  113. CylinderMesh95 = Instance.new("CylinderMesh")
  114. Part96 = Instance.new("Part")
  115. CylinderMesh97 = Instance.new("CylinderMesh")
  116. Part98 = Instance.new("Part")
  117. Part99 = Instance.new("Part")
  118. BlockMesh100 = Instance.new("BlockMesh")
  119. Part101 = Instance.new("Part")
  120. BlockMesh102 = Instance.new("BlockMesh")
  121. Part103 = Instance.new("Part")
  122. CylinderMesh104 = Instance.new("CylinderMesh")
  123. Script105 = Instance.new("Script")
  124. Configuration106 = Instance.new("Configuration")
  125. Tool0.Name = "Voltedge"
  126. Tool0.Parent = mas
  127. Tool0.TextureId = "http://www.roblox.com/asset/?id=128538357"
  128. Tool0.Enabled = false
  129. Tool0.GripForward = Vector3.new(1, 0, 0)
  130. Tool0.GripPos = Vector3.new(0, -1.60000002, 0)
  131. Tool0.GripRight = Vector3.new(0, 0, 1)
  132. Part1.Name = "Handle"
  133. Part1.Parent = Tool0
  134. Part1.Transparency = 1
  135. Part1.Rotation = Vector3.new(-125.259995, 30, 144.73999)
  136. Part1.RotVelocity = Vector3.new(1, 1, 1)
  137. Part1.Size = Vector3.new(1, 6, 1)
  138. Part1.CFrame = CFrame.new(-189.200012, 3.66600013, -17.3340015, -0.707106531, -0.49999994, 0.500000238, 3.57627869e-07, 0.707106709, 0.707106709, -0.707107008, 0.49999994, -0.499999642)
  139. Part1.Position = Vector3.new(-189.200012, 3.66600013, -17.3340015)
  140. Part1.Orientation = Vector3.new(-45, 135, 0)
  141. Weld2.Parent = Part1
  142. Weld2.C0 = CFrame.new(0, 0, 0, 0.899168491, -0.43760258, 0, 0.43760258, 0.899168491, 0, 0, 0, 1)
  143. Weld2.C1 = CFrame.new(0, 0, 0, 0.899168491, -0.43760258, 0, 0.43760258, 0.899168491, 0, 0, 0, 1)
  144. Weld2.Part0 = Part1
  145. Weld2.Part1 = Part1
  146. Weld3.Parent = Part1
  147. Weld3.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  148. Weld3.C1 = CFrame.new(-0.0130004883, -0.331781387, -0.937977314, -2.88163189e-21, -1.65686468e-21, -1, 0.97633338, -0.216269523, 4.0918402e-22, -0.216269344, -0.976333499, -7.4505806e-08)
  149. Weld3.Part0 = Part1
  150. Weld3.Part1 = Part54
  151. Weld4.Parent = Part1
  152. Weld4.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  153. Weld4.C1 = CFrame.new(-0.0260009766, -1.99499702, 0.403997421, -2.88163189e-21, -1.65686468e-21, -1, 0.43760252, 0.899168611, 4.58468338e-22, 0.899168491, -0.437602609, 3.11004057e-22)
  154. Weld4.Part0 = Part1
  155. Weld4.Part1 = Part55
  156. Weld5.Parent = Part1
  157. Weld5.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  158. Weld5.C1 = CFrame.new(-0.0160064697, 1.36952782, -1.94962215, -2.88163189e-21, -1.65686468e-21, -1, 0.86231041, 0.506379604, 1.86264515e-09, 0.506379366, -0.862310529, -1.49011612e-08)
  159. Weld5.Part0 = Part1
  160. Weld5.Part1 = Part57
  161. Weld6.Parent = Part1
  162. Weld6.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  163. Weld6.C1 = CFrame.new(2.22236061, -0.0170059204, 0.323560715, 0.216269344, 0.976333499, 7.4505806e-08, -2.88163169e-21, -1.65686458e-21, -1, -0.97633338, 0.216269523, -4.0918402e-22)
  164. Weld6.Part0 = Part1
  165. Weld6.Part1 = Part58
  166. Weld7.Parent = Part1
  167. Weld7.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  168. Weld7.C1 = CFrame.new(-0.0160064697, -0.331674576, -2.03816891, -2.88163189e-21, -1.65686468e-21, -1, 0.97633338, -0.216269523, 4.0918402e-22, -0.216269344, -0.976333499, -7.4505806e-08)
  169. Weld7.Part0 = Part1
  170. Weld7.Part1 = Part60
  171. Weld8.Parent = Part1
  172. Weld8.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  173. Weld8.C1 = CFrame.new(-0.0130004883, -0.941339493, -0.692130566, -2.88163189e-21, -1.65686468e-21, -1, 0.851982474, -0.523569822, 1.49011612e-08, -0.523569584, -0.851982594, 7.4505806e-09)
  174. Weld8.Part0 = Part1
  175. Weld8.Part1 = Part61
  176. Weld9.Parent = Part1
  177. Weld9.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  178. Weld9.C1 = CFrame.new(1.12216592, -0.016002655, 0.323711395, 0.216269344, 0.976333499, 7.4505806e-08, -2.88163169e-21, -1.65686458e-21, -1, -0.97633338, 0.216269523, -4.0918402e-22)
  179. Weld9.Part0 = Part1
  180. Weld9.Part1 = Part62
  181. Weld10.Parent = Part1
  182. Weld10.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  183. Weld10.C1 = CFrame.new(0.702521801, -0.013999939, 1.16239357, 0.523569465, 0.851982832, -1.49011612e-08, -2.88163169e-21, -1.65686458e-21, -1, -0.851982534, 0.523569584, 1.49011612e-08)
  184. Weld10.Part0 = Part1
  185. Weld10.Part1 = Part64
  186. Weld11.Parent = Part1
  187. Weld11.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  188. Weld11.C1 = CFrame.new(-0.0130004883, -0.331279755, -1.49001789, -2.88163189e-21, -1.65686468e-21, -1, 0.97633338, -0.216269523, 4.0918402e-22, -0.216269344, -0.976333499, -7.4505806e-08)
  189. Weld11.Part0 = Part1
  190. Weld11.Part1 = Part66
  191. Weld12.Parent = Part1
  192. Weld12.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  193. Weld12.C1 = CFrame.new(-0.0120010376, 1.97564363, 0.131521225, -2.88163189e-21, -1.65686468e-21, -1, -0.216269344, -0.976333499, -8.94069672e-08, -0.976333499, 0.216269761, -4.47034836e-08)
  194. Weld12.Part0 = Part1
  195. Weld12.Part1 = Part67
  196. Weld13.Parent = Part1
  197. Weld13.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  198. Weld13.C1 = CFrame.new(-0.0130004883, -0.360313416, 0.81742239, -2.88163189e-21, -1.65686468e-21, -1, 0.973841012, -0.227229387, -7.4505806e-08, -0.227229357, -0.973841071, -5.96046448e-08)
  199. Weld13.Part0 = Part1
  200. Weld13.Part1 = Part69
  201. Weld14.Parent = Part1
  202. Weld14.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  203. Weld14.C1 = CFrame.new(-0.0130004883, 0.602180958, 0.674919128, -2.88163189e-21, -1.65686468e-21, -1, -0.234446436, -0.972128928, -3.81045717e-22, -0.972128808, 0.234446496, -4.02145235e-22)
  204. Weld14.Part0 = Part1
  205. Weld14.Part1 = Part72
  206. Weld15.Parent = Part1
  207. Weld15.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  208. Weld15.C1 = CFrame.new(-0.0130004883, -0.351724625, 0.446086884, -2.88163189e-21, -1.65686468e-21, -1, 0.973841012, -0.227229387, -7.4505806e-08, -0.227229357, -0.973841071, -5.96046448e-08)
  209. Weld15.Part0 = Part1
  210. Weld15.Part1 = Part74
  211. Weld16.Parent = Part1
  212. Weld16.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  213. Weld16.C1 = CFrame.new(-0.0130004883, 0.598138809, 0.0269947052, -2.88163189e-21, -1.65686468e-21, -1, -0.234446436, -0.972128928, -3.81045717e-22, -0.972128808, 0.234446496, -4.02145235e-22)
  214. Weld16.Part0 = Part1
  215. Weld16.Part1 = Part77
  216. Weld17.Parent = Part1
  217. Weld17.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  218. Weld17.C1 = CFrame.new(-0.0130004883, -1.80019569, -1.13411713, -2.88163189e-21, -1.65686468e-21, -1, 0, 0.999999583, 2.76143978e-22, 0.999999523, 0, -7.4505806e-09)
  219. Weld17.Part0 = Part1
  220. Weld17.Part1 = Part79
  221. Weld18.Parent = Part1
  222. Weld18.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  223. Weld18.C1 = CFrame.new(-0.0129966736, -0.343711853, 1.11860132, -2.88163189e-21, -1.65686468e-21, -1, 0.973841012, -0.227229387, -7.4505806e-08, -0.227229357, -0.973841071, -5.96046448e-08)
  224. Weld18.Part0 = Part1
  225. Weld18.Part1 = Part81
  226. Weld19.Parent = Part1
  227. Weld19.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  228. Weld19.C1 = CFrame.new(-0.0120010376, 1.98360395, 0.635215759, -2.88163189e-21, -1.65686468e-21, -1, -0.216269344, -0.976333499, -8.94069672e-08, -0.976333499, 0.216269761, -4.47034836e-08)
  229. Weld19.Part0 = Part1
  230. Weld19.Part1 = Part84
  231. Weld20.Parent = Part1
  232. Weld20.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  233. Weld20.C1 = CFrame.new(-0.0130004883, -0.3595047, -0.227424145, -2.88163189e-21, -1.65686468e-21, -1, 0.973841012, -0.227229387, -7.4505806e-08, -0.227229357, -0.973841071, -5.96046448e-08)
  234. Weld20.Part0 = Part1
  235. Weld20.Part1 = Part86
  236. Weld21.Parent = Part1
  237. Weld21.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  238. Weld21.C1 = CFrame.new(-0.0130004883, 0.438526154, -0.485078812, -2.88163189e-21, -1.65686468e-21, -1, 0.929756999, 0.368172824, 3.7252903e-09, 0.368172765, -0.929756999, -7.99238465e-23)
  239. Weld21.Part0 = Part1
  240. Weld21.Part1 = Part89
  241. Weld22.Parent = Part1
  242. Weld22.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  243. Weld22.C1 = CFrame.new(-0.0130004883, -1.00823975, -0.139583588, -2.88163189e-21, -1.65686468e-21, -1, 0.710995555, -0.703196228, 1.47287778e-22, -0.703196228, -0.710995555, 4.47034836e-08)
  244. Weld22.Part0 = Part1
  245. Weld22.Part1 = Part91
  246. Weld23.Parent = Part1
  247. Weld23.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  248. Weld23.C1 = CFrame.new(-0.015007019, 0.31763649, -0.818967819, -2.88163189e-21, -1.65686468e-21, -1, 0.86231041, 0.506379604, 1.86264515e-09, 0.506379366, -0.862310529, -1.49011612e-08)
  249. Weld23.Part0 = Part1
  250. Weld23.Part1 = Part93
  251. Weld24.Parent = Part1
  252. Weld24.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  253. Weld24.C1 = CFrame.new(0.744771957, -0.0109977722, 0.323547363, 0.216269344, 0.976333499, 7.4505806e-08, -2.88163169e-21, -1.65686458e-21, -1, -0.97633338, 0.216269523, -4.0918402e-22)
  254. Weld24.Part0 = Part1
  255. Weld24.Part1 = Part94
  256. Weld25.Parent = Part1
  257. Weld25.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  258. Weld25.C1 = CFrame.new(1.02225304, -0.0160064697, -0.209663391, 0.216269344, 0.976333499, 7.4505806e-08, -2.88163169e-21, -1.65686458e-21, -1, -0.97633338, 0.216269523, -4.0918402e-22)
  259. Weld25.Part0 = Part1
  260. Weld25.Part1 = Part96
  261. Weld26.Parent = Part1
  262. Weld26.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  263. Weld26.C1 = CFrame.new(-0.0130004883, 0.312616348, -0.905866623, -2.88163189e-21, -1.65686468e-21, -1, 0.993480444, 0.114000559, 7.4505806e-09, 0.114000589, -0.993480444, -2.98023224e-08)
  264. Weld26.Part0 = Part1
  265. Weld26.Part1 = Part98
  266. Weld27.Parent = Part1
  267. Weld27.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  268. Weld27.C1 = CFrame.new(-0.0100021362, -0.319400787, -0.792086124, -2.88163189e-21, -1.65686468e-21, -1, 0.97633338, -0.216269523, 4.0918402e-22, -0.216269344, -0.976333499, -7.4505806e-08)
  269. Weld27.Part0 = Part1
  270. Weld27.Part1 = Part99
  271. Weld28.Parent = Part1
  272. Weld28.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  273. Weld28.C1 = CFrame.new(-0.0130004883, 0.941957951, -0.322620392, -2.88163189e-21, -1.65686468e-21, -1, 0.216269344, 0.976333499, 7.4505806e-08, 0.97633338, -0.216269523, 4.0918402e-22)
  274. Weld28.Part0 = Part1
  275. Weld28.Part1 = Part101
  276. Weld29.Parent = Part1
  277. Weld29.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  278. Weld29.C1 = CFrame.new(0.817771435, -0.0109977722, 0.323532104, 0.216269344, 0.976333499, 7.4505806e-08, -2.88163169e-21, -1.65686458e-21, -1, -0.97633338, 0.216269523, -4.0918402e-22)
  279. Weld29.Part0 = Part1
  280. Weld29.Part1 = Part103
  281. Weld30.Parent = Part1
  282. Weld30.C0 = CFrame.new(0, 0, 0, 0.899168491, -0.43760258, 0, 0.43760258, 0.899168491, 0, 0, 0, 1)
  283. Weld30.C1 = CFrame.new(0, 0, 0, 0.899168491, -0.43760258, 0, 0.43760258, 0.899168491, 0, 0, 0, 1)
  284. Weld30.Part0 = Part1
  285. Weld30.Part1 = Part1
  286. Weld31.Parent = Part1
  287. Weld31.Part0 = Part1
  288. Weld31.Part1 = Part1
  289. Weld32.Parent = Part1
  290. Weld32.Part0 = Part1
  291. Weld32.Part1 = Part1
  292. Weld33.Parent = Part1
  293. Weld33.Part0 = Part1
  294. Weld33.Part1 = Part1
  295. Weld34.Parent = Part1
  296. Weld34.Part0 = Part1
  297. Weld34.Part1 = Part1
  298. Weld35.Parent = Part1
  299. Weld35.Part0 = Part1
  300. Weld35.Part1 = Part1
  301. Weld36.Parent = Part1
  302. Weld36.Part0 = Part1
  303. Weld36.Part1 = Part1
  304. Weld37.Parent = Part1
  305. Weld37.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  306. Weld37.C1 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  307. Weld37.Part0 = Part1
  308. Weld37.Part1 = Part1
  309. Weld38.Parent = Part1
  310. Weld38.C0 = CFrame.new(0, 0, 0, 0.0976286381, -0.866915882, 0.488800049, 0.169796497, 0.498454452, 0.850124896, -0.980631351, -5.54000681e-22, 0.19586271)
  311. Weld38.C1 = CFrame.new(0, 0, 0, 0.0976286381, -0.866915882, 0.488800049, 0.169796497, 0.498454452, 0.850124896, -0.980631351, -5.54000681e-22, 0.19586271)
  312. Weld38.Part0 = Part1
  313. Weld38.Part1 = Part1
  314. Weld39.Parent = Part1
  315. Weld39.C0 = CFrame.new(0, 0, 0, 0.0976286381, -0.866915882, 0.488800049, 0.169796497, 0.498454452, 0.850124896, -0.980631351, -5.54000681e-22, 0.19586271)
  316. Weld39.C1 = CFrame.new(0, 0, 0, 0.0976286381, -0.866915882, 0.488800049, 0.169796497, 0.498454452, 0.850124896, -0.980631351, -5.54000681e-22, 0.19586271)
  317. Weld39.Part0 = Part1
  318. Weld39.Part1 = Part1
  319. Weld40.Parent = Part1
  320. Weld40.C0 = CFrame.new(0, 0, 0, 0.0976286381, -0.866915882, 0.488800049, 0.169796497, 0.498454452, 0.850124896, -0.980631351, -5.54000681e-22, 0.19586271)
  321. Weld40.C1 = CFrame.new(0, 0, 0, 0.0976286381, -0.866915882, 0.488800049, 0.169796497, 0.498454452, 0.850124896, -0.980631351, -5.54000681e-22, 0.19586271)
  322. Weld40.Part0 = Part1
  323. Weld40.Part1 = Part1
  324. Weld41.Parent = Part1
  325. Weld41.C0 = CFrame.new(0, 0, 0, 0.0976286381, -0.866915882, 0.488800049, 0.169796497, 0.498454452, 0.850124896, -0.980631351, -5.54000681e-22, 0.19586271)
  326. Weld41.C1 = CFrame.new(0, 0, 0, 0.0976286381, -0.866915882, 0.488800049, 0.169796497, 0.498454452, 0.850124896, -0.980631351, -5.54000681e-22, 0.19586271)
  327. Weld41.Part0 = Part1
  328. Weld41.Part1 = Part1
  329. Weld42.Parent = Part1
  330. Weld42.C0 = CFrame.new(0, 0, 0, 0.0976286381, -0.866915882, 0.488800049, 0.169796497, 0.498454452, 0.850124896, -0.980631351, -5.54000681e-22, 0.19586271)
  331. Weld42.C1 = CFrame.new(0, 0, 0, 0.0976286381, -0.866915882, 0.488800049, 0.169796497, 0.498454452, 0.850124896, -0.980631351, -5.54000681e-22, 0.19586271)
  332. Weld42.Part0 = Part1
  333. Weld42.Part1 = Part1
  334. Weld43.Parent = Part1
  335. Weld43.C0 = CFrame.new(0, 0, 0, 0.0976286381, -0.866915882, 0.488800049, 0.169796497, 0.498454452, 0.850124896, -0.980631351, -5.54000681e-22, 0.19586271)
  336. Weld43.C1 = CFrame.new(0, 0, 0, 0.0976286381, -0.866915882, 0.488800049, 0.169796497, 0.498454452, 0.850124896, -0.980631351, -5.54000681e-22, 0.19586271)
  337. Weld43.Part0 = Part1
  338. Weld43.Part1 = Part1
  339. Weld44.Parent = Part1
  340. Weld44.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  341. Weld44.C1 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  342. Weld44.Part0 = Part1
  343. Weld44.Part1 = Part1
  344. Weld45.Parent = Part1
  345. Weld45.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  346. Weld45.C1 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  347. Weld45.Part0 = Part1
  348. Weld45.Part1 = Part1
  349. Weld46.Parent = Part1
  350. Weld46.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  351. Weld46.C1 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 1, 0, -0, -0, -1)
  352. Weld46.Part0 = Part1
  353. Weld46.Part1 = Part1
  354. Script47.Name = "CrystalSword"
  355. Script47.Parent = Tool0
  356. table.insert(cors,sandbox(Script47,function()
  357. --Crystal Sword
  358.  
  359. local Tool = script.Parent
  360. local Handle = Tool.Handle
  361. local Character = nil
  362.  
  363. local EruptionID = 128537353
  364. local Eruption = game:GetService("InsertService"):LoadAsset(EruptionID):GetChildren()[1]
  365.  
  366. local Debris = game.Debris
  367.  
  368.  
  369. local Damage = 50
  370. local Eruptions = 5
  371. local DistancePerObject = 18
  372. local TimeBetweenEruptions = .05
  373. local EruptionLife = 3
  374. local DamagePerTouch = 50
  375.  
  376.  
  377. --Creates a random number of particles and lets them fall down from the sky.
  378. function ParticleExplosion(Parent, Colors)
  379. local NumParticles = math.random(5,15)
  380. for i = 0, NumParticles do
  381. --Create the parts for the particles to emit from
  382. local ParticlePoint = Instance.new("Part")
  383. ParticlePoint.Size = Vector3.new(1,1,1)
  384. ParticlePoint.Parent = Parent
  385. ParticlePoint.Position = Parent.Position + Vector3.new(math.random(-5,5), math.random(4, 7), math.random(-5,5) )
  386. ParticlePoint.Transparency = 1
  387.  
  388. --Create the particles for display
  389. local Particle = Instance.new("Fire")
  390. local Color = Colors[math.random(1, #Colors)]
  391. Particle.Color = Color
  392. Particle.SecondaryColor = Color
  393. Particle.Parent = ParticlePoint
  394.  
  395. --Send them flying
  396. local ParticleForce = Instance.new("BodyForce")
  397. ParticleForce.Parent = ParticlePoint
  398. ParticleForce.force = Vector3.new(math.random(-20,20), 40, math.random(-20,20)) * 7
  399. Debris:AddItem(ParticleForce, .3)
  400.  
  401. Debris:AddItem(ParticlePoint, .1 + math.random())
  402. end
  403.  
  404. end
  405.  
  406.  
  407. --Fired when the chrystal touches something
  408. --Add to the player's touched counter. Damage will be done based on this number later
  409. function onCrystalTouched(part)
  410. local Character = part.Parent
  411. if not Character:FindFirstChild("Humanoid") then return end
  412.  
  413. local Player = game.Players:GetPlayerFromCharacter(Character)
  414. if Player == game.Players:GetPlayerFromCharacter(Tool.Parent) then return end
  415.  
  416. local Counter = Character:FindFirstChild("Counter")
  417. if not Counter then --If we don't have a counter, add a new one
  418. Counter = Instance.new("IntValue")
  419. Counter.Name = "Counter"
  420. Counter.Value = 0
  421. Counter.Parent = Character
  422. Debris:AddItem(Counter, .2)
  423. end
  424.  
  425. Counter.Value = Counter.Value + 1
  426. end
  427.  
  428. --Find the players with a counter variable, then kill them
  429. --If they survive, knock them over
  430. function ExplodePlayers()
  431. local Players = game.Players:GetChildren()
  432.  
  433. for i = 1, #Players do
  434. local Character = Players[i].Character
  435. local counter = Character:FindFirstChild("Counter")
  436. if counter then
  437. Character.Humanoid:TakeDamage(counter.Value * DamagePerTouch)
  438.  
  439. Character.Humanoid.Sit = true
  440.  
  441. end
  442.  
  443. end
  444. end
  445.  
  446.  
  447. Erupting = false
  448. function DoEruption()
  449. Erupting = true
  450. local Torso = Character.Torso
  451. local Direction = Torso.CFrame.lookVector
  452. local LastPosition = Torso.Position + Vector3.new(0, -2.5, 0)
  453.  
  454. for i = 1, Eruptions do
  455. --Create a new crystal formation
  456. local EruptionClone = Eruption:Clone()
  457. EruptionClone.Name = "Eruption"
  458. local Children = EruptionClone:GetChildren()
  459. local BasePart = EruptionClone.BaseCenter
  460. for z = 1, #Children do
  461. --Move each part into position
  462. if(Children[z] ~= BasePart) then
  463. local part = Children[z]
  464. local offset = part.CFrame.p - BasePart.CFrame.p
  465. part.CFrame = part.CFrame - part.CFrame.p + (LastPosition + (Direction * DistancePerObject)) + offset
  466. local cobj = part.Touched:connect(onCrystalTouched)
  467. delay(.2, function() cobj:disconnect() end)
  468. end
  469. end
  470. EruptionClone.Parent = game.Workspace
  471.  
  472. BasePart.CFrame = BasePart.CFrame - BasePart.CFrame.p + (LastPosition + (Direction * DistancePerObject))
  473.  
  474. --Play the particle and sound effects
  475. ParticleExplosion(BasePart, {BrickColor.new(28).Color, Color3.new(0/255,234/255, 255/255)} )
  476. local Sound = Tool.CrystalExplosion:Clone()
  477. Sound.Parent = EruptionClone
  478. Sound:Play()
  479.  
  480. --Move on to the next eruption
  481. LastPosition = LastPosition + (Direction * DistancePerObject)
  482.  
  483. --Kill any fool that happened to get caught in the explosion
  484. ExplodePlayers()
  485.  
  486. wait(TimeBetweenEruptions)
  487.  
  488. --Let physics take over crystal for effect
  489. delay(EruptionLife - 1.5, function()
  490. local ChildrenClone = Children
  491. for z= 1, #ChildrenClone do
  492. ChildrenClone[z].Anchored = false
  493. Debris:AddItem(ChildrenClone[z], math.random())
  494. end
  495. end)
  496.  
  497. --Clean up after ourselves
  498. Debris:AddItem(EruptionClone, EruptionLife)
  499. end
  500.  
  501. Erupting = false
  502.  
  503. end
  504.  
  505.  
  506. --Swing the sword
  507. function Swing()
  508. --Add a particle effect to the sword when you swing it to make it seem powerful
  509. local SwingParticle = Instance.new("Fire")
  510. SwingParticle.Name = "SwingParticle"
  511. SwingParticle.Parent = Handle
  512.  
  513. local Color = BrickColor.new(28).Color
  514. SwingParticle.Color = Color
  515. SwingParticle.SecondaryColor = Color
  516. Debris:AddItem(SwingParticle, 1)
  517.  
  518. --Play the swing animation
  519. local Animation = Instance.new("StringValue")
  520. Animation.Name = "toolanim"
  521. Animation.Value = "Slash"
  522. Animation.Parent = Tool
  523.  
  524. --How do i shot crystals?
  525. DoEruption()
  526.  
  527. end
  528.  
  529.  
  530.  
  531. function onActivated()
  532. if not Tool.Enabled then return end
  533. if Erupting then return end
  534. if not Character then return end
  535. Tool.Enabled = false
  536.  
  537. Swing()
  538.  
  539. wait(EruptionLife)
  540. Tool.Enabled = true
  541.  
  542. end
  543. Tool.Activated:connect(onActivated)
  544.  
  545. function onEquipped()
  546. Tool.Enabled = true
  547. Character = Tool.Parent
  548. end
  549. Tool.Equipped:connect(onEquipped)
  550.  
  551. function onUnequipped()
  552. Tool.Enabled = false
  553. Character = nil
  554. end
  555. Tool.Unequipped:connect(onUnequipped)
  556. end))
  557. Sound48.Name = "CrystalExplosion"
  558. Sound48.Parent = Tool0
  559. Sound48.SoundId = "http://www.roblox.com/asset/?id=84937942"
  560. Sound48.Volume = 1
  561. LocalScript49.Name = "Main"
  562. LocalScript49.Parent = Tool0
  563. table.insert(cors,sandbox(LocalScript49,function()
  564. local function class(name)
  565. local def = {}
  566. getfenv(0)[name] = def
  567. return function(ctor, static)
  568. local nctor = function(...)
  569. local this = {}
  570. if ctor then
  571. ctor(this, ...)
  572. end
  573. return this
  574. end
  575. getfenv(0)['Create'..name] = nctor
  576. if static then static(def) end
  577. end
  578. end
  579.  
  580. local function Create(ty)
  581. return function(data)
  582. local obj = Instance.new(ty)
  583. for k, v in pairs(data) do
  584. if type(k) == 'number' then
  585. v.Parent = obj
  586. else
  587. obj[k] = v
  588. end
  589. end
  590. return obj
  591. end
  592. end
  593.  
  594. --[[----------------------------------------------------------------------------
  595. AnimationProvider
  596. Manages animations.
  597.  
  598. CreateAnimationProvider(animations)
  599. Returns a new AnimationProvider instance.
  600. `animations` is a table containing identity/asset_id pairs.
  601. `asset_id` may be a string (Content) or an integer.
  602. AnimationProvider:LoadHumanoid(humanoid)
  603. Loads the animations into `humanoid`.
  604. AnimationProvider:GetAnimation(identity)
  605. Returns an AnimationTrack.
  606. May only be called after LoadHumanoid.
  607. AnimationProvider:StopAnimations()
  608. Stops all animations.
  609. ]]
  610. class'AnimationProvider'(function(def,anim_ids)
  611. local animations = {}
  612. local animationTracks = {}
  613. local catcherCallbacks = {}
  614. local keyframeCatchers = {}
  615. local workingHumanoid
  616.  
  617. for name,id in pairs(anim_ids) do
  618. animations[name] = Create'Animation'{
  619. Name = name;
  620. AnimationId = type(id) == "number" and ("rbxassetid://"..id) or id;
  621. Archivable = false;
  622. }
  623. end
  624.  
  625. function def:LoadHumanoid(humanoid)
  626. if humanoid ~= workingHumanoid then
  627. workingHumanoid = humanoid
  628. for name,anim in pairs(animations) do
  629. local old_track = animationTracks[name]
  630. if old_track then
  631. old_track:Stop()
  632. old_track:Destroy()
  633. if keyframeCatchers[name] then
  634. keyframeCatchers[name] = nil
  635. end
  636. end
  637.  
  638. local track = humanoid:LoadAnimation(anim)
  639. animationTracks[name] = track
  640. if catcherCallbacks[name] then
  641. local catcher = CreateKeyframeCatcher(track)
  642. keyframeCatchers[name] = catcher
  643. catcher:SetCallbacks(catcherCallbacks[name])
  644. end
  645. end
  646. end
  647. end
  648.  
  649. function def:GetAnimation(name)
  650. if not workingHumanoid then
  651. error("GetAnimation: humanoid has not been loaded",2)
  652. end
  653. return animationTracks[name]
  654. end
  655.  
  656. function def:StopAnimations(...)
  657. for name,track in pairs(animationTracks) do
  658. track:Stop(...)
  659. end
  660. end
  661.  
  662. -- lazy get
  663. setmetatable(def,{__index = animationTracks})
  664. end)
  665.  
  666. --[[
  667. SoundProvider
  668. Manages sounds.
  669.  
  670. CreateSoundProvider(sounds)
  671. Returns a new SoundProvider.
  672. `sounds` is a table containing identity/asset_id pairs.
  673. `asset_id` may be a string (Content) or an integer.
  674. SoundProvider:SetParent(parent)
  675. Sets the parent of all the sounds at once. Can be nil.
  676. SoundProvider:GetSound(identity)
  677. Returns a Sound.
  678. SoundProvider:StopSounds()
  679. Stops all sounds.
  680. SoundProvider:Fade(identity, goal, time, delta)
  681. Applies a fading effect to a Sound, starting with the current volume.
  682. `goal` is the volume to reach by the end of the transition.
  683. `time` is the amount of time the transition should take, in seconds.
  684. Optionally, `delta` is a function that transforms the progress of the fade (for non-linear transitions)
  685. ]]
  686. class'SoundProvider'(function(def,sound_ids)
  687. local sounds = {}
  688.  
  689. for name,id in pairs(sound_ids) do
  690. sounds[name] = Create'Sound'{
  691. Name = name;
  692. SoundId = type(id) == "number" and ("rbxassetid://"..id) or id;
  693. Archivable = false;
  694. }
  695. end
  696.  
  697. function def:SetParent(parent)
  698. for name,sound in pairs(sounds) do
  699. sound.Parent = parent
  700. end
  701. end
  702.  
  703. function def:GetSound(name)
  704. return sounds[name]
  705. end
  706.  
  707. function def:StopSounds()
  708. for name,sound in pairs(sounds) do
  709. sound:Stop()
  710. end
  711. end
  712.  
  713. function def:Fade(name,g,t,delta)
  714. local sound = sounds[name]
  715. delta = delta or function(n) return n end
  716. if sound then
  717. local s = sound.Volume
  718. local i = 0
  719. while i < 1 do
  720. i = i + wait()/t
  721. sound.Volume = (g-s)*delta(i)+s
  722. end
  723. sound.Volume = g
  724. else
  725. error("SoundProvider::Fade: no such sound named `"..name.."`",2)
  726. end
  727. end
  728.  
  729. -- lazy get
  730. setmetatable(def,{__index = sounds})
  731. end)
  732.  
  733. --[[
  734. ThreadID
  735. Makes sure new threads override old ones.
  736.  
  737. CreateThreadID()
  738. Returns a new ThreadID.
  739. ThreadID:Request()
  740. Returns a new ID and increments the current one.
  741. ThreadID:Assert(id)
  742. Returns whether the thread's ID equals the current one.
  743. ThreadID:Reset()
  744. Reset the current ID.
  745. ]]
  746. class'ThreadID'(function(def)
  747. local thread_id = 0
  748.  
  749. function def:Assert(id)
  750. return thread_id == id
  751. end
  752.  
  753. function def:Request()
  754. thread_id = thread_id + 1
  755. return thread_id
  756. end
  757.  
  758. function def:Reset()
  759. thread_id = 0
  760. end
  761. end)
  762.  
  763. --[[
  764. WalkSpeedManager
  765. Manages a Humanoid's WalkSpeed.
  766. When the walkspeed is set externally (not by this instance), the new value will become the base walkspeed.
  767. However, the walkspeed can be locked. If so, the walkspeed will be reverted if it has been changed externally.
  768. This allows the tool to be compatible with, say, a speed potion.
  769.  
  770. CreateWalkSpeedManager()
  771. Returns a new WalkSpeedManager.
  772. WalkSpeedManager:SetHumanoid(humanoid)
  773. Sets the humanoid and sets its WalkSpeed as the base.
  774. WalkSpeedManager:Set(walkspeed)
  775. Sets and locks the humanoid's walkspeed.
  776. WalkSpeedManager:Reset()
  777. Unlocks and resets the humanoid's walkspeed to the base walkspeed.
  778. WalkSpeedManager:GetBase()
  779. Returns the base walkspeed.
  780. ]]
  781. class'WalkSpeedManager'(function(def)
  782. local baseWalkSpeed = 16
  783. local currentWalkSpeed = 16
  784. local locked = false
  785. local settingInternal = false
  786. local humanoid
  787. local changed
  788.  
  789. function def:SetHumanoid(hum)
  790. humanoid = hum
  791. locked = false
  792. if changed then changed:disconnect() end
  793. if hum then
  794. baseWalkSpeed = hum.WalkSpeed
  795. currentWalkSpeed = baseWalkSpeed
  796. changed = hum.Changed:connect(function(p)
  797. if p == "WalkSpeed" and not settingInternal then
  798. -- something external is modifying the walkspeed; use that as the base
  799. baseWalkSpeed = hum.WalkSpeed
  800. if locked then
  801. settingInternal = true
  802. hum.WalkSpeed = currentWalkSpeed
  803. settingInternal = false
  804. end
  805. end
  806. end)
  807. end
  808. end
  809.  
  810. function def:Set(ws)
  811. if humanoid then
  812. locked = true
  813. currentWalkSpeed = ws
  814. settingInternal = true
  815. humanoid.WalkSpeed = ws
  816. settingInternal = false
  817. end
  818. end
  819.  
  820. function def:Reset()
  821. if humanoid then
  822. currentWalkSpeed = baseWalkSpeed
  823. settingInternal = true
  824. humanoid.WalkSpeed = baseWalkSpeed
  825. settingInternal = false
  826. locked = false
  827. end
  828. end
  829.  
  830. function def:GetBase()
  831. return baseWalkSpeed
  832. end
  833. end)
  834.  
  835. --[[
  836. Sequencer
  837. Calls functions in a sequence through activation of a single function.
  838.  
  839. :SetSequenceMap(map)
  840. Sets the sequence of functions to use.
  841. :SetMinInterval(interval)
  842. Sets the minimum amount of time allowed between activations.
  843. :SetResetDelay(delay,time)
  844. Sets the amount of time to wait after the most recent activation before the sequence is reset.
  845. `delay` is the time to wait after the last activation.
  846. `time` is used when comparing the current time with the last activation time.
  847. If `time` is greater than or close to `delay`, the sequence (probably) wont reset.
  848. :Activate(...)
  849. Calls the next function in the sequence. If the end of the sequence is reached, it wraps back to the beginning.
  850. The first value passed to the function is the current sequence index. Subsequent arguments are the values passed to Activate.
  851. ]]
  852. class'Sequencer'(function(def)
  853. local min_interval = 0
  854. local reset_delay = 0
  855. local reset_time = 0
  856. local seq_map = {}
  857.  
  858. local seq_index = 0
  859. local activate_time = 0
  860.  
  861. function def:SetSequenceMap(map)
  862. seq_map = map
  863. if seq_index > #map then
  864. seq_index = 0
  865. end
  866. end
  867.  
  868. function def:SetMinInterval(interval)
  869. min_interval = interval
  870. end
  871.  
  872. function def:SetResetDelay(delay,time)
  873. reset_delay = delay
  874. reset_time = time
  875. end
  876.  
  877. local function act(...)
  878. local t = tick()
  879. if t-activate_time > min_interval then
  880. activate_time = t
  881. seq_index = seq_index + 1 > #seq_map and 1 or seq_index + 1
  882. if seq_map[seq_index] then
  883. coroutine.wrap(seq_map[seq_index])(seq_index,...)
  884. end
  885. end
  886. wait(reset_delay)
  887. if tick()-activate_time > reset_time then
  888. seq_index = 0
  889. end
  890. end
  891.  
  892. function def:Activate(...)
  893. coroutine.wrap(act)(...)
  894. end
  895. end)
  896.  
  897. --[[
  898. Particle
  899. Manages a particle.
  900.  
  901. CreateParticle(constructor)
  902. Returns a new Particle.
  903. `constructor` is a function that creates a particle. It should return an Instance.
  904. :SetCountLimit(count)
  905. Sets the maximum number of particles that can exist at one time.
  906. :SetTimeLimit(time)
  907. Sets the maximum time a paricle is allowed to exist.
  908. Setting below 0 lets it exist forever.
  909. :Spawn(...)
  910. Spawns a particle.
  911. Received arguments are passed to the `constructor` function.
  912. Returns the spawned particle.
  913. :Despawn(particle)
  914. Removes a spawned particle.
  915. ]]
  916. class'Particle'(function(def,newParticle)
  917. local Debris = Game:GetService("Debris")
  918. local queue = {}
  919. local changed = {}
  920. local maxParticles = 20
  921. local maxTime = 5
  922.  
  923. local function search_remove(t,k)
  924. local i = 1
  925. while i <= #t do
  926. if t[i] == k then
  927. table.remove(t,i)
  928. else
  929. i = i + 1
  930. end
  931. end
  932. end
  933.  
  934. function def:SetCountLimit(mp)
  935. maxParticles = mp
  936. end
  937.  
  938. function def:SetTimeLimit(mt)
  939. maxTime = mt
  940. end
  941.  
  942. function def:Despawn(particle)
  943. if changed[particle] then
  944. changed[particle]:disconnect()
  945. changed[particle] = nil
  946. end
  947. search_remove(queue,particle)
  948. particle:Destroy()
  949. end
  950.  
  951. function def:Spawn(...)
  952. if #queue < maxParticles then
  953. local particle = newParticle(...)
  954. if maxTime >= 0 then Debris:AddItem(particle,maxTime) end
  955. queue[#queue+1] = particle
  956. changed[particle] = particle.AncestryChanged:connect(function(c,p)
  957. if p == nil then
  958. self:Despawn(particle)
  959. end
  960. end)
  961. end
  962. return particle
  963. end
  964.  
  965. end)
  966.  
  967. --------------------------------------------------------------------------------
  968. --------------------------------------------------------------------------------
  969. --------------------------------------------------------------------------------
  970. --------------------------------------------------------------------------------
  971.  
  972. -- Tiny Event Manager; Add: [[Event.EventName = (event)]]; Remove: [[Disconnect("EventName",...)]]
  973. local Event = {}
  974. local function Disconnect(...)
  975. for _,name in pairs{...} do
  976. if Event[name] then
  977. Event[name]:disconnect()
  978. Event[name] = nil
  979. end
  980. end
  981. end
  982.  
  983. -- get an object; make it if it doesn't exist
  984. local function GetMake(parent,name,type)
  985. local object = parent:FindFirstChild(name)
  986. if not object then
  987. object = Create(type){Name=name}
  988. object.Parent = parent
  989. end
  990. return object
  991. end
  992.  
  993. -- wait until child exists; return child
  994. local function WaitForChild(parent,name)
  995. while not parent:FindFirstChild(name) do
  996. parent.ChildAdded:wait()
  997. end
  998. return parent:FindFirstChild(name)
  999. end
  1000.  
  1001. -- get a sibling humanoid of object; by humanoid, not by name
  1002. local function GetHumanoid(object)
  1003. if object and object.Parent then
  1004. for i,v in pairs(object.Parent:GetChildren()) do
  1005. if v:IsA"Humanoid" then
  1006. return v
  1007. end
  1008. end
  1009. end
  1010. return nil
  1011. end
  1012.  
  1013. -- get the parent character from an object; verified by GetHumanoid
  1014. local function GetCharacter(object)
  1015. local humanoid = GetHumanoid(object)
  1016. if humanoid then
  1017. return object.Parent,humanoid
  1018. end
  1019. return nil
  1020. end
  1021.  
  1022. -- make a joint, if the objects exist
  1023. local function AttemptJoint(x,y,c0,c1)
  1024. if x and y then
  1025. local weld = Instance.new("Motor6D")
  1026. weld.Part0 = x
  1027. weld.Part1 = y
  1028. if c0 then weld.C0 = c0 end
  1029. if c1 then weld.C1 = c1 end
  1030. weld.Parent = x
  1031. return weld
  1032. end
  1033. end
  1034.  
  1035. -- destroy a joint used only by the two objects
  1036. local function KillJoint(x,y)
  1037. if x and y then
  1038. for i,v in pairs(x:GetChildren()) do
  1039. if v:IsA"Motor6D" then
  1040. if v.Part0 == x and v.Part1 == y then
  1041. v:Destroy()
  1042. end
  1043. end
  1044. end
  1045. end
  1046. end
  1047.  
  1048. --------------------------------------------------------------------------------
  1049. --------------------------------------------------------------------------------
  1050. --------------------------------------------------------------------------------
  1051. -----SETTINGS-------------------------------------------------------------------
  1052. --Damage
  1053. local sword_damage = 5
  1054. local charged_sword_damage = 10
  1055. local arc_damage = 10
  1056. local charged_arc_damage = 20
  1057.  
  1058. --Charged Attack
  1059. local charge_time = 6 -- how long it takes to fully charge
  1060. local charge_attack_time = 8 -- how long charged attack lasts (at full charge)
  1061. local cooldown_time = 12 -- how long before sword can be charged again (at full charge)
  1062. local charge_walk_mult = 1.5 -- how much to multiply the base walkspeed when charged
  1063.  
  1064. --Short-term Fatigue
  1065. -- min slash interval increases after every slash
  1066. -- more consecutive slashes means longer recovery time
  1067. local fatigue_enabled = true
  1068. local fatigue_increment = 0.05 -- controls stamina (seconds added per slash)
  1069. local rest_factor = 16 -- controls recovery time (multiplied by current fatigue)
  1070.  
  1071. --Moon Arc Effect
  1072. local arc_angle_variance = Vector3.new(2,12,6) -- degrees
  1073. local arc_distance_variance = 0.5 -- distance from torso
  1074. local arc_max_speed = 0.5 -- initial outward speed (gets decayed)
  1075. local arc_time = 0.3 -- how long arc should exist
  1076. local arc_decay = 2 -- exp decay factor
  1077.  
  1078. --Sphere Effect
  1079. -- a growing sphere during charge
  1080. -- not sure if looks good
  1081. local sphere_enabled = false
  1082. local sphere_radius = 5.3 -- radius at end of effect
  1083. local sphere_magnitude = 2 -- wavyness
  1084. local sphere_time = 4 -- wavyness time scale
  1085. --------------------------------------------------------------------------------
  1086. --------------------------------------------------------------------------------
  1087. --------------------------------------------------------------------------------
  1088. --------------------------------------------------------------------------------
  1089.  
  1090. local Debris = Game:GetService("Debris")
  1091. local Lighting = Game:GetService("Lighting")
  1092.  
  1093. local Tool = script.Parent
  1094. local Handle = WaitForChild(Tool,"Handle")
  1095. local Character,Humanoid
  1096.  
  1097. local DamageBin = GetMake(Tool,"DamageBin","Configuration")
  1098. local Damage = sword_damage
  1099. local ArcDamage = arc_damage
  1100.  
  1101. local MoonArcTemplate = Create'Part'{
  1102. Name = "MoonArc";
  1103. Anchored = true;
  1104. CanCollide = false;
  1105. Transparency = 1;
  1106. FormFactor = Enum.FormFactor.Symmetric;
  1107. TopSurface = Enum.SurfaceType.Smooth;
  1108. BottomSurface = Enum.SurfaceType.Smooth;
  1109. Size = Vector3.new(9,1,4);
  1110. Create'Decal'{
  1111. Name = "DecalTop";
  1112. Face = Enum.NormalId.Top;
  1113. Texture = "http://www.roblox.com/asset/?id=128538087";
  1114. };
  1115. Create'Decal'{
  1116. Name = "DecalBottom";
  1117. Face = Enum.NormalId.Bottom;
  1118. Texture = "http://www.roblox.com/asset/?id=128538087";
  1119. };
  1120. Create'BlockMesh'{
  1121. Scale = Vector3.new(1,0,1);
  1122. };
  1123. };
  1124. Game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=128538087")
  1125.  
  1126. local WalkSpeed = CreateWalkSpeedManager()
  1127.  
  1128. local Animation = CreateAnimationProvider{
  1129. SlashLeft = "http://www.roblox.com/asset/?id=74909537";
  1130. SlashRight = "http://www.roblox.com/asset/?id=74909551";
  1131. Charge = "http://www.roblox.com/asset/?id=74909500";
  1132. SlashSides = "http://www.roblox.com/asset/?id=74909569";
  1133. SlashForward = "http://www.roblox.com/asset/?id=74909528";
  1134. DualSword = "http://www.roblox.com/asset/?id=74909522";
  1135. }
  1136.  
  1137. local Sound = CreateSoundProvider{
  1138. Slash = "http://www.roblox.com/asset/?id=45885030";
  1139. Charge = "http://www.roblox.com/asset/?id=75421988";
  1140. }
  1141. Sound:SetParent(Handle)
  1142. Sound.Slash.Volume = 0.25
  1143. Sound.Charge.Volume = 0
  1144. Sound.Charge.Looped = true
  1145.  
  1146. local MoonParticleTemplate = Create'Part'{
  1147. TopSurface = Enum.SurfaceType.Smooth;
  1148. Reflectance = 2;
  1149. BrickColor = BrickColor.new(1001);
  1150. Locked = true;
  1151. Anchored = true;
  1152. CanCollide = false;
  1153. Size = Vector3.new(1, 1, 8);
  1154. FormFactor = Enum.FormFactor.Custom;
  1155. BottomSurface = Enum.SurfaceType.Smooth;
  1156. Name = "MoonParticle";
  1157. --[[
  1158. Create'RocketPropulsion'{
  1159. CartoonFactor = 1;
  1160. MaxTorque = Vector3.new(math.huge, math.huge, math.huge);
  1161. TurnP = 100000;
  1162. MaxSpeed = 500;
  1163. MaxThrust = math.huge;
  1164. ThrustD = 100;
  1165. Name = "Rocket";
  1166. ThrustP = 1000;
  1167. TargetRadius = 8;
  1168. };
  1169. --]]
  1170. Create'SpecialMesh'{
  1171. MeshType = Enum.MeshType.Sphere;
  1172. };
  1173. };
  1174. local MoonParticle = CreateParticle(function()
  1175. local pos = Handle.Position
  1176. local dir = Lighting:GetMoonDirection()
  1177. local particle = MoonParticleTemplate:Clone()
  1178. particle.Archivable = false
  1179. local r = Vector2.new(math.random(-14,14),math.random(-14,14))
  1180. if r.magnitude > 14 then r = r.unit*14 end
  1181. local start = CFrame.new(pos,pos-dir) * CFrame.new(r.x,r.y,200)
  1182. particle.CFrame = start
  1183. Spawn(function()
  1184. while ((particle.CFrame*CFrame.new(0,0,-4)).p-Handle.Position).magnitude > 8 do
  1185. particle.CFrame = CFrame.new(particle.Position,Handle.Position) * CFrame.new(0,0,-8)
  1186. wait()
  1187. end
  1188. particle:Destroy()
  1189. end)
  1190. particle.Parent = Character
  1191. --[[
  1192. particle.Rocket.Target = Handle
  1193. particle.Rocket.ReachedTarget:connect(function()
  1194. particle:Destroy()
  1195. end)
  1196. particle.Parent = Workspace
  1197. particle.Rocket:Fire()
  1198. ]]
  1199. return particle
  1200. end)
  1201. MoonParticle:SetCountLimit(10)
  1202. MoonParticle:SetTimeLimit(10)
  1203.  
  1204. local SmallParticleTemplate = Create'Part'{
  1205. TopSurface = Enum.SurfaceType.Smooth;
  1206. Reflectance = 2;
  1207. BrickColor = BrickColor.new(1001);
  1208. Locked = true;
  1209. Anchored = true;
  1210. CanCollide = false;
  1211. Size = Vector3.new(0.5, 0.5, 1);
  1212. FormFactor = Enum.FormFactor.Custom;
  1213. BottomSurface = Enum.SurfaceType.Smooth;
  1214. Name = "SmallParticle";
  1215. Create'SpecialMesh'{
  1216. MeshType = Enum.MeshType.Sphere;
  1217. };
  1218. --[[
  1219. Create'RocketPropulsion'{
  1220. CartoonFactor = 1;
  1221. MaxTorque = Vector3.new(math.huge, math.huge, math.huge);
  1222. TurnP = 100000;
  1223. ThrustD = 50;
  1224. Name = "Rocket";
  1225. ThrustP = 1000;
  1226. TargetRadius = 1;
  1227. };
  1228. --]]
  1229. };
  1230. local SmallParticle = CreateParticle(function()
  1231. local pos = Handle.Position
  1232. local particle = SmallParticleTemplate:Clone()
  1233. particle.Archivable = false
  1234. local r = Vector3.new(math.random(-12,12),math.random(-12,12),math.random(-12,12))
  1235. if r.magnitude > 12 then r = r.unit*12 end
  1236. local start = CFrame.new(pos+r,pos)
  1237. particle.CFrame = start
  1238. Spawn(function()
  1239. while (particle.Position-Handle.Position).magnitude > 2 do
  1240. particle.CFrame = CFrame.new(particle.Position,Handle.Position) * CFrame.new(0,0,-1)
  1241. wait()
  1242. end
  1243. particle:Destroy()
  1244. end)
  1245. particle.Parent = Character
  1246. --[[
  1247. particle.Rocket.Target = Handle
  1248. particle.Rocket.ReachedTarget:connect(function()
  1249. particle:Destroy()
  1250. end)
  1251. particle.Parent = Workspace
  1252. particle.Rocket:Fire()
  1253. ]]
  1254. return particle
  1255. end)
  1256. SmallParticle:SetCountLimit(10)
  1257. SmallParticle:SetTimeLimit(10)
  1258.  
  1259. local SphereParticleTemplate = Create'Part'{
  1260. TopSurface = Enum.SurfaceType.Smooth;
  1261. Reflectance = 0.75;
  1262. Transparency = 0.9;
  1263. BrickColor = BrickColor.new(1001);
  1264. Size = Vector3.new(1, 1, 1);
  1265. FormFactor = Enum.FormFactor.Custom;
  1266. BottomSurface = Enum.SurfaceType.Smooth;
  1267. Name = "SphereParticle";
  1268. Create'SpecialMesh'{
  1269. Scale = Vector3.new(0, 0, 0);
  1270. MeshType = Enum.MeshType.Sphere;
  1271. };
  1272. };
  1273.  
  1274. -- if theres a character, get a body part from it
  1275. local function GetBodyPart(name)
  1276. local character = Character or GetCharacter(Tool)
  1277. if character then
  1278. local object = character:FindFirstChild(name)
  1279. if object then
  1280. return object
  1281. end
  1282. end
  1283. return nil
  1284. end
  1285.  
  1286. local function DealDamage(hit,damage)
  1287. local humanoid = GetHumanoid(hit)
  1288. if humanoid then
  1289. local dtag = Create'ObjectValue'{
  1290. Name = tostring(damage);
  1291. Value = humanoid;
  1292. Archivable = false;
  1293. }
  1294. dtag.Parent = DamageBin
  1295. end
  1296. end
  1297.  
  1298. local function MakeMoonArc(start,angle,off)
  1299. local arc = MoonArcTemplate:Clone()
  1300. arc.Archivable = false
  1301. arc.CFrame = start
  1302. * angle
  1303. * CFrame.Angles(
  1304. math.rad(math.random(-arc_angle_variance.x,arc_angle_variance.x)),
  1305. math.rad(math.random(-arc_angle_variance.y,arc_angle_variance.y)),
  1306. math.rad(math.random(-arc_angle_variance.z,arc_angle_variance.z))
  1307. )
  1308. * off
  1309. * CFrame.new(0,0,math.random(-arc_distance_variance*10,arc_distance_variance*10)/10)
  1310.  
  1311.  
  1312. arc.Touched:connect(function(hit)
  1313. if not hit:IsDescendantOf(Character) then
  1314. DealDamage(hit,ArcDamage)
  1315. end
  1316. end)
  1317. arc.Parent = Character
  1318.  
  1319. Spawn(function()
  1320. local MoonArc = arc
  1321. local DecalTop = MoonArc:FindFirstChild("DecalTop")
  1322. local DecalBottom = MoonArc:FindFirstChild("DecalBottom")
  1323. local i = 0
  1324. while i < 1 do
  1325. local n = math.pow(i,arc_decay)
  1326. if DecalTop then DecalTop.Transparency = n end
  1327. if DecalBottom then DecalBottom.Transparency = n end
  1328. MoonArc.CFrame = MoonArc.CFrame * CFrame.new(0,0,-math.pow(1-i,arc_decay)*arc_max_speed)
  1329. i = i + wait()/arc_time
  1330. end
  1331. MoonArc:Destroy()
  1332. end)
  1333. end
  1334.  
  1335. local function MoonIsVisible(Character)
  1336. local dir = Lighting:GetMoonDirection()
  1337. if Vector3.new(0,1,0):Dot(dir) > 0 then
  1338. -- BUG: particles block raycast
  1339. if not Workspace:FindPartOnRay(Ray.new(Handle.Position,dir*999),Character) then
  1340. return true
  1341. end
  1342. end
  1343. return false
  1344. end
  1345.  
  1346. local function SwordTouched(hit)
  1347. if not hit:IsDescendantOf(Character) then
  1348. DealDamage(hit,Damage)
  1349. end
  1350. end
  1351.  
  1352. local toolEquipped = false
  1353. local attackEnabled = true
  1354. local chargedAttackEnabled = false
  1355. local canCharge = true
  1356. -- charging sequence
  1357. local function Charge(Mouse)
  1358. ---- READY CHARGE
  1359. attackEnabled = false
  1360. canCharge = false
  1361. WalkSpeed:Set(0)
  1362.  
  1363. -- make shiny handle
  1364. local ShinyHandle
  1365. do
  1366. ShinyHandle = Handle:Clone()
  1367. ShinyHandle.BrickColor = BrickColor.new("Institutional white")
  1368. ShinyHandle.Archivable = false
  1369. ShinyHandle.Parent = Tool
  1370. local mesh = ShinyHandle:FindFirstChild("Mesh")
  1371. if mesh then mesh.TextureId = "" end
  1372. AttemptJoint(ShinyHandle,Handle)
  1373. end
  1374. -- make sphere, if enabled
  1375. local SphereParticle
  1376. if sphere_enabled then
  1377. SphereParticle = SphereParticleTemplate:Clone()
  1378. SphereParticle.Archivable = false
  1379. SphereParticle.Parent = Tool
  1380. AttemptJoint(SphereParticle,Handle)
  1381. end
  1382.  
  1383. local charging = true
  1384. local charge_level = 0 -- main value; determines charge
  1385. Event.MouseCharge = Mouse.Button1Up:connect(function()
  1386. charging = false
  1387. end)
  1388.  
  1389. Animation:StopAnimations(0)
  1390. Animation.Charge:Play()
  1391.  
  1392. local moon_visible = false
  1393. -- particle thread
  1394. Spawn(function()
  1395. while charging and toolEquipped do
  1396. moon_visible = MoonIsVisible(Character)
  1397. if moon_visible then
  1398. -- spawn particles
  1399. MoonParticle:Spawn()
  1400. SmallParticle:Spawn()
  1401. end
  1402. wait(0.1)
  1403. end
  1404. end)
  1405.  
  1406. ---- CHARGE
  1407. -- fade in charge sound
  1408. Sound.Charge.Pitch = 0.5
  1409. Sound.Charge:Play()
  1410. coroutine.wrap(function()
  1411. Sound:Fade("Charge",0.8,0.5)
  1412. end)()
  1413. -- charge loop
  1414. while charging and toolEquipped do
  1415. local t = wait()
  1416. if moon_visible then
  1417. charge_level = charge_level + t/charge_time
  1418. ShinyHandle.Reflectance = charge_level
  1419. Sound.Charge.Pitch = 0.5 + charge_level*2
  1420.  
  1421. if sphere_enabled then
  1422. local i = ((sphere_magnitude*math.sin(math.pi*charge_level*sphere_radius*sphere_time))/math.pi + charge_level*sphere_radius*sphere_time)/sphere_time
  1423. SphereParticle.Mesh.Scale = Vector3.new(i,i,i)
  1424. end
  1425. end
  1426. if charge_level >= 1 then
  1427. charging = false
  1428. charge_level = 1
  1429. break
  1430. end
  1431. end
  1432.  
  1433. -- fade out charge sound
  1434. coroutine.wrap(function()
  1435. Sound:Fade("Charge",0,0.5)
  1436. Sound.Charge:Stop()
  1437. end)()
  1438.  
  1439. if sphere_enabled then
  1440. -- shrink sphere
  1441. local s = charge_level
  1442. while s > 0 do
  1443. s = s - wait()/0.25
  1444. local i = (1-math.pow(1-s,2))*sphere_radius
  1445. SphereParticle.Mesh.Scale = Vector3.new(i,i,i)
  1446. end
  1447. end
  1448.  
  1449. ---- READY CHARGE ATTACK
  1450. Animation:StopAnimations()
  1451. Animation.DualSword:Play(0.2)
  1452. Disconnect("MouseCharge")
  1453. WalkSpeed:Set(WalkSpeed:GetBase()*charge_walk_mult)
  1454. if sphere_enabled then
  1455. SphereParticle:Destroy()
  1456. end
  1457.  
  1458. -- split shiny handle from normal handle; give to left hand
  1459. KillJoint(ShinyHandle,Handle)
  1460. AttemptJoint(ShinyHandle,GetBodyPart("Left Arm"),nil,CFrame.new(0,-1,-2.25)*CFrame.Angles(0,math.pi,math.pi/2))
  1461. ShinyHandle.Touched:connect(SwordTouched)
  1462.  
  1463. Damage = charged_sword_damage
  1464. ArcDamage = charged_arc_damage
  1465.  
  1466. ---- CHARGE ATTACK
  1467. local attack_level = charge_level
  1468. chargedAttackEnabled = true
  1469. attackEnabled = true
  1470. do -- sword glow indicator
  1471. local i = 1 + (math.pow(1-charge_level,10))
  1472. Handle.Mesh.VertexColor = Vector3.new(i,i,i)
  1473. end
  1474.  
  1475. while attack_level > 0 and toolEquipped do
  1476. attack_level = attack_level - wait()/charge_attack_time
  1477. ShinyHandle.Reflectance = attack_level
  1478. ShinyHandle.Transparency = 1-attack_level
  1479. end
  1480.  
  1481. ---- CHARGE ATTACK END
  1482. chargedAttackEnabled = false
  1483. Animation.DualSword:Stop(0.2)
  1484. WalkSpeed:Reset()
  1485. Damage = sword_damage
  1486. ArcDamage = arc_damage
  1487. ShinyHandle:Destroy()
  1488.  
  1489. ---- COOLDOWN
  1490. local cooldown = charge_level
  1491. while cooldown > 0 do
  1492. cooldown = cooldown - wait()/cooldown_time
  1493. local i = 1 + (math.pow(1-cooldown,10))
  1494. Handle.Mesh.VertexColor = Vector3.new(i,i,i)
  1495. end
  1496. canCharge = true
  1497. end
  1498.  
  1499. local fatigue = 0
  1500. Tool.Equipped:connect(function(Mouse)
  1501. toolEquipped = true
  1502. Character,Humanoid = GetCharacter(Tool)
  1503. if not Character then return end
  1504. Animation:LoadHumanoid(Humanoid)
  1505. WalkSpeed:SetHumanoid(Humanoid)
  1506.  
  1507. local Torso = GetBodyPart("Torso")
  1508.  
  1509. -- Slash Sequencer
  1510. -- basic left-right slash
  1511. -- primary attack
  1512. local SlashSeq = CreateSequencer()
  1513. SlashSeq:SetMinInterval(0)
  1514. SlashSeq:SetResetDelay(1.15,0.8)
  1515. local function add_fatigue()
  1516. local inc = fatigue_increment -- may change, so save it for later
  1517. fatigue = fatigue + inc
  1518. SlashSeq:SetMinInterval(fatigue) -- set as amount of time between slashes
  1519. -- recovery time; dependant on current fatigue
  1520. -- therefore, more fatigue causes longer recovery
  1521. wait(fatigue*rest_factor)
  1522. fatigue = fatigue - inc
  1523. SlashSeq:SetMinInterval(fatigue)
  1524. end
  1525. SlashSeq:SetSequenceMap{
  1526. function()
  1527. if fatigue_enabled then Spawn(add_fatigue) end
  1528. Sound.Slash.Pitch = math.random(1000,1020)/1000
  1529. Sound.Slash:Play()
  1530.  
  1531. Animation.SlashRight:Stop(0)
  1532. Animation.SlashLeft:Play()
  1533. wait(0.25)
  1534. MakeMoonArc(
  1535. Torso.CFrame,
  1536. CFrame.Angles(-math.pi/32,-math.pi/4,0),
  1537. CFrame.new(0,0,-5)
  1538. )
  1539. end;
  1540. function()
  1541. if fatigue_enabled then Spawn(add_fatigue) end
  1542. Sound.Slash.Pitch = math.random(1000,1020)/1000
  1543. Sound.Slash:Play()
  1544.  
  1545. Animation.SlashLeft:Stop(0)
  1546. Animation.SlashRight:Play()
  1547. wait(0.25)
  1548. MakeMoonArc(
  1549. Torso.CFrame,
  1550. CFrame.Angles(math.pi/32,math.pi/6,0),
  1551. CFrame.new(0,0,-4)
  1552. )
  1553. end;
  1554. }
  1555.  
  1556. -- Charged Slash Sequencer
  1557. -- dual-sword forward-side slash
  1558. -- secondary attack
  1559. local ChargedSeq = CreateSequencer()
  1560. ChargedSeq:SetMinInterval(0.1)
  1561. ChargedSeq:SetResetDelay(0.6,0.4)
  1562. ChargedSeq:SetSequenceMap{
  1563. function()
  1564. Sound.Slash.Pitch = math.random(900,920)/1000
  1565. Sound.Slash:Play()
  1566.  
  1567. Animation.SlashSides:Stop(0)
  1568. Animation.SlashForward:Play()
  1569. wait(0.25)
  1570. MakeMoonArc(
  1571. Torso.CFrame,
  1572. CFrame.Angles(math.pi/32,0,math.pi/6),
  1573. CFrame.new(0,0,-5)
  1574. )
  1575. MakeMoonArc(
  1576. Torso.CFrame,
  1577. CFrame.Angles(math.pi/32,0,-math.pi/6),
  1578. CFrame.new(0,0,-5)
  1579. )
  1580. end;
  1581. function()
  1582. Sound.Slash.Pitch = math.random(900,920)/1000
  1583. Sound.Slash:Play()
  1584.  
  1585. Animation.SlashForward:Stop(0)
  1586. Animation.SlashSides:Play()
  1587. wait(0.25)
  1588. MakeMoonArc(
  1589. Torso.CFrame,
  1590. CFrame.Angles(-math.pi/32,-math.pi/2,0),
  1591. CFrame.new(0,0,-5)
  1592. )
  1593. MakeMoonArc(
  1594. Torso.CFrame,
  1595. CFrame.Angles(-math.pi/32,math.pi/2,0),
  1596. CFrame.new(0,0,-5)
  1597. )
  1598. end;
  1599. }
  1600.  
  1601. local ClickThread = CreateThreadID()
  1602. local down = false
  1603. Mouse.Button1Down:connect(function()
  1604. if attackEnabled and GetBodyPart("Right Arm") then
  1605. down = true
  1606. if chargedAttackEnabled then
  1607. ChargedSeq:Activate()
  1608. else
  1609. SlashSeq:Activate()
  1610. if canCharge and GetBodyPart("Left Arm") then
  1611. local cid = ClickThread:Request()
  1612. wait(0.5)
  1613. if ClickThread:Assert(cid) and down then
  1614. Charge(Mouse)
  1615. end
  1616. end
  1617. end
  1618. end
  1619. end)
  1620.  
  1621. Mouse.Button1Up:connect(function()
  1622. down = false
  1623. end)
  1624.  
  1625. Event.Touched = Handle.Touched:connect(SwordTouched)
  1626. end)
  1627.  
  1628. Tool.Unequipped:connect(function()
  1629. toolEquipped = false
  1630. chargedAttackEnabled = false
  1631. attackEnabled = true
  1632. Disconnect("Touched","Lighting")
  1633. Animation:StopAnimations()
  1634. Sound:StopSounds()
  1635. WalkSpeed:Reset()
  1636. Damage = sword_damage
  1637. ArcDamage = arc_damage
  1638. end)
  1639. end))
  1640. Script50.Name = "Welding"
  1641. Script50.Parent = Tool0
  1642. table.insert(cors,sandbox(Script50,function()
  1643. function Weld(x,y)
  1644. local W = Instance.new("Weld")
  1645. W.Part0 = x
  1646. W.Part1 = y
  1647. local CJ = CFrame.new(x.Position)
  1648. local C0 = x.CFrame:inverse()*CJ
  1649. local C1 = y.CFrame:inverse()*CJ
  1650. W.C0 = C0
  1651. W.C1 = C1
  1652. W.Parent = x
  1653. end
  1654.  
  1655. function Get(A)
  1656. if A.className == "Part" then
  1657. Weld(script.Parent.Handle, A)
  1658. A.Anchored = false
  1659. else
  1660. local C = A:GetChildren()
  1661. for i=1, #C do
  1662. Get(C[i])
  1663. end
  1664. end
  1665. end
  1666.  
  1667. function Finale()
  1668. Get(script.Parent)
  1669. end
  1670.  
  1671. script.Parent.Equipped:connect(Finale)
  1672. script.Parent.Unequipped:connect(Finale)
  1673. Finale()
  1674. end))
  1675. Script51.Name = "Welding"
  1676. Script51.Parent = Tool0
  1677. table.insert(cors,sandbox(Script51,function()
  1678. function Weld(x,y)
  1679. local W = Instance.new("Weld")
  1680. W.Part0 = x
  1681. W.Part1 = y
  1682. local CJ = CFrame.new(x.Position)
  1683. local C0 = x.CFrame:inverse()*CJ
  1684. local C1 = y.CFrame:inverse()*CJ
  1685. W.C0 = C0
  1686. W.C1 = C1
  1687. W.Parent = x
  1688. end
  1689.  
  1690. function Get(A)
  1691. if A.className == "Part" then
  1692. Weld(script.Parent.Handle, A)
  1693. A.Anchored = false
  1694. else
  1695. local C = A:GetChildren()
  1696. for i=1, #C do
  1697. Get(C[i])
  1698. end
  1699. end
  1700. end
  1701.  
  1702. function Finale()
  1703. Get(script.Parent)
  1704. end
  1705.  
  1706. script.Parent.Equipped:connect(Finale)
  1707. script.Parent.Unequipped:connect(Finale)
  1708. Finale()
  1709. end))
  1710. LocalScript52.Name = "BackupWeld"
  1711. LocalScript52.Parent = Tool0
  1712. table.insert(cors,sandbox(LocalScript52,function()
  1713. function Weld(x,y)
  1714. local W = Instance.new("Weld")
  1715. W.Part0 = x
  1716. W.Part1 = y
  1717. local CJ = CFrame.new(x.Position)
  1718. local C0 = x.CFrame:inverse()*CJ
  1719. local C1 = y.CFrame:inverse()*CJ
  1720. W.C0 = C0
  1721. W.C1 = C1
  1722. W.Parent = x
  1723. end
  1724.  
  1725. function Get(A)
  1726. if A.className == "Part" then
  1727. Weld(script.Parent.Handle, A)
  1728. A.Anchored = false
  1729. else
  1730. local C = A:GetChildren()
  1731. for i=1, #C do
  1732. Get(C[i])
  1733. end
  1734. end
  1735. end
  1736.  
  1737. function Finale()
  1738. Get(script.Parent)
  1739. end
  1740.  
  1741. script.Parent.Equipped:connect(Finale)
  1742. script.Parent.Unequipped:connect(Finale)
  1743. Finale()
  1744. end))
  1745. LocalScript53.Name = "BackupWeld"
  1746. LocalScript53.Parent = Tool0
  1747. table.insert(cors,sandbox(LocalScript53,function()
  1748. function Weld(x,y)
  1749. local W = Instance.new("Weld")
  1750. W.Part0 = x
  1751. W.Part1 = y
  1752. local CJ = CFrame.new(x.Position)
  1753. local C0 = x.CFrame:inverse()*CJ
  1754. local C1 = y.CFrame:inverse()*CJ
  1755. W.C0 = C0
  1756. W.C1 = C1
  1757. W.Parent = x
  1758. end
  1759.  
  1760. function Get(A)
  1761. if A.className == "Part" then
  1762. Weld(script.Parent.Handle, A)
  1763. A.Anchored = false
  1764. else
  1765. local C = A:GetChildren()
  1766. for i=1, #C do
  1767. Get(C[i])
  1768. end
  1769. end
  1770. end
  1771.  
  1772. function Finale()
  1773. Get(script.Parent)
  1774. end
  1775.  
  1776. script.Parent.Equipped:connect(Finale)
  1777. script.Parent.Unequipped:connect(Finale)
  1778. Finale()
  1779. end))
  1780. Part54.Parent = Tool0
  1781. Part54.BrickColor = BrickColor.new("Dark orange")
  1782. Part54.Rotation = Vector3.new(132.87999, 19.5900002, -57.9499969)
  1783. Part54.RotVelocity = Vector3.new(1, 1, 1)
  1784. Part54.Velocity = Vector3.new(0.274442673, 1.00053215, -1.27497482)
  1785. Part54.FormFactor = Enum.FormFactor.Custom
  1786. Part54.Size = Vector3.new(0.210999995, 0.247000009, 0.240999937)
  1787. Part54.CFrame = CFrame.new(-188.614136, 2.97690177, -17.7486572, 0.500000238, 0.798506439, 0.335241258, 0.707106709, -0.152925968, -0.690371871, -0.499999642, 0.582237422, -0.6410923)
  1788. Part54.BottomSurface = Enum.SurfaceType.Smooth
  1789. Part54.TopSurface = Enum.SurfaceType.Smooth
  1790. Part54.Color = Color3.new(0.627451, 0.372549, 0.207843)
  1791. Part54.Position = Vector3.new(-188.614136, 2.97690177, -17.7486572)
  1792. Part54.Orientation = Vector3.new(43.6599998, 152.389999, 102.199997)
  1793. Part54.Color = Color3.new(0.627451, 0.372549, 0.207843)
  1794. Part55.Parent = Tool0
  1795. Part55.BrickColor = BrickColor.new("Dark stone grey")
  1796. Part55.Rotation = Vector3.new(36.579998, 58.7199974, 15.6599998)
  1797. Part55.RotVelocity = Vector3.new(1, 1, 1)
  1798. Part55.Velocity = Vector3.new(-0.079066515, -1.94462585, 2.02369237)
  1799. Part55.FormFactor = Enum.FormFactor.Custom
  1800. Part55.Size = Vector3.new(0.225999996, 0.72299999, 0.200000003)
  1801. Part55.CFrame = CFrame.new(-189.811874, 5.07783031, -16.0012379, 0.500000238, -0.140152633, 0.854609191, 0.707106709, 0.635807991, -0.30943206, -0.499999642, 0.759016037, 0.417007089)
  1802. Part55.BottomSurface = Enum.SurfaceType.Smooth
  1803. Part55.TopSurface = Enum.SurfaceType.Smooth
  1804. Part55.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1805. Part55.Position = Vector3.new(-189.811874, 5.07783031, -16.0012379)
  1806. Part55.Orientation = Vector3.new(18.0299988, 63.9899979, 48.0399971)
  1807. Part55.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1808. BlockMesh56.Parent = Part55
  1809. BlockMesh56.Scale = Vector3.new(0.5, 1, 1)
  1810. BlockMesh56.Scale = Vector3.new(0.5, 1, 1)
  1811. Part57.Parent = Tool0
  1812. Part57.BrickColor = BrickColor.new("Bright red")
  1813. Part57.Rotation = Vector3.new(96.8399963, 52.1100006, -35.4899979)
  1814. Part57.RotVelocity = Vector3.new(1, 1, 1)
  1815. Part57.Velocity = Vector3.new(0.33551693, 2.39068222, -2.72619915)
  1816. Part57.FormFactor = Enum.FormFactor.Custom
  1817. Part57.Size = Vector3.new(0.225999981, 0.606999934, 0.602999926)
  1818. Part57.CFrame = CFrame.new(-188.141647, 1.99816585, -18.6663189, 0.500000238, 0.356555551, 0.789219379, 0.707106709, 0.358064115, -0.609745741, -0.499999642, 0.862935543, -0.073090829)
  1819. Part57.BottomSurface = Enum.SurfaceType.Smooth
  1820. Part57.TopSurface = Enum.SurfaceType.Smooth
  1821. Part57.Color = Color3.new(0.768628, 0.156863, 0.109804)
  1822. Part57.Position = Vector3.new(-188.141647, 1.99816585, -18.6663189)
  1823. Part57.Orientation = Vector3.new(37.5699997, 95.2900009, 63.1399994)
  1824. Part57.Color = Color3.new(0.768628, 0.156863, 0.109804)
  1825. Part58.Name = "Cylinder"
  1826. Part58.Parent = Tool0
  1827. Part58.BrickColor = BrickColor.new("Dusty Rose")
  1828. Part58.Rotation = Vector3.new(-165.279999, -52.9899979, -123.839996)
  1829. Part58.RotVelocity = Vector3.new(1, 1, 1)
  1830. Part58.Velocity = Vector3.new(0.326858759, 2.25675392, -2.58361268)
  1831. Part58.FormFactor = Enum.FormFactor.Custom
  1832. Part58.Size = Vector3.new(0.430000126, 0.235999987, 0.399999976)
  1833. Part58.CFrame = CFrame.new(-188.18811, 2.0942893, -18.5788536, -0.335241258, 0.500000238, -0.798506439, 0.690371871, 0.707106709, 0.152925968, 0.6410923, -0.499999642, -0.582237422)
  1834. Part58.BackSurface = Enum.SurfaceType.Weld
  1835. Part58.BottomSurface = Enum.SurfaceType.Weld
  1836. Part58.FrontSurface = Enum.SurfaceType.Weld
  1837. Part58.LeftSurface = Enum.SurfaceType.Weld
  1838. Part58.RightSurface = Enum.SurfaceType.Weld
  1839. Part58.TopSurface = Enum.SurfaceType.Weld
  1840. Part58.Color = Color3.new(0.639216, 0.294118, 0.294118)
  1841. Part58.Position = Vector3.new(-188.18811, 2.0942893, -18.5788536)
  1842. Part58.Orientation = Vector3.new(-8.80000019, -126.099998, 44.3099976)
  1843. Part58.Color = Color3.new(0.639216, 0.294118, 0.294118)
  1844. CylinderMesh59.Parent = Part58
  1845. CylinderMesh59.Scale = Vector3.new(1, 1, 0.400000006)
  1846. CylinderMesh59.Scale = Vector3.new(1, 1, 0.400000006)
  1847. Part60.Parent = Tool0
  1848. Part60.BrickColor = BrickColor.new("Sand red")
  1849. Part60.Rotation = Vector3.new(132.87999, 19.5900002, -57.9499969)
  1850. Part60.RotVelocity = Vector3.new(1, 1, 1)
  1851. Part60.Velocity = Vector3.new(0.324953794, 2.07767487, -2.40262866)
  1852. Part60.FormFactor = Enum.FormFactor.Custom
  1853. Part60.Size = Vector3.new(0.216000006, 0.247000009, 0.240999937)
  1854. Part60.CFrame = CFrame.new(-188.243881, 2.21950245, -18.4555454, 0.500000238, 0.798506439, 0.335241258, 0.707106709, -0.152925968, -0.690371871, -0.499999642, 0.582237422, -0.6410923)
  1855. Part60.BottomSurface = Enum.SurfaceType.Smooth
  1856. Part60.TopSurface = Enum.SurfaceType.Smooth
  1857. Part60.Color = Color3.new(0.584314, 0.47451, 0.466667)
  1858. Part60.Position = Vector3.new(-188.243881, 2.21950245, -18.4555454)
  1859. Part60.Orientation = Vector3.new(43.6599998, 152.389999, 102.199997)
  1860. Part60.Color = Color3.new(0.584314, 0.47451, 0.466667)
  1861. Part61.Parent = Tool0
  1862. Part61.BrickColor = BrickColor.new("Bright red")
  1863. Part61.Rotation = Vector3.new(142.889999, 3.19999981, -59.9499969)
  1864. Part61.RotVelocity = Vector3.new(1, 1, 1)
  1865. Part61.Velocity = Vector3.new(0.519370794, 1.09553528, -1.61490607)
  1866. Part61.FormFactor = Enum.FormFactor.Custom
  1867. Part61.Size = Vector3.new(0.225999996, 0.659999967, 0.350999951)
  1868. Part61.CFrame = CFrame.new(-188.341385, 2.90972137, -17.5709095, 0.500000238, 0.864227295, 0.0557717681, 0.707106709, -0.370220035, -0.602442443, -0.499999642, 0.34065792, -0.796210945)
  1869. Part61.BottomSurface = Enum.SurfaceType.Smooth
  1870. Part61.TopSurface = Enum.SurfaceType.Smooth
  1871. Part61.Color = Color3.new(0.768628, 0.156863, 0.109804)
  1872. Part61.Position = Vector3.new(-188.341385, 2.90972137, -17.5709095)
  1873. Part61.Orientation = Vector3.new(37.0499992, 175.98999, 117.639999)
  1874. Part61.Color = Color3.new(0.768628, 0.156863, 0.109804)
  1875. Part62.Name = "Cylinder"
  1876. Part62.Parent = Tool0
  1877. Part62.BrickColor = BrickColor.new("Black")
  1878. Part62.Rotation = Vector3.new(-165.279999, -52.9899979, -123.839996)
  1879. Part62.RotVelocity = Vector3.new(1, 1, 1)
  1880. Part62.Velocity = Vector3.new(0.273963451, 1.18162155, -1.455585)
  1881. Part62.FormFactor = Enum.FormFactor.Custom
  1882. Part62.Size = Vector3.new(0.430000126, 0.297999978, 0.399999976)
  1883. Part62.CFrame = CFrame.new(-188.557327, 2.85310006, -17.8729382, -0.335241258, 0.500000238, -0.798506439, 0.690371871, 0.707106709, 0.152925968, 0.6410923, -0.499999642, -0.582237422)
  1884. Part62.BackSurface = Enum.SurfaceType.Weld
  1885. Part62.BottomSurface = Enum.SurfaceType.Weld
  1886. Part62.FrontSurface = Enum.SurfaceType.Weld
  1887. Part62.LeftSurface = Enum.SurfaceType.Weld
  1888. Part62.RightSurface = Enum.SurfaceType.Weld
  1889. Part62.TopSurface = Enum.SurfaceType.Weld
  1890. Part62.Color = Color3.new(0.105882, 0.164706, 0.207843)
  1891. Part62.Position = Vector3.new(-188.557327, 2.85310006, -17.8729382)
  1892. Part62.Orientation = Vector3.new(-8.80000019, -126.099998, 44.3099976)
  1893. Part62.Color = Color3.new(0.105882, 0.164706, 0.207843)
  1894. CylinderMesh63.Parent = Part62
  1895. CylinderMesh63.Scale = Vector3.new(1, 1, 0.150000006)
  1896. CylinderMesh63.Scale = Vector3.new(1, 1, 0.150000006)
  1897. Part64.Name = "Cylinder"
  1898. Part64.Parent = Tool0
  1899. Part64.BrickColor = BrickColor.new("Dusty Rose")
  1900. Part64.Rotation = Vector3.new(-132.619995, -59.7899971, -96.3600006)
  1901. Part64.RotVelocity = Vector3.new(1, 1, 1)
  1902. Part64.Velocity = Vector3.new(0.673293114, 1.22112846, -1.89442158)
  1903. Part64.FormFactor = Enum.FormFactor.Custom
  1904. Part64.Size = Vector3.new(0.430000126, 0.242999986, 0.399999976)
  1905. Part64.CFrame = CFrame.new(-188.149261, 2.82232928, -17.5043793, -0.0557719693, 0.500000238, -0.864227176, 0.602442622, 0.707106709, 0.370219857, 0.796211004, -0.499999642, -0.340658039)
  1906. Part64.BackSurface = Enum.SurfaceType.Weld
  1907. Part64.BottomSurface = Enum.SurfaceType.Weld
  1908. Part64.FrontSurface = Enum.SurfaceType.Weld
  1909. Part64.LeftSurface = Enum.SurfaceType.Weld
  1910. Part64.RightSurface = Enum.SurfaceType.Weld
  1911. Part64.TopSurface = Enum.SurfaceType.Weld
  1912. Part64.Color = Color3.new(0.639216, 0.294118, 0.294118)
  1913. Part64.Position = Vector3.new(-188.149261, 2.82232928, -17.5043793)
  1914. Part64.Orientation = Vector3.new(-21.7299995, -111.509995, 40.4300003)
  1915. Part64.Color = Color3.new(0.639216, 0.294118, 0.294118)
  1916. CylinderMesh65.Parent = Part64
  1917. CylinderMesh65.Scale = Vector3.new(1, 1, 0.400000006)
  1918. CylinderMesh65.Scale = Vector3.new(1, 1, 0.400000006)
  1919. Part66.Parent = Tool0
  1920. Part66.BrickColor = BrickColor.new("Bright bluish green")
  1921. Part66.Rotation = Vector3.new(132.87999, 19.5900002, -57.9499969)
  1922. Part66.RotVelocity = Vector3.new(1, 1, 1)
  1923. Part66.Velocity = Vector3.new(0.30127883, 1.53939438, -1.84067321)
  1924. Part66.FormFactor = Enum.FormFactor.Custom
  1925. Part66.Size = Vector3.new(0.200000003, 0.200000003, 1.3039999)
  1926. Part66.CFrame = CFrame.new(-188.429474, 2.59586525, -18.1028576, 0.500000238, 0.798506439, 0.335241258, 0.707106709, -0.152925968, -0.690371871, -0.499999642, 0.582237422, -0.6410923)
  1927. Part66.BottomSurface = Enum.SurfaceType.Smooth
  1928. Part66.TopSurface = Enum.SurfaceType.Smooth
  1929. Part66.Color = Color3.new(0, 0.560784, 0.611765)
  1930. Part66.Position = Vector3.new(-188.429474, 2.59586525, -18.1028576)
  1931. Part66.Orientation = Vector3.new(43.6599998, 152.389999, 102.199997)
  1932. Part66.Color = Color3.new(0, 0.560784, 0.611765)
  1933. Part67.Parent = Tool0
  1934. Part67.BrickColor = BrickColor.new("Dark stone grey")
  1935. Part67.Rotation = Vector3.new(-165.279999, -52.9899979, -33.8400002)
  1936. Part67.RotVelocity = Vector3.new(1, 1, 1)
  1937. Part67.Velocity = Vector3.new(-0.0151560307, -1.88844585, 1.90360188)
  1938. Part67.FormFactor = Enum.FormFactor.Custom
  1939. Part67.Size = Vector3.new(0.225999996, 0.674999833, 0.200000003)
  1940. Part67.CFrame = CFrame.new(-189.751312, 5.01830196, -15.9968557, 0.500000238, 0.335241288, -0.798506677, 0.707106709, -0.690371871, 0.152926177, -0.499999642, -0.6410923, -0.582237422)
  1941. Part67.BottomSurface = Enum.SurfaceType.Smooth
  1942. Part67.TopSurface = Enum.SurfaceType.Smooth
  1943. Part67.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1944. Part67.Position = Vector3.new(-189.751312, 5.01830196, -15.9968557)
  1945. Part67.Orientation = Vector3.new(-8.80000019, -126.099998, 134.309998)
  1946. Part67.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1947. BlockMesh68.Parent = Part67
  1948. BlockMesh68.Scale = Vector3.new(0.5, 1, 1)
  1949. BlockMesh68.Scale = Vector3.new(0.5, 1, 1)
  1950. Part69.Parent = Tool0
  1951. Part69.BrickColor = BrickColor.new("Toothpaste")
  1952. Part69.Transparency = 0.69999998807907
  1953. Part69.Rotation = Vector3.new(133.23999, 19.039999, -58.0699997)
  1954. Part69.RotVelocity = Vector3.new(1, 1, 1)
  1955. Part69.Velocity = Vector3.new(0.21585393, -0.70116806, 0.485314131)
  1956. Part69.FormFactor = Enum.FormFactor.Custom
  1957. Part69.Size = Vector3.new(0.200000003, 0.372999966, 3.01099968)
  1958. Part69.CFrame = CFrame.new(-189.171143, 4.18018389, -16.6039639, 0.500000238, 0.8022241, 0.326245129, 0.707106709, -0.160675704, -0.688609421, -0.499999642, 0.574995041, -0.647595942)
  1959. Part69.BottomSurface = Enum.SurfaceType.Smooth
  1960. Part69.TopSurface = Enum.SurfaceType.Smooth
  1961. Part69.Color = Color3.new(0, 1, 1)
  1962. Part69.Position = Vector3.new(-189.171143, 4.18018389, -16.6039639)
  1963. Part69.Orientation = Vector3.new(43.5200005, 153.259995, 102.799995)
  1964. Part69.Color = Color3.new(0, 1, 1)
  1965. BlockMesh70.Parent = Part69
  1966. BlockMesh70.Scale = Vector3.new(0.200000003, 1, 1)
  1967. BlockMesh70.Scale = Vector3.new(0.200000003, 1, 1)
  1968. PointLight71.Parent = Part69
  1969. PointLight71.Color = Color3.new(0.333333, 1, 1)
  1970. PointLight71.Brightness = 100
  1971. PointLight71.Range = 4
  1972. PointLight71.Color = Color3.new(0.333333, 1, 1)
  1973. Part72.Parent = Tool0
  1974. Part72.BrickColor = BrickColor.new("Dark stone grey")
  1975. Part72.Rotation = Vector3.new(-163.789993, -53.5699997, -32.6399994)
  1976. Part72.RotVelocity = Vector3.new(1, 1, 1)
  1977. Part72.Velocity = Vector3.new(0.459605455, -0.414159775, -0.0454456806)
  1978. Part72.FormFactor = Enum.FormFactor.Custom
  1979. Part72.Size = Vector3.new(0.225999996, 2.21099997, 0.350999951)
  1980. Part72.CFrame = CFrame.new(-188.843323, 3.9772439, -16.5631523, 0.500000238, 0.320285797, -0.804621816, 0.707106709, -0.687398851, 0.165779039, -0.499999642, -0.651843131, -0.570175886)
  1981. Part72.BottomSurface = Enum.SurfaceType.Smooth
  1982. Part72.TopSurface = Enum.SurfaceType.Smooth
  1983. Part72.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1984. Part72.Position = Vector3.new(-188.843323, 3.9772439, -16.5631523)
  1985. Part72.Orientation = Vector3.new(-9.53999996, -125.32, 134.190002)
  1986. Part72.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1987. BlockMesh73.Parent = Part72
  1988. BlockMesh73.Scale = Vector3.new(0.5, 1, 1)
  1989. BlockMesh73.Scale = Vector3.new(0.5, 1, 1)
  1990. Part74.Parent = Tool0
  1991. Part74.BrickColor = BrickColor.new("Toothpaste")
  1992. Part74.Transparency = 0.44999998807907
  1993. Part74.Rotation = Vector3.new(133.23999, 19.039999, -58.0699997)
  1994. Part74.RotVelocity = Vector3.new(1, 1, 1)
  1995. Part74.Velocity = Vector3.new(0.224764109, -0.341495514, 0.116731405)
  1996. Part74.FormFactor = Enum.FormFactor.Custom
  1997. Part74.Size = Vector3.new(0.200000003, 0.372999966, 0.675999641)
  1998. Part74.CFrame = CFrame.new(-189.056885, 3.92585897, -16.8493786, 0.500000238, 0.8022241, 0.326245129, 0.707106709, -0.160675704, -0.688609421, -0.499999642, 0.574995041, -0.647595942)
  1999. Part74.BottomSurface = Enum.SurfaceType.Smooth
  2000. Part74.TopSurface = Enum.SurfaceType.Smooth
  2001. Part74.Color = Color3.new(0, 1, 1)
  2002. Part74.Position = Vector3.new(-189.056885, 3.92585897, -16.8493786)
  2003. Part74.Orientation = Vector3.new(43.5200005, 153.259995, 102.799995)
  2004. Part74.Color = Color3.new(0, 1, 1)
  2005. BlockMesh75.Parent = Part74
  2006. BlockMesh75.Scale = Vector3.new(0.200000003, 1, 1)
  2007. BlockMesh75.Scale = Vector3.new(0.200000003, 1, 1)
  2008. PointLight76.Parent = Part74
  2009. PointLight76.Color = Color3.new(0.333333, 1, 1)
  2010. PointLight76.Brightness = 100
  2011. PointLight76.Range = 4
  2012. PointLight76.Color = Color3.new(0.333333, 1, 1)
  2013. Part77.Parent = Tool0
  2014. Part77.BrickColor = BrickColor.new("Dark stone grey")
  2015. Part77.Rotation = Vector3.new(-163.789993, -53.5699997, -32.6399994)
  2016. Part77.RotVelocity = Vector3.new(1, 1, 1)
  2017. Part77.Velocity = Vector3.new(-0.0170929432, -0.562145233, 0.579238176)
  2018. Part77.FormFactor = Enum.FormFactor.Custom
  2019. Part77.Size = Vector3.new(0.225999996, 2.20599985, 0.350999951)
  2020. Part77.CFrame = CFrame.new(-189.363373, 4.08187771, -16.9352169, 0.500000238, 0.320285797, -0.804621816, 0.707106709, -0.687398851, 0.165779039, -0.499999642, -0.651843131, -0.570175886)
  2021. Part77.BottomSurface = Enum.SurfaceType.Smooth
  2022. Part77.TopSurface = Enum.SurfaceType.Smooth
  2023. Part77.Color = Color3.new(0.388235, 0.372549, 0.384314)
  2024. Part77.Position = Vector3.new(-189.363373, 4.08187771, -16.9352169)
  2025. Part77.Orientation = Vector3.new(-9.53999996, -125.32, 134.190002)
  2026. Part77.Color = Color3.new(0.388235, 0.372549, 0.384314)
  2027. BlockMesh78.Parent = Part77
  2028. BlockMesh78.Scale = Vector3.new(0.5, 1, 1)
  2029. BlockMesh78.Scale = Vector3.new(0.5, 1, 1)
  2030. Part79.Parent = Tool0
  2031. Part79.BrickColor = BrickColor.new("Dark stone grey")
  2032. Part79.Rotation = Vector3.new(0, 45, 45)
  2033. Part79.RotVelocity = Vector3.new(1, 1, 1)
  2034. Part79.Velocity = Vector3.new(0.413416147, -1.78719807, 1.37378192)
  2035. Part79.FormFactor = Enum.FormFactor.Custom
  2036. Part79.Size = Vector3.new(0.225999996, 0.72299999, 0.200000003)
  2037. Part79.CFrame = CFrame.new(-189.291672, 4.9481225, -15.638463, 0.500000238, -0.499999732, 0.707106173, 0.707106709, 0.707106411, -3.52359336e-07, -0.499999642, 0.499999732, 0.70710665)
  2038. Part79.BottomSurface = Enum.SurfaceType.Smooth
  2039. Part79.TopSurface = Enum.SurfaceType.Smooth
  2040. Part79.Color = Color3.new(0.388235, 0.372549, 0.384314)
  2041. Part79.Position = Vector3.new(-189.291672, 4.9481225, -15.638463)
  2042. Part79.Orientation = Vector3.new(0, 45, 45)
  2043. Part79.Color = Color3.new(0.388235, 0.372549, 0.384314)
  2044. BlockMesh80.Parent = Part79
  2045. BlockMesh80.Scale = Vector3.new(0.5, 1, 1)
  2046. BlockMesh80.Scale = Vector3.new(0.5, 1, 1)
  2047. Part81.Parent = Tool0
  2048. Part81.BrickColor = BrickColor.new("Toothpaste")
  2049. Part81.Transparency = 0.60000002384186
  2050. Part81.Rotation = Vector3.new(133.23999, 19.039999, -58.0699997)
  2051. Part81.RotVelocity = Vector3.new(1, 1, 1)
  2052. Part81.Velocity = Vector3.new(0.191293478, -0.998239517, 0.806946039)
  2053. Part81.FormFactor = Enum.FormFactor.Custom
  2054. Part81.Size = Vector3.new(0.200000003, 0.372999966, 0.675999641)
  2055. Part81.CFrame = CFrame.new(-189.282715, 4.39024353, -16.4184647, 0.500000238, 0.8022241, 0.326245129, 0.707106709, -0.160675704, -0.688609421, -0.499999642, 0.574995041, -0.647595942)
  2056. Part81.BottomSurface = Enum.SurfaceType.Smooth
  2057. Part81.TopSurface = Enum.SurfaceType.Smooth
  2058. Part81.Color = Color3.new(0, 1, 1)
  2059. Part81.Position = Vector3.new(-189.282715, 4.39024353, -16.4184647)
  2060. Part81.Orientation = Vector3.new(43.5200005, 153.259995, 102.799995)
  2061. Part81.Color = Color3.new(0, 1, 1)
  2062. BlockMesh82.Parent = Part81
  2063. BlockMesh82.Scale = Vector3.new(0.200000003, 1, 1)
  2064. BlockMesh82.Scale = Vector3.new(0.200000003, 1, 1)
  2065. PointLight83.Parent = Part81
  2066. PointLight83.Color = Color3.new(0.333333, 1, 1)
  2067. PointLight83.Brightness = 100
  2068. PointLight83.Range = 4
  2069. PointLight83.Color = Color3.new(0.333333, 1, 1)
  2070. Part84.Parent = Tool0
  2071. Part84.BrickColor = BrickColor.new("Dark stone grey")
  2072. Part84.Rotation = Vector3.new(-165.279999, -52.9899979, -33.8400002)
  2073. Part84.RotVelocity = Vector3.new(1, 1, 1)
  2074. Part84.Velocity = Vector3.new(0.354749918, -1.78728294, 1.43253303)
  2075. Part84.FormFactor = Enum.FormFactor.Custom
  2076. Part84.Size = Vector3.new(0.225999996, 0.699999869, 0.200000003)
  2077. Part84.CFrame = CFrame.new(-189.351776, 4.94676924, -15.6984825, 0.500000238, 0.335241288, -0.798506677, 0.707106709, -0.690371871, 0.152926177, -0.499999642, -0.6410923, -0.582237422)
  2078. Part84.BottomSurface = Enum.SurfaceType.Smooth
  2079. Part84.TopSurface = Enum.SurfaceType.Smooth
  2080. Part84.Color = Color3.new(0.388235, 0.372549, 0.384314)
  2081. Part84.Position = Vector3.new(-189.351776, 4.94676924, -15.6984825)
  2082. Part84.Orientation = Vector3.new(-8.80000019, -126.099998, 134.309998)
  2083. Part84.Color = Color3.new(0.388235, 0.372549, 0.384314)
  2084. BlockMesh85.Parent = Part84
  2085. BlockMesh85.Scale = Vector3.new(0.5, 1, 1)
  2086. BlockMesh85.Scale = Vector3.new(0.5, 1, 1)
  2087. Part86.Parent = Tool0
  2088. Part86.BrickColor = BrickColor.new("Toothpaste")
  2089. Part86.Transparency = 0.30000001192093
  2090. Part86.Rotation = Vector3.new(133.23999, 19.039999, -58.0699997)
  2091. Part86.RotVelocity = Vector3.new(1, 1, 1)
  2092. Part86.Velocity = Vector3.new(0.258111954, 0.316160202, -0.574272156)
  2093. Part86.FormFactor = Enum.FormFactor.Custom
  2094. Part86.Size = Vector3.new(0.200000003, 0.372999966, 0.675999641)
  2095. Part86.CFrame = CFrame.new(-188.830917, 3.46082282, -17.2810669, 0.500000238, 0.8022241, 0.326245129, 0.707106709, -0.160675704, -0.688609421, -0.499999642, 0.574995041, -0.647595942)
  2096. Part86.BottomSurface = Enum.SurfaceType.Smooth
  2097. Part86.TopSurface = Enum.SurfaceType.Smooth
  2098. Part86.Color = Color3.new(0, 1, 1)
  2099. Part86.Position = Vector3.new(-188.830917, 3.46082282, -17.2810669)
  2100. Part86.Orientation = Vector3.new(43.5200005, 153.259995, 102.799995)
  2101. Part86.Color = Color3.new(0, 1, 1)
  2102. BlockMesh87.Parent = Part86
  2103. BlockMesh87.Scale = Vector3.new(0.200000003, 1, 1)
  2104. BlockMesh87.Scale = Vector3.new(0.200000003, 1, 1)
  2105. PointLight88.Parent = Part86
  2106. PointLight88.Color = Color3.new(0.333333, 1, 1)
  2107. PointLight88.Brightness = 100
  2108. PointLight88.Range = 4
  2109. PointLight88.Color = Color3.new(0.333333, 1, 1)
  2110. Part89.Parent = Tool0
  2111. Part89.BrickColor = BrickColor.new("Dark stone grey")
  2112. Part89.Rotation = Vector3.new(107.279999, 46.4899979, -43.4300003)
  2113. Part89.RotVelocity = Vector3.new(1, 1, 1)
  2114. Part89.Velocity = Vector3.new(-0.0508677959, 0.625459671, -0.574591875)
  2115. Part89.FormFactor = Enum.FormFactor.Custom
  2116. Part89.Size = Vector3.new(0.225999996, 0.659999967, 0.350999951)
  2117. Part89.CFrame = CFrame.new(-189.049301, 3.24211931, -17.8087502, 0.500000238, 0.473350883, 0.725215793, 0.707106709, 0.260337144, -0.657437503, -0.499999642, 0.841524065, -0.204540908)
  2118. Part89.BottomSurface = Enum.SurfaceType.Smooth
  2119. Part89.TopSurface = Enum.SurfaceType.Smooth
  2120. Part89.Color = Color3.new(0.388235, 0.372549, 0.384314)
  2121. Part89.Position = Vector3.new(-189.049301, 3.24211931, -17.8087502)
  2122. Part89.Orientation = Vector3.new(41.0999985, 105.75, 69.7900009)
  2123. Part89.Color = Color3.new(0.388235, 0.372549, 0.384314)
  2124. BlockMesh90.Parent = Part89
  2125. BlockMesh90.Scale = Vector3.new(0.5, 1, 1)
  2126. BlockMesh90.Scale = Vector3.new(0.5, 1, 1)
  2127. Part91.Parent = Tool0
  2128. Part91.BrickColor = BrickColor.new("Dark stone grey")
  2129. Part91.Rotation = Vector3.new(149.479996, -8.14999962, -59.6599998)
  2130. Part91.RotVelocity = Vector3.new(1, 1, 1)
  2131. Part91.Velocity = Vector3.new(0.589183807, 0.821229935, -1.41041374)
  2132. Part91.FormFactor = Enum.FormFactor.Custom
  2133. Part91.Size = Vector3.new(0.225999996, 0.659999967, 0.350999951)
  2134. Part91.CFrame = CFrame.new(-188.351913, 3.10368514, -17.3071327, 0.500000238, 0.854347706, -0.141736925, 0.707106709, -0.49723503, -0.502749562, -0.499999642, 0.151151836, -0.852732718)
  2135. Part91.BottomSurface = Enum.SurfaceType.Smooth
  2136. Part91.TopSurface = Enum.SurfaceType.Smooth
  2137. Part91.Color = Color3.new(0.388235, 0.372549, 0.384314)
  2138. Part91.Position = Vector3.new(-188.351913, 3.10368514, -17.3071327)
  2139. Part91.Orientation = Vector3.new(30.1799984, -170.559998, 125.110001)
  2140. Part91.Color = Color3.new(0.388235, 0.372549, 0.384314)
  2141. BlockMesh92.Parent = Part91
  2142. BlockMesh92.Scale = Vector3.new(0.5, 1, 1)
  2143. BlockMesh92.Scale = Vector3.new(0.5, 1, 1)
  2144. Part93.Parent = Tool0
  2145. Part93.BrickColor = BrickColor.new("Bright red")
  2146. Part93.Rotation = Vector3.new(96.8399963, 52.1100006, -35.4899979)
  2147. Part93.RotVelocity = Vector3.new(1, 1, 1)
  2148. Part93.Velocity = Vector3.new(0.261021614, 0.882051468, -1.14307308)
  2149. Part93.FormFactor = Enum.FormFactor.Custom
  2150. Part93.Size = Vector3.new(0.291999996, 0.606999934, 0.602999926)
  2151. Part93.CFrame = CFrame.new(-188.659424, 3.06351542, -17.6754646, 0.500000238, 0.356555551, 0.789219379, 0.707106709, 0.358064115, -0.609745741, -0.499999642, 0.862935543, -0.073090829)
  2152. Part93.BottomSurface = Enum.SurfaceType.Smooth
  2153. Part93.TopSurface = Enum.SurfaceType.Smooth
  2154. Part93.Color = Color3.new(0.768628, 0.156863, 0.109804)
  2155. Part93.Position = Vector3.new(-188.659424, 3.06351542, -17.6754646)
  2156. Part93.Orientation = Vector3.new(37.5699997, 95.2900009, 63.1399994)
  2157. Part93.Color = Color3.new(0.768628, 0.156863, 0.109804)
  2158. Part94.Name = "Cylinder"
  2159. Part94.Parent = Tool0
  2160. Part94.BrickColor = BrickColor.new("Dusty Rose")
  2161. Part94.Rotation = Vector3.new(-165.279999, -52.9899979, -123.839996)
  2162. Part94.RotVelocity = Vector3.new(1, 1, 1)
  2163. Part94.Velocity = Vector3.new(0.261287451, 0.80811882, -1.06940627)
  2164. Part94.FormFactor = Enum.FormFactor.Custom
  2165. Part94.Size = Vector3.new(0.430000126, 0.310000002, 0.94599998)
  2166. Part94.CFrame = CFrame.new(-188.686478, 3.1101284, -17.6285858, -0.335241258, 0.500000238, -0.798506439, 0.690371871, 0.707106709, 0.152925968, 0.6410923, -0.499999642, -0.582237422)
  2167. Part94.BackSurface = Enum.SurfaceType.Weld
  2168. Part94.BottomSurface = Enum.SurfaceType.Weld
  2169. Part94.FrontSurface = Enum.SurfaceType.Weld
  2170. Part94.LeftSurface = Enum.SurfaceType.Weld
  2171. Part94.RightSurface = Enum.SurfaceType.Weld
  2172. Part94.TopSurface = Enum.SurfaceType.Weld
  2173. Part94.Color = Color3.new(0.639216, 0.294118, 0.294118)
  2174. Part94.Position = Vector3.new(-188.686478, 3.1101284, -17.6285858)
  2175. Part94.Orientation = Vector3.new(-8.80000019, -126.099998, 44.3099976)
  2176. Part94.Color = Color3.new(0.639216, 0.294118, 0.294118)
  2177. CylinderMesh95.Parent = Part94
  2178. CylinderMesh95.Scale = Vector3.new(1, 1, 0.400000006)
  2179. CylinderMesh95.Scale = Vector3.new(1, 1, 0.400000006)
  2180. Part96.Name = "Cylinder"
  2181. Part96.Parent = Tool0
  2182. Part96.BrickColor = BrickColor.new("Dusty Rose")
  2183. Part96.Rotation = Vector3.new(-165.279999, -52.9899979, -123.839996)
  2184. Part96.RotVelocity = Vector3.new(1, 1, 1)
  2185. Part96.Velocity = Vector3.new(-0.123081446, 0.968723297, -0.845641851)
  2186. Part96.FormFactor = Enum.FormFactor.Custom
  2187. Part96.Size = Vector3.new(0.430000126, 0.25, 0.399999976)
  2188. Part96.CFrame = CFrame.new(-189.016724, 3.00364685, -18.1194363, -0.335241258, 0.500000238, -0.798506439, 0.690371871, 0.707106709, 0.152925968, 0.6410923, -0.499999642, -0.582237422)
  2189. Part96.BackSurface = Enum.SurfaceType.Weld
  2190. Part96.BottomSurface = Enum.SurfaceType.Weld
  2191. Part96.FrontSurface = Enum.SurfaceType.Weld
  2192. Part96.LeftSurface = Enum.SurfaceType.Weld
  2193. Part96.RightSurface = Enum.SurfaceType.Weld
  2194. Part96.TopSurface = Enum.SurfaceType.Weld
  2195. Part96.Color = Color3.new(0.639216, 0.294118, 0.294118)
  2196. Part96.Position = Vector3.new(-189.016724, 3.00364685, -18.1194363)
  2197. Part96.Orientation = Vector3.new(-8.80000019, -126.099998, 44.3099976)
  2198. Part96.Color = Color3.new(0.639216, 0.294118, 0.294118)
  2199. CylinderMesh97.Parent = Part96
  2200. CylinderMesh97.Scale = Vector3.new(1, 1, 0.400000006)
  2201. CylinderMesh97.Scale = Vector3.new(1, 1, 0.400000006)
  2202. Part98.Parent = Tool0
  2203. Part98.BrickColor = BrickColor.new("Bright red")
  2204. Part98.Rotation = Vector3.new(120.639999, 35.2599983, -52.2399979)
  2205. Part98.RotVelocity = Vector3.new(1, 1, 1)
  2206. Part98.Velocity = Vector3.new(0.0314860344, 0.948602676, -0.980088711)
  2207. Part98.FormFactor = Enum.FormFactor.Custom
  2208. Part98.Size = Vector3.new(0.230000004, 0.659999967, 0.352999926)
  2209. Part98.CFrame = CFrame.new(-188.872299, 3.01362443, -17.9548912, 0.500000238, 0.645496249, 0.577350736, 0.707106709, 0.0806101933, -0.702496767, -0.499999642, 0.759497285, -0.416129529)
  2210. Part98.BottomSurface = Enum.SurfaceType.Smooth
  2211. Part98.TopSurface = Enum.SurfaceType.Smooth
  2212. Part98.Color = Color3.new(0.768628, 0.156863, 0.109804)
  2213. Part98.Position = Vector3.new(-188.872299, 3.01362443, -17.9548912)
  2214. Part98.Orientation = Vector3.new(44.6299973, 125.779999, 83.5)
  2215. Part98.Color = Color3.new(0.768628, 0.156863, 0.109804)
  2216. Part99.Parent = Tool0
  2217. Part99.BrickColor = BrickColor.new("Toothpaste")
  2218. Part99.Rotation = Vector3.new(132.87999, 19.5900002, -57.9499969)
  2219. Part99.RotVelocity = Vector3.new(1, 1, 1)
  2220. Part99.Velocity = Vector3.new(0.261772394, 0.852422714, -1.11419511)
  2221. Part99.FormFactor = Enum.FormFactor.Custom
  2222. Part99.Size = Vector3.new(0.314999998, 0.378000021, 0.240999937)
  2223. Part99.CFrame = CFrame.new(-188.674423, 3.07739401, -17.6608353, 0.500000238, 0.798506439, 0.335241258, 0.707106709, -0.152925968, -0.690371871, -0.499999642, 0.582237422, -0.6410923)
  2224. Part99.BottomSurface = Enum.SurfaceType.Smooth
  2225. Part99.TopSurface = Enum.SurfaceType.Smooth
  2226. Part99.Color = Color3.new(0, 1, 1)
  2227. Part99.Position = Vector3.new(-188.674423, 3.07739401, -17.6608353)
  2228. Part99.Orientation = Vector3.new(43.6599998, 152.389999, 102.199997)
  2229. Part99.Color = Color3.new(0, 1, 1)
  2230. BlockMesh100.Parent = Part99
  2231. BlockMesh100.Scale = Vector3.new(1, 1, 0.25)
  2232. BlockMesh100.Scale = Vector3.new(1, 1, 0.25)
  2233. Part101.Parent = Tool0
  2234. Part101.BrickColor = BrickColor.new("Black")
  2235. Part101.Rotation = Vector3.new(14.7199993, 52.9899979, 33.8400002)
  2236. Part101.RotVelocity = Vector3.new(1, 1, 1)
  2237. Part101.Velocity = Vector3.new(0.267904997, 1.00243568, -1.27034068)
  2238. Part101.FormFactor = Enum.FormFactor.Custom
  2239. Part101.Size = Vector3.new(0.296999991, 0.378000021, 0.240999937)
  2240. Part101.CFrame = CFrame.new(-188.620117, 2.97555447, -17.7565422, 0.500000238, -0.335241258, 0.798506439, 0.707106709, 0.690371871, -0.152925968, -0.499999642, 0.6410923, 0.582237422)
  2241. Part101.BottomSurface = Enum.SurfaceType.Smooth
  2242. Part101.TopSurface = Enum.SurfaceType.Smooth
  2243. Part101.Color = Color3.new(0.105882, 0.164706, 0.207843)
  2244. Part101.Position = Vector3.new(-188.620117, 2.97555447, -17.7565422)
  2245. Part101.Orientation = Vector3.new(8.80000019, 53.8999977, 45.6899986)
  2246. Part101.Color = Color3.new(0.105882, 0.164706, 0.207843)
  2247. BlockMesh102.Parent = Part101
  2248. BlockMesh102.Scale = Vector3.new(1, 1, 0.25)
  2249. BlockMesh102.Scale = Vector3.new(1, 1, 0.25)
  2250. Part103.Name = "Cylinder"
  2251. Part103.Parent = Tool0
  2252. Part103.BrickColor = BrickColor.new("Dusty Rose")
  2253. Part103.Rotation = Vector3.new(-165.279999, -52.9899979, -123.839996)
  2254. Part103.RotVelocity = Vector3.new(1, 1, 1)
  2255. Part103.Velocity = Vector3.new(0.264873743, 0.879386902, -1.14426064)
  2256. Part103.FormFactor = Enum.FormFactor.Custom
  2257. Part103.Size = Vector3.new(0.430000126, 0.310000002, 0.94599998)
  2258. Part103.CFrame = CFrame.new(-188.662018, 3.05973387, -17.6753941, -0.335241258, 0.500000238, -0.798506439, 0.690371871, 0.707106709, 0.152925968, 0.6410923, -0.499999642, -0.582237422)
  2259. Part103.BackSurface = Enum.SurfaceType.Weld
  2260. Part103.BottomSurface = Enum.SurfaceType.Weld
  2261. Part103.FrontSurface = Enum.SurfaceType.Weld
  2262. Part103.LeftSurface = Enum.SurfaceType.Weld
  2263. Part103.RightSurface = Enum.SurfaceType.Weld
  2264. Part103.TopSurface = Enum.SurfaceType.Weld
  2265. Part103.Color = Color3.new(0.639216, 0.294118, 0.294118)
  2266. Part103.Position = Vector3.new(-188.662018, 3.05973387, -17.6753941)
  2267. Part103.Orientation = Vector3.new(-8.80000019, -126.099998, 44.3099976)
  2268. Part103.Color = Color3.new(0.639216, 0.294118, 0.294118)
  2269. CylinderMesh104.Parent = Part103
  2270. CylinderMesh104.Scale = Vector3.new(1, 1, 0.400000006)
  2271. CylinderMesh104.Scale = Vector3.new(1, 1, 0.400000006)
  2272. Script105.Name = "Damage"
  2273. Script105.Parent = Tool0
  2274. table.insert(cors,sandbox(Script105,function()
  2275. local function Create(ty)
  2276. return function(data)
  2277. local obj = Instance.new(ty)
  2278. for k, v in pairs(data) do
  2279. if type(k) == 'number' then
  2280. v.Parent = obj
  2281. else
  2282. obj[k] = v
  2283. end
  2284. end
  2285. return obj
  2286. end
  2287. end
  2288.  
  2289. --------------------------------------------------------------------------------
  2290. --------------------------------------------------------------------------------
  2291. --------------------------------------------------------------------------------
  2292. --------------------------------------------------------------------------------
  2293.  
  2294. -- Tiny Event Manager; Add: [[Event.EventName = (event)]]; Remove: [[Disconnect("EventName",...)]]
  2295. local Event = {}
  2296. local function Disconnect(...)
  2297. for _,name in pairs{...} do
  2298. if Event[name] then
  2299. Event[name]:disconnect()
  2300. Event[name] = nil
  2301. end
  2302. end
  2303. end
  2304.  
  2305. -- get an object; make it if it doesn't exist
  2306. local function GetMake(parent,name,type)
  2307. local object = parent:FindFirstChild(name)
  2308. if not object then
  2309. object = Create(type){Name=name}
  2310. object.Parent = parent
  2311. end
  2312. return object
  2313. end
  2314.  
  2315. -- wait until child exists; return child
  2316. local function WaitForChild(parent,name)
  2317. while not parent:FindFirstChild(name) do
  2318. parent.ChildAdded:wait()
  2319. end
  2320. return parent:FindFirstChild(name)
  2321. end
  2322.  
  2323. -- get a sibling humanoid of object; by humanoid, not by name
  2324. local function GetHumanoid(object)
  2325. if object and object.Parent then
  2326. for i,v in pairs(object.Parent:GetChildren()) do
  2327. if v:IsA"Humanoid" then
  2328. return v
  2329. end
  2330. end
  2331. end
  2332. return nil
  2333. end
  2334.  
  2335. -- get the parent character from an object; verified by GetHumanoid
  2336. local function GetCharacter(object)
  2337. local humanoid = GetHumanoid(object)
  2338. if humanoid then
  2339. return object.Parent,humanoid
  2340. end
  2341. return nil
  2342. end
  2343.  
  2344. --------------------------------------------------------------------------------
  2345. --------------------------------------------------------------------------------
  2346. --------------------------------------------------------------------------------
  2347. --------------------------------------------------------------------------------
  2348.  
  2349. local Players = Game:GetService("Players")
  2350. local Debris = Game:GetService("Debris")
  2351.  
  2352. local Tool = script.Parent
  2353. local DamageBin = WaitForChild(Tool,"DamageBin")
  2354.  
  2355. Tool.Equipped:connect(function()
  2356. local Character,Humanoid = GetCharacter(Tool)
  2357. local Player = Players:GetPlayerFromCharacter(Character)
  2358.  
  2359. Event.DamageBin = DamageBin.ChildAdded:connect(function(dtag)
  2360. if dtag:IsA"ObjectValue" then
  2361. local humanoid = dtag.Value
  2362. local damage = tonumber(dtag.Name)
  2363. if humanoid and damage then
  2364. local ctag = Create'ObjectValue'{
  2365. Name = "creator";
  2366. Value = Player;
  2367. }
  2368. ctag.Parent = humanoid
  2369. humanoid:TakeDamage(damage)
  2370. Debris:AddItem(ctag,1)
  2371. Debris:AddItem(dtag,1)
  2372. end
  2373. end
  2374. end)
  2375. end)
  2376.  
  2377. Tool.Unequipped:connect(function()
  2378. Disconnect("DamageBin")
  2379. end)
  2380. end))
  2381. Configuration106.Name = "DamageBin"
  2382. Configuration106.Parent = Tool0
  2383. for i,v in pairs(mas:GetChildren()) do
  2384. v.Parent = game:GetService("Players").LocalPlayer.Character
  2385. pcall(function() v:MakeJoints() end)
  2386. end
  2387. mas:Destroy()
  2388. for i,v in pairs(cors) do
  2389. spawn(function()
  2390. pcall(v)
  2391. end)
  2392. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement