Advertisement
MysteriousL

Trtest

Jul 22nd, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 53.43 KB | None | 0 0
  1. local p = game.Players.LocalPlayer
  2. local char = p.Character
  3. local mouse = p:GetMouse()
  4. local larm = char["Left Arm"]
  5. local rarm = char["Right Arm"]
  6. local lleg = char["Left Leg"]
  7. local rleg = char["Right Leg"]
  8. local hed = char.Head
  9. local torso = char.Torso
  10. local hum = char.Humanoid
  11. local cam = game.Workspace.CurrentCamera
  12. local root = char.HumanoidRootPart
  13. local deb = false
  14. local shot = 0
  15. local debris=game:service"Debris"
  16. local l = game:GetService("Lighting")
  17. local rs = game:GetService("RunService").RenderStepped
  18. hum.MaxHealth = math.huge
  19. hum.Health = math.huge
  20. ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
  21. math.randomseed(os.time())
  22. for i,v in pairs (hed:GetChildren()) do
  23. if v:IsA("Sound") then
  24. v:Destroy()
  25. end
  26. end
  27.  
  28.  
  29. ----------------------------------------------------
  30. Debounces = {
  31. CanAttack = true;
  32. NoIdl = false;
  33. Slashing = false;
  34. Slashed = false;
  35. RPunch = false;
  36. RPunched = false;
  37. LPunch = false;
  38. LPunched = false;
  39. }
  40. local Touche = {char.Name, }
  41. ----------------------------------------------------
  42. hed.face.Texture = "rbxassetid://257837512"
  43. ----------------------------------------------------
  44. ypcall(function()
  45. char.Shirt:Destroy()
  46. char.Pants:Destroy()
  47. shirt = Instance.new("Shirt", char)
  48. shirt.Name = "Shirt"
  49. pants = Instance.new("Pants", char)
  50. pants.Name = "Pants"
  51. char.Shirt.ShirtTemplate = "rbxassetid://345371561"
  52. char.Pants.PantsTemplate = "rbxassetid://345372241"
  53. end)
  54. ----------------------------------------------------
  55. function lerp(a, b, t) -- Linear interpolation
  56. return a + (b - a)*t
  57. end
  58.  
  59. function slerp(a, b, t) --Spherical interpolation
  60. dot = a:Dot(b)
  61. if dot > 0.99999 or dot < -0.99999 then
  62. return t <= 0.5 and a or b
  63. else
  64. r = math.acos(dot)
  65. return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
  66. end
  67. end
  68.  
  69. function matrixInterpolate(a, b, t)
  70. local ax, ay, az, a00, a01, a02, a10, a11, a12, a20, a21, a22 = a:components()
  71. local bx, by, bz, b00, b01, b02, b10, b11, b12, b20, b21, b22 = b:components()
  72. local v0 = lerp(Vector3.new(ax, ay, az), Vector3.new(bx , by , bz), t) -- Position
  73. local v1 = slerp(Vector3.new(a00, a01, a02), Vector3.new(b00, b01, b02), t) -- Vector right
  74. local v2 = slerp(Vector3.new(a10, a11, a12), Vector3.new(b10, b11, b12), t) -- Vector up
  75. local v3 = slerp(Vector3.new(a20, a21, a22), Vector3.new(b20, b21, b22), t) -- Vector back
  76. local t = v1:Dot(v2)
  77. if not (t < 0 or t == 0 or t > 0) then -- Failsafe
  78. return CFrame.new()
  79. end
  80. return CFrame.new(
  81. v0.x, v0.y, v0.z,
  82. v1.x, v1.y, v1.z,
  83. v2.x, v2.y, v2.z,
  84. v3.x, v3.y, v3.z)
  85. end
  86.  
  87. function Lerp(c1,c2,al)
  88. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  89. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  90. for i,v in pairs(com1) do
  91. com1[i] = v+(com2[i]-v)*al
  92. end
  93. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  94. end
  95. function HasntTouched(plrname)
  96. local ret = true
  97. for _, v in pairs(Touche) do
  98. if v == plrname then
  99. ret = false
  100. end
  101. end
  102. return ret
  103. end
  104. lleg.Transparency = 0
  105. rleg.Transparency = 0
  106. larm.Transparency = 1
  107. rarm.Transparency = 1
  108. torso.Transparency = 0
  109. ----------------------------------------------------------------- Left Arm -----------------------------------------------------------------
  110. larm1 = Instance.new("Part", char)
  111. larm1.Name = "Middle"
  112. larm1.BrickColor = BrickColor.new("New Yeller")
  113. larm1.Size = Vector3.new(1, 2, 1)
  114. larm1.CanCollide = false
  115. larm1.BottomSurface = "Smooth"
  116. larm1.TopSurface = "Smooth"
  117. larm1.Material = "Neon"
  118. Weld = Instance.new("Weld",larm)
  119. Weld.Part0 = larm
  120. Weld.C0 = CFrame.new(1.50225258, 0.0474791527, -0.0102558136, -0.999930143, -0.0050761546, -0.0106693096, -0.00506608794, 0.999986708, -0.000970000518, 0.0106740929, -0.00091586099, -0.999942601)
  121. Weld.Part1 = larm1
  122. Weld.C1 = CFrame.new(1.50225258, 0.0474791527, -0.0102558136, -0.999930143, -0.0050761546, -0.0106693096, -0.00506608794, 0.999986708, -0.000970000518, 0.0106740929, -0.00091586099, -0.999942601)
  123.  
  124. larm2 = Instance.new("Part", char)
  125. larm2.BrickColor = BrickColor.new("Really black")
  126. larm2.Size = Vector3.new(1, 0.4, 1)
  127. larm2.CanCollide = false
  128. larm2.BottomSurface = "Smooth"
  129. larm2.TopSurface = "Smooth"
  130. Weld = Instance.new("Weld",larm)
  131. Weld.Part0 = larm
  132. Weld.C0 = CFrame.new(1.50225258, 0.0474791527, -0.0102558136, -0.999930143, -0.0050761546, -0.0106693096, -0.00506608794, 0.999986708, -0.000970000518, 0.0106740929, -0.00091586099, -0.999942601)
  133. Weld.Part1 = larm2
  134. Weld.C1 = CFrame.new(-0.452633858, -0.349740982, -1.50225353, -0.00506608887, 0.999986708, -0.00096991309, -0.0106740929, 0.000915773562, 0.999942601, 0.999930143, 0.0050761546, 0.0106693096)
  135.  
  136. larm3 = Instance.new("Part", char)
  137. larm3.BrickColor = BrickColor.new("Really black")
  138. larm3.Size = Vector3.new(1, 0.4, 1)
  139. larm3.CanCollide = false
  140. larm3.BottomSurface = "Smooth"
  141. larm3.TopSurface = "Smooth"
  142. Weld = Instance.new("Weld",larm)
  143. Weld.Part0 = larm
  144. Weld.C0 = CFrame.new(1.50225258, 0.0474791527, -0.0102558136, -0.999930143, -0.0050761546, -0.0106693096, -0.00506608794, 0.999986708, -0.000970000518, 0.0106740929, -0.00091586099, -0.999942601)
  145. Weld.Part1 = larm3
  146. Weld.C1 = CFrame.new(-0.452513218, -1.90224648, -0.0102577209, -0.00506604509, 0.999986708, -0.000969912624, 0.999930143, 0.00507611083, 0.0106693096, 0.0106740929, -0.000915773562, -0.999942601)
  147.  
  148. larm4 = Instance.new("Part", char)
  149. larm4.BrickColor = BrickColor.new("Really black")
  150. larm4.Size = Vector3.new(1, 0.4, 1)
  151. larm4.CanCollide = false
  152. larm4.BottomSurface = "Smooth"
  153. larm4.TopSurface = "Smooth"
  154. Weld = Instance.new("Weld",larm)
  155. Weld.Part0 = larm
  156. Weld.C0 = CFrame.new(1.50225258, 0.0474791527, -0.0102558136, -0.999930143, -0.0050761546, -0.0106693096, -0.00506608794, 0.999986708, -0.000970000518, 0.0106740929, -0.00091586099, -0.999942601)
  157. Weld.Part1 = larm4
  158. Weld.C1 = CFrame.new(-0.452511787, -0.41024971, 1.50225258, -0.00506623974, 0.999986708, -0.000969914719, 0.0106740929, -0.000915773562, -0.999942601, -0.999930143, -0.00507630548, -0.0106693096)
  159.  
  160. larm5 = Instance.new("Part", char)
  161. larm5.BrickColor = BrickColor.new("Really black")
  162. larm5.Size = Vector3.new(1, 0.4, 1)
  163. larm5.CanCollide = false
  164. larm5.BottomSurface = "Smooth"
  165. larm5.TopSurface = "Smooth"
  166. Weld = Instance.new("Weld",larm)
  167. Weld.Part0 = larm
  168. Weld.C0 = CFrame.new(1.50225258, 0.0474791527, -0.0102558136, -0.999930143, -0.0050761546, -0.0106693096, -0.00506608794, 0.999986708, -0.000970000518, 0.0106740929, -0.00091586099, -0.999942601)
  169. Weld.Part1 = larm5
  170. Weld.C1 = CFrame.new(-1.50225163, -0.762512684, 0.0102577209, 0.999930143, 0.0050761546, 0.0106693534, -0.00506608794, 0.999986708, -0.000970000518, -0.0106741367, 0.000915860757, 0.999942601)
  171.  
  172. larm6 = Instance.new("Part", char)
  173. larm6.BrickColor = BrickColor.new("Really black")
  174. larm6.Size = Vector3.new(1, 0.4, 1)
  175. larm6.CanCollide = false
  176. larm6.BottomSurface = "Smooth"
  177. larm6.TopSurface = "Smooth"
  178. Mesh = Instance.new("SpecialMesh", larm6)
  179. Mesh.MeshType = "Brick"
  180. Mesh.Scale = Vector3.new(1.1, 1.1, 1.1)
  181. Weld = Instance.new("Weld",larm)
  182. Weld.Part0 = larm
  183. Weld.C0 = CFrame.new(1.50225258, 0.0474791527, -0.0102558136, -0.999930143, -0.0050761546, -0.0106693096, -0.00506608794, 0.999986708, -0.000970000518, 0.0106740929, -0.00091586099, -0.999942601)
  184. Weld.Part1 = larm6
  185. Weld.C1 = CFrame.new(0.0102558136, 0.847481251, 1.50225353, -0.0106740929, 0.00091586099, 0.999942601, -0.00506608794, 0.999986708, -0.000970000518, -0.999930143, -0.0050761546, -0.0106693096)
  186.  
  187. larm7 = Instance.new("Part", char)
  188. larm7.BrickColor = BrickColor.new("New Yeller")
  189. larm7.Size = Vector3.new(0.5, 0.3, 2)
  190. larm7.CanCollide = false
  191. larm7.BottomSurface = "Smooth"
  192. larm7.TopSurface = "Smooth"
  193. larm7.Material = "Neon"
  194. mesh7 = Instance.new('SpecialMesh', larm7)
  195. mesh7.MeshId = "http://www.roblox.com/asset/?id=156292355"
  196. mesh7.Scale = Vector3.new(1, 8, 2)
  197. Weld = Instance.new("Weld",larm)
  198. Weld.Part0 = larm
  199. Weld.C0 = CFrame.new(1.50225258, 0.0474791527, -0.0102558136, -0.999930143, -0.0050761546, -0.0106693096, -0.00506608794, 0.999986708, -0.000970000518, 0.0106740929, -0.00091586099, -0.999942601)
  200. Weld.Part1 = larm7
  201. Weld.C1 = CFrame.new(-0.339956284, 1.83238316, 1.50933075, 0.11770986, 0.484406531, 0.866887927, -0.967169523, 0.253912479, -0.0105566857, -0.225227386, -0.837184966, 0.498391271)
  202.  
  203. larm8 = Instance.new("Part", char)
  204. larm8.BrickColor = BrickColor.new("Really black")
  205. larm8.Size = Vector3.new(1, 0.4, 1)
  206. larm8.CanCollide = false
  207. larm8.BottomSurface = "Smooth"
  208. larm8.TopSurface = "Smooth"
  209. Weld = Instance.new("Weld",larm)
  210. Weld.Part0 = larm
  211. Weld.C0 = CFrame.new(1.50225258, 0.0474791527, -0.0102558136, -0.999930143, -0.0050761546, -0.0106693096, -0.00506608794, 0.999986708, -0.000970000518, 0.0106740929, -0.00091586099, -0.999942601)
  212. Weld.Part1 = larm8
  213. Weld.C1 = CFrame.new(0.247514963, -0.0102424622, 1.58225441, -0.00506623974, 0.999986708, -0.000969914719, 0.0106740929, -0.000915773562, -0.999942601, -0.999930143, -0.00507630548, -0.0106693096)
  214. ----------------------------------------------------------------- Right Arm -----------------------------------------------------------------
  215. rarm1 = Instance.new("Part", char)
  216. rarm1.Name = "Middle"
  217. rarm1.BrickColor = BrickColor.new("New Yeller")
  218. rarm1.Size = Vector3.new(1, 2, 1)
  219. rarm1.CanCollide = false
  220. rarm1.BottomSurface = "Smooth"
  221. rarm1.TopSurface = "Smooth"
  222. rarm1.Material = "Neon"
  223. Weld = Instance.new("Weld",rarm)
  224. Weld.Part0 = rarm
  225. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  226. Weld.Part1 = rarm1
  227. Weld.C1 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  228.  
  229. rarm2 = Instance.new("Part", char)
  230. rarm2.BrickColor = BrickColor.new("Really black")
  231. rarm2.Size = Vector3.new(1, 0.4, 1)
  232. rarm2.CanCollide = false
  233. rarm2.BottomSurface = "Smooth"
  234. rarm2.TopSurface = "Smooth"
  235. Weld = Instance.new("Weld",rarm)
  236. Weld.Part0 = rarm
  237. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  238. Weld.Part1 = rarm2
  239. Weld.C1 = CFrame.new(-0.458259583, -0.356315613, 1.50168037, 0.00366159994, 0.999978125, -0.00550877256, 0.00621323148, 0.00548594771, 0.999965668, 0.999974012, -0.00369570963, -0.00619300362)
  240.  
  241. rarm3 = Instance.new("Part", char)
  242. rarm3.BrickColor = BrickColor.new("Really black")
  243. rarm3.Size = Vector3.new(1, 0.4, 1)
  244. rarm3.CanCollide = false
  245. rarm3.BottomSurface = "Smooth"
  246. rarm3.TopSurface = "Smooth"
  247. Weld = Instance.new("Weld",rarm)
  248. Weld.Part0 = rarm
  249. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  250. Weld.Part1 = rarm3
  251. Weld.C1 = CFrame.new(-1.50168133, -0.768137932, -0.00367927551, -0.999974012, 0.00369570986, 0.00619304739, 0.00366159948, 0.999978125, -0.00550886011, -0.00621327572, -0.00548603525, -0.999965668)
  252.  
  253. rarm4 = Instance.new("Part", char)
  254. rarm4.BrickColor = BrickColor.new("Really black")
  255. rarm4.Size = Vector3.new(1, 0.4, 1)
  256. rarm4.CanCollide = false
  257. rarm4.BottomSurface = "Smooth"
  258. rarm4.TopSurface = "Smooth"
  259. Weld = Instance.new("Weld",rarm)
  260. Weld.Part0 = rarm
  261. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  262. Weld.Part1 = rarm4
  263. Weld.C1 = CFrame.new(-0.00368309021, 1.8716774, 0.458146095, -0.00621323194, -0.00548603525, -0.999965668, 0.999974012, -0.0036957534, -0.00619300315, -0.00366164325, -0.999978125, 0.00550886057)
  264.  
  265. rarm5 = Instance.new("Part", char)
  266. rarm5.BrickColor = BrickColor.new("Really black")
  267. rarm5.Size = Vector3.new(1, 0.4, 1)
  268. rarm5.CanCollide = false
  269. rarm5.BottomSurface = "Smooth"
  270. rarm5.TopSurface = "Smooth"
  271. Mesh = Instance.new("SpecialMesh", rarm5)
  272. Mesh.MeshType = "Brick"
  273. Mesh.Scale = Vector3.new(1.1, 1.1, 1.1)
  274. Weld = Instance.new("Weld",rarm)
  275. Weld.Part0 = rarm
  276. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  277. Weld.Part1 = rarm5
  278. Weld.C1 = CFrame.new(0.00368118286, 0.841855764, -1.50168228, 0.00621323194, 0.00548603525, 0.999965668, 0.00366159948, 0.999978125, -0.00550886011, -0.999974012, 0.00369570963, 0.00619300362)
  279.  
  280. rarm6 = Instance.new("Part", char)
  281. rarm6.BrickColor = BrickColor.new("Really black")
  282. rarm6.Size = Vector3.new(1, 0.4, 1)
  283. rarm6.CanCollide = false
  284. rarm6.BottomSurface = "Smooth"
  285. rarm6.TopSurface = "Smooth"
  286. Weld = Instance.new("Weld",rarm)
  287. Weld.Part0 = rarm
  288. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  289. Weld.Part1 = rarm6
  290. Weld.C1 = CFrame.new(-1.50168133, -0.403675079, 0.458138466, -0.999974012, 0.00369575364, 0.00619304692, -0.00621327572, -0.00548603525, -0.999965668, -0.00366164325, -0.999978125, 0.00550886057)
  291.  
  292. rarm7 = Instance.new("Part", char)
  293. rarm7.BrickColor = BrickColor.new("New Yeller")
  294. rarm7.Size = Vector3.new(0.5, 0.3, 2)
  295. rarm7.CanCollide = false
  296. rarm7.BottomSurface = "Smooth"
  297. rarm7.TopSurface = "Smooth"
  298. mesh7 = Instance.new('SpecialMesh', rarm7)
  299. mesh7.MeshId = "http://www.roblox.com/asset/?id=156292355"
  300. mesh7.Scale = Vector3.new(1, 8, 2)
  301. Weld = Instance.new("Weld",rarm)
  302. Weld.Part0 = rarm
  303. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  304. Weld.Part1 = rarm7
  305. Weld.C1 = CFrame.new(0.344418526, -1.80139351, -1.50391006, 0.122256897, -0.48818168, -0.864136577, -0.966848493, -0.25524351, 0.00740774209, -0.224181563, 0.834583461, -0.503202915)
  306.  
  307. rarm8 = Instance.new("Part", char)
  308. rarm8.BrickColor = BrickColor.new("Really black")
  309. rarm8.Size = Vector3.new(1, 0.4, 1)
  310. rarm8.CanCollide = false
  311. rarm8.BottomSurface = "Smooth"
  312. rarm8.TopSurface = "Smooth"
  313. Weld = Instance.new("Weld",rarm)
  314. Weld.Part0 = rarm
  315. Weld.C0 = CFrame.new(-1.50168228, 0.0418539047, -0.00368309021, -0.999974012, 0.00369570963, 0.00619300362, 0.00366159948, 0.999978125, -0.00550886011, -0.00621323194, -0.00548603525, -0.999965668)
  316. Weld.Part1 = rarm8
  317. Weld.C1 = CFrame.new(0.241888285, -0.00366973877, -1.56167889, 0.00366144883, 0.999978125, -0.00550877163, -0.00621323148, -0.00548594771, -0.999965668, -0.999974012, 0.00369555852, 0.00619300455)
  318. rarm.Touched:connect(function(ht)
  319. hit = ht.Parent
  320. if ht and hit:IsA("Model") then
  321. if hit:FindFirstChild("Humanoid") then
  322. if hit.Name ~= p.Name then
  323. if Debounces.RPunch == true and Debounces.RPunched == false then
  324. Debounces.RPunched = true
  325. hit:FindFirstChild("Humanoid"):TakeDamage(math.random(5,8))
  326. if Debounces.ks==true then
  327. z = Instance.new("Sound",hed)
  328. z.SoundId = "rbxassetid://169380525"
  329. z.Pitch = ptz[math.random(1,#ptz)]
  330. z.Volume = 1
  331. z:Play()
  332. end
  333. wait(.2)
  334. Debounces.RPunched = false
  335. end
  336. end
  337. end
  338. elseif ht and hit:IsA("Hat") then
  339. if hit.Parent.Name ~= p.Name then
  340. if hit.Parent:FindFirstChild("Humanoid") then
  341. if Debounces.RPunch == true and Debounces.RPunched == false then
  342. Debounces.RPunched = true
  343. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(5,8))
  344. if Debounces.ks==true then
  345. z = Instance.new("Sound",hed)
  346. z.SoundId = "rbxassetid://169380525"
  347. z.Pitch = ptz[math.random(1,#ptz)]
  348. z.Volume = 1
  349. z:Play()
  350. end
  351. wait(.2)
  352. Debounces.RPunched = false
  353. end
  354. end
  355. end
  356. end
  357. end)
  358. larm.Touched:connect(function(ht)
  359. hit = ht.Parent
  360. if ht and hit:IsA("Model") then
  361. if hit:FindFirstChild("Humanoid") then
  362. if hit.Name ~= p.Name then
  363. if Debounces.LPunch == true and Debounces.LPunched == false then
  364. Debounces.LPunched = true
  365. hit:FindFirstChild("Humanoid"):TakeDamage(math.random(4,8))
  366. if Debounces.ks2==true then
  367. z = Instance.new("Sound",hed)
  368. z.SoundId = "rbxassetid://169380525"
  369. z.Pitch = ptz[math.random(1,#ptz)]
  370. z.Volume = 1
  371. z:Play()
  372. end
  373. wait(.2)
  374. Debounces.LPunched = false
  375. end
  376. end
  377. end
  378. elseif ht and hit:IsA("Hat") then
  379. if hit.Parent.Name ~= p.Name then
  380. if hit.Parent:FindFirstChild("Humanoid") then
  381. if Debounces.LPunch == true and Debounces.LPunched == false then
  382. Debounces.LPunched = true
  383. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(4,8))
  384. if Debounces.ks2==true then
  385. z = Instance.new("Sound",hed)
  386. z.SoundId = "rbxassetid://169380525"
  387. z.Pitch = ptz[math.random(1,#ptz)]
  388. z.Volume = 1
  389. z:Play()
  390. end
  391. wait(.2)
  392. Debounces.LPunched = false
  393. end
  394. end
  395. end
  396. end
  397. end)
  398. ----------------------------------------------------
  399. mod4 = Instance.new("Model",char)
  400.  
  401. ptez = {0.7, 0.8, 0.9, 1}
  402.  
  403. function FindNearestTorso(Position,Distance,SinglePlayer)
  404. if SinglePlayer then return(SinglePlayer.Torso.CFrame.p -Position).magnitude < Distance end
  405. local List = {}
  406. for i,v in pairs(workspace:GetChildren())do
  407. if v:IsA("Model")then
  408. if v:findFirstChild("Torso")then
  409. if v ~= char then
  410. if(v.Torso.Position -Position).magnitude <= Distance then
  411. table.insert(List,v)
  412. end
  413. end
  414. end
  415. end
  416. end
  417. return List
  418. end
  419.  
  420. function Punch()
  421. part=Instance.new('Part',mod4)
  422. part.Anchored=true
  423. part.CanCollide=false
  424. part.FormFactor='Custom'
  425. part.Size=Vector3.new(.2,.2,.2)
  426. part.CFrame=root.CFrame*CFrame.new(0,1.5,-2.4)*CFrame.Angles(math.rad(0),0,0)
  427. part.Transparency=.7
  428. part.BrickColor=BrickColor.new('Toothpaste')
  429. mesh=Instance.new('SpecialMesh',part)
  430. mesh.MeshId='http://www.roblox.com/asset/?id=3270017'
  431. mesh.Scale=Vector3.new(3,3,3)
  432. part2=Instance.new('Part',mod4)
  433. part2.Anchored=true
  434. part2.CanCollide=false
  435. part2.FormFactor='Custom'
  436. part2.Size=Vector3.new(.2,.2,.2)
  437. part2.CFrame=root.CFrame*CFrame.new(0,1.5,-2.4)*CFrame.Angles(math.rad(90),0,0)
  438. part2.Transparency=.7
  439. part2.BrickColor=BrickColor.new('Toothpaste')
  440. mesh2=Instance.new('SpecialMesh',part2)
  441. mesh2.MeshId='http://www.roblox.com/asset/?id=20329976'
  442. mesh2.Scale=Vector3.new(3,1.5,3)
  443. for i,v in pairs(FindNearestTorso(torso.CFrame.p,4))do
  444. if v:FindFirstChild('Humanoid') then
  445. v.Humanoid:TakeDamage(math.random(2,6))
  446. end
  447. end
  448. coroutine.resume(coroutine.create(function()
  449. for i=0,0.62,0.4 do
  450. wait()
  451. part.CFrame=part.CFrame
  452. part.Transparency=i
  453. mesh.Scale=mesh.Scale+Vector3.new(0.4,0.4,0.4)
  454. part2.CFrame=part2.CFrame
  455. part2.Transparency=i
  456. mesh2.Scale=mesh2.Scale+Vector3.new(0.4,0.2,0.4)
  457. end
  458. part.Parent=nil
  459. part2.Parent=nil
  460. end))
  461. end
  462. ----------------------------------------------------
  463. rarm.Touched:connect(function(ht)
  464. hit = ht.Parent
  465. if ht and hit:IsA("Model") then
  466. if hit:FindFirstChild("Humanoid") then
  467. if hit.Name ~= p.Name then
  468. if Debounces.RPunch == true and Debounces.RPunched == false then
  469. Debounces.RPunched = true
  470. hit:FindFirstChild("Humanoid"):TakeDamage(math.random(5,8))
  471. if Debounces.ks==true then
  472. z = Instance.new("Sound",hed)
  473. z.SoundId = "rbxassetid://169380525"
  474. z.Pitch = ptz[math.random(1,#ptz)]
  475. z.Volume = 1
  476. z:Play()
  477. end
  478. wait(.2)
  479. Debounces.RPunched = false
  480. end
  481. end
  482. end
  483. elseif ht and hit:IsA("Hat") then
  484. if hit.Parent.Name ~= p.Name then
  485. if hit.Parent:FindFirstChild("Humanoid") then
  486. if Debounces.RPunch == true and Debounces.RPunched == false then
  487. Debounces.RPunched = true
  488. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(5,8))
  489. if Debounces.ks==true then
  490. z = Instance.new("Sound",hed)
  491. z.SoundId = "rbxassetid://169380525"
  492. z.Pitch = ptz[math.random(1,#ptz)]
  493. z.Volume = 1
  494. z:Play()
  495. end
  496. wait(.2)
  497. Debounces.RPunched = false
  498. end
  499. end
  500. end
  501. end
  502. end)
  503. larm.Touched:connect(function(ht)
  504. hit = ht.Parent
  505. if ht and hit:IsA("Model") then
  506. if hit:FindFirstChild("Humanoid") then
  507. if hit.Name ~= p.Name then
  508. if Debounces.LPunch == true and Debounces.LPunched == false then
  509. Debounces.LPunched = true
  510. hit:FindFirstChild("Humanoid"):TakeDamage(math.random(4,8))
  511. if Debounces.ks2==true then
  512. z = Instance.new("Sound",hed)
  513. z.SoundId = "rbxassetid://169380525"
  514. z.Pitch = ptz[math.random(1,#ptz)]
  515. z.Volume = 1
  516. z:Play()
  517. end
  518. wait(.2)
  519. Debounces.LPunched = false
  520. end
  521. end
  522. end
  523. elseif ht and hit:IsA("Hat") then
  524. if hit.Parent.Name ~= p.Name then
  525. if hit.Parent:FindFirstChild("Humanoid") then
  526. if Debounces.LPunch == true and Debounces.LPunched == false then
  527. Debounces.LPunched = true
  528. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(4,8))
  529. if Debounces.ks2==true then
  530. z = Instance.new("Sound",hed)
  531. z.SoundId = "rbxassetid://169380525"
  532. z.Pitch = ptz[math.random(1,#ptz)]
  533. z.Volume = 1
  534. z:Play()
  535. end
  536. wait(.2)
  537. Debounces.LPunched = false
  538. end
  539. end
  540. end
  541. end
  542. end)
  543. ----------------------------------------------------
  544. local player = game.Players.LocalPlayer
  545. local pchar = player.Character
  546. local mouse = player:GetMouse()
  547. local cam = workspace.CurrentCamera
  548.  
  549. local rad = math.rad
  550.  
  551. local keysDown = {}
  552. local flySpeed = 0
  553. local MAX_FLY_SPEED = 150
  554.  
  555. local canFly = false
  556. local flyToggled = false
  557.  
  558. local forward, side = 0, 0
  559. local lastForward, lastSide = 0, 0
  560.  
  561. local floatBP = Instance.new("BodyPosition")
  562. floatBP.maxForce = Vector3.new(0, math.huge, 0)
  563. local flyBV = Instance.new("BodyVelocity")
  564. flyBV.maxForce = Vector3.new(9e9, 9e9, 9e9)
  565. local turnBG = Instance.new("BodyGyro")
  566. turnBG.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  567.  
  568. mouse.KeyDown:connect(function(key)
  569. keysDown[key] = true
  570.  
  571. if key == "f" then
  572. flyToggled = not flyToggled
  573.  
  574. if not flyToggled then
  575. stanceToggle = "Normal"
  576. floatBP.Parent = nil
  577. flyBV.Parent = nil
  578. turnBG.Parent = nil
  579. root.Velocity = Vector3.new()
  580. pchar.Humanoid.PlatformStand = false
  581. end
  582. end
  583.  
  584. end)
  585. mouse.KeyUp:connect(function(key)
  586. keysDown[key] = nil
  587. end)
  588.  
  589. local function updateFly()
  590.  
  591. if not flyToggled then return end
  592.  
  593. lastForward = forward
  594. lastSide = side
  595.  
  596. forward = 0
  597. side = 0
  598.  
  599. if keysDown.w then
  600. forward = forward + 1
  601. end
  602. if keysDown.s then
  603. forward = forward - 1
  604. end
  605. if keysDown.a then
  606. side = side - 1
  607. end
  608. if keysDown.d then
  609. side = side + 1
  610. end
  611.  
  612. canFly = (forward ~= 0 or side ~= 0)
  613.  
  614. if canFly then
  615. stanceToggle = "Floating"
  616. turnBG.Parent = root
  617. floatBP.Parent = nil
  618. flyBV.Parent = root
  619.  
  620. flySpeed = flySpeed + 1 + (flySpeed / MAX_FLY_SPEED)
  621. if flySpeed > MAX_FLY_SPEED then flySpeed = MAX_FLY_SPEED end
  622. else
  623. floatBP.position = root.Position
  624. floatBP.Parent = root
  625.  
  626. flySpeed = flySpeed - 1
  627. if flySpeed < 0 then flySpeed = 0 end
  628. end
  629.  
  630. local camCF = cam.CoordinateFrame
  631. local in_forward = canFly and forward or lastForward
  632. local in_side = canFly and side or lastSide
  633.  
  634. flyBV.velocity = ((camCF.lookVector * in_forward) + (camCF * CFrame.new(in_side,
  635. in_forward * 0.2, 0).p) - camCF.p) * flySpeed
  636.  
  637. turnBG.cframe = camCF * CFrame.Angles(-rad(forward * (flySpeed / MAX_FLY_SPEED)), 0, 0)
  638. end
  639.  
  640. game:service'RunService'.RenderStepped:connect(function()
  641. if flyToggled then
  642. pchar.Humanoid.PlatformStand = true
  643. end
  644. updateFly()
  645. end)
  646. -------------------------------
  647. mouse.KeyDown:connect(function(key)
  648. if key == "q" then
  649. if Debounces.CanAttack == true then
  650. Debounces.CanAttack = false
  651. Debounces.NoIdl = true
  652. Debounces.on = true
  653. function FindNearestTorso(Position,Distance,SinglePlayer)
  654. if SinglePlayer then return(SinglePlayer.Torso.CFrame.p -Position).magnitude < Distance end
  655. local List = {}
  656. for i,v in pairs(workspace:GetChildren())do
  657. if v:IsA("Model")then
  658. if v:findFirstChild("Torso")then
  659. if v ~= char then
  660. if(v.Torso.Position -Position).magnitude <= Distance then
  661. table.insert(List,v)
  662. end
  663. end
  664. end
  665. end
  666. end
  667. return List
  668. end
  669. z = Instance.new("Sound",hed)
  670. z.SoundId = "rbxassetid://232213955"
  671. z.Pitch = 1
  672. z.Volume = 1
  673. wait(0.2)
  674. z:Play()
  675. sp = Instance.new("Part",rarm)
  676. sp.Anchored = true
  677. sp.CanCollide = false
  678. sp.Locked = true
  679. sp.Transparency = 0
  680. sp.Material = "Neon"
  681. sp.Size = Vector3.new(1,1,1)
  682. sp.TopSurface = "SmoothNoOutlines"
  683. sp.BottomSurface = "SmoothNoOutlines"
  684. sp.BrickColor = BrickColor.new("Toothpaste")
  685. spm = Instance.new("SpecialMesh",sp)
  686. spm.MeshId = "http://www.roblox.com/asset/?id=9756362"
  687. spm.Scale = Vector3.new(21,21,21)
  688. sp2 = Instance.new("Part", rarm)
  689. sp2.Name = "Energy"
  690. sp2.BrickColor = BrickColor.new("Toothpaste")
  691. sp2.Size = Vector3.new(1, 1, 1)
  692. sp2.Shape = "Ball"
  693. sp2.CanCollide = false
  694. sp2.Anchored = true
  695. sp2.Locked = true
  696. sp2.TopSurface = 0
  697. sp2.BottomSurface = 0
  698. sp2.Transparency = 1
  699. spm2 = Instance.new("SpecialMesh",sp2)
  700. spm2.MeshId = "rbxassetid://9756362"
  701. spm2.Scale = Vector3.new(2,2,2)
  702. for i = 1, 20 do
  703. spm.Scale = spm.Scale - Vector3.new(1,1,1)
  704. sp.CFrame = root.CFrame*CFrame.new(0,1,-2)
  705. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.62,0)*CFrame.Angles(math.rad(-6),math.rad(-6),math.rad(8)), 0.4)
  706. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.62,0)*CFrame.Angles(math.rad(-6),math.rad(6),math.rad(-8)), 0.4)
  707. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.2)*CFrame.Angles(math.rad(-14),math.rad(0),0), 0.4)
  708. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(0, math.rad(0), math.rad(0)), 0.4)
  709. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(0, 0, math.rad(-8)), 0.4)
  710. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(0, 0, math.rad(8)), 0.4)
  711. if Debounces.on == false then break end
  712. rs:wait()
  713. end
  714. for i = 1, 100, 20 do rs:wait()
  715. sp.CFrame = root.CFrame*CFrame.new(0,1,-2)
  716. end
  717. for i = 1, 20 do
  718. sp.CFrame = root.CFrame*CFrame.new(0,1,-2)
  719. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.62,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(8)), 0.4)
  720. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.62,.2)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(-40)), 0.4)
  721. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.2)*CFrame.Angles(math.rad(10),math.rad(-30),0), 0.4)
  722. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(0, math.rad(40), math.rad(0)), 0.4)
  723. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(0, 0, math.rad(-8)), 0.4)
  724. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(0, 0, math.rad(8)), 0.4)
  725. if Debounces.on == false then break end
  726. rs:wait()
  727. end
  728. sp.Transparency = 1
  729. for i = 1, 20 do
  730. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.62,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(8)), 0.4)
  731. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.2,0.62,-.2)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(40)), 0.4)
  732. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.2)*CFrame.Angles(math.rad(-14),math.rad(50),0), 0.4)
  733. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(0, math.rad(-50), math.rad(0)), 0.4)
  734. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(0, 0, math.rad(-8)), 0.4)
  735. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(0, 0, math.rad(8)), 0.4)
  736. if Debounces.on == false then break end
  737. rs:wait()
  738. end
  739. wait(1)
  740. sp.Transparency = 0
  741. sp2.Transparency = 0.84
  742. for i = 1, 20 do
  743. --spm.Scale = spm.Scale - Vector3.new(1,1,1)
  744. sp.CFrame = rarm.CFrame*CFrame.new(0,-1,0)
  745. sp2.CFrame = sp.CFrame * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-i), math.rad(-i), math.rad(i))
  746. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,0)*CFrame.Angles(math.rad(110),math.rad(-6),math.rad(140)), 0.4)
  747. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,0)*CFrame.Angles(math.rad(80),math.rad(6),math.rad(-40)), 0.2)
  748. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.2)*CFrame.Angles(math.rad(0),math.rad(30),0), 0.2)
  749. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-30), math.rad(0)), 0.3)
  750. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(20), 0, math.rad(-14)), 0.2)
  751. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(-16), 0, math.rad(8)), 0.2)
  752. if Debounces.on == false then break end
  753. rs:wait()
  754. end
  755. for i = 1, 2880, 50 do
  756. rs:wait()
  757. sp.CFrame = rarm.CFrame*CFrame.new(0,-1,0)
  758. sp2.CFrame = rarm.CFrame * CFrame.new(0,-1,0) * CFrame.Angles(math.rad(-i/10), math.rad(-i/10), math.rad(i/10))
  759. rs:wait()
  760. end
  761. sp:Destroy()
  762. sp2:Destroy()
  763. local X = Instance.new("Part",char)
  764. local O = Instance.new("ObjectValue",X)
  765. O.Name = "creator"
  766. X.Locked = true
  767. X.Name = "Shell"
  768. X.Anchored = false
  769. X.CanCollide = false
  770. X.Transparency = 0
  771. X.Reflectance = 0
  772. X.BottomSurface = 0
  773. X.TopSurface = 0
  774. X.Shape = 0
  775. local V = Instance.new("ObjectValue",X)
  776. V.Value = char
  777. V.Name = "creator"
  778. X.BrickColor = BrickColor.new("Toothpaste")
  779. X.Size = Vector3.new(2,2,2)
  780. X.Material = "Neon"
  781. local Z = Instance.new("SpecialMesh",X)
  782. Z.MeshId = "http://www.roblox.com/asset/?id=9982590"
  783. Z.Scale = Vector3.new(0.5,0.5,1)
  784. X.CFrame = rarm.CFrame*CFrame.new(-3,0,0)
  785. local bv = Instance.new("BodyVelocity",X)
  786. bv.maxForce = Vector3.new(99999,99999,99999)
  787. X.CFrame = CFrame.new(X.Position,mouse.Hit.p)
  788. bv.velocity = X.CFrame.lookVector*500
  789.  
  790. Explode = X.Touched:connect(function(hit)
  791. if hit ~= char and hit.Name ~= "Shell" then
  792. local cf = X.CFrame
  793. bv:Destroy()
  794. X.Anchored = true
  795. Z:Remove()
  796. Explode:disconnect()
  797. X.Size = Vector3.new(3,3,3)
  798. X.Touched:connect(function(hit) end)
  799. X.CanCollide = false
  800. local part3 = Instance.new("Part", rarm)
  801. part3.Anchored=true
  802. part3.CanCollide=false
  803. part3.Locked = true
  804. part3.TopSurface = "SmoothNoOutlines"
  805. part3.BottomSurface = "SmoothNoOutlines"
  806. part3.FormFactor='Custom'
  807. part3.Size=Vector3.new(1,1, 1)
  808. part3.CFrame=X.CFrame
  809. part3.Transparency=0
  810. part3.BrickColor=BrickColor.new("Toothpaste")
  811. local mesh3 = Instance.new("SpecialMesh",part3)
  812. mesh3.MeshId = "http://www.roblox.com/asset/?id=9756362"
  813. mesh3.Scale = Vector3.new(1,1,1)
  814. --debris:AddItem(X,8)
  815. local part4 = Instance.new("Part", rarm)
  816. part4.Material = "Neon"
  817. part4.Anchored=true
  818. part4.CanCollide=false
  819. part4.Locked = true
  820. part4.TopSurface = "SmoothNoOutlines"
  821. part4.BottomSurface = "SmoothNoOutlines"
  822. part4.FormFactor='Custom'
  823. part4.Size=Vector3.new(1,1, 1)
  824. part4.CFrame=X.CFrame
  825. part4.Transparency=0
  826. part4.BrickColor=BrickColor.new("Hot pink")
  827. local mesh4 = Instance.new("SpecialMesh",part4)
  828. mesh4.MeshId = "http://www.roblox.com/asset/?id=9756362"
  829. mesh4.Scale = Vector3.new(.5,.5,.5)
  830. local part7 = Instance.new("Part", rarm)
  831. part7.Material = "Neon"
  832. part7.Anchored=true
  833. part7.CanCollide=false
  834. part7.Locked = true
  835. part7.TopSurface = "SmoothNoOutlines"
  836. part7.BottomSurface = "SmoothNoOutlines"
  837. part7.FormFactor='Custom'
  838. part7.Size=Vector3.new(1,1, 1)
  839. part7.CFrame=X.CFrame
  840. part7.Transparency=0
  841. part7.BrickColor=BrickColor.new("Really black")
  842. local mesh7 = Instance.new("SpecialMesh",part7)
  843. mesh7.MeshId = "http://www.roblox.com/asset/?id=9756362"
  844. mesh7.Scale = Vector3.new(0.1, 0.1, 0.1)
  845. --[[X.Touched:connect(function(ht)
  846. hit = ht.Parent
  847. if ht and hit:IsA("Model") then
  848. if hit:FindFirstChild("Humanoid") then
  849. if hit.Name ~= p.Name then
  850. hit:FindFirstChild("Humanoid"):TakeDamage(math.random(4,6))
  851. wait(.3)
  852. end
  853. end
  854. elseif ht and hit:IsA("Hat") then
  855. if hit.Parent.Name ~= p.Name then
  856. if hit.Parent:FindFirstChild("Humanoid") then
  857. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(4,6))
  858. wait(.3)
  859. end
  860. end
  861. end
  862. end)
  863. part3.Touched:connect(function(ht)
  864. hit = ht.Parent
  865. if ht and hit:IsA("Model") then
  866. if hit:FindFirstChild("Humanoid") then
  867. if hit.Name ~= p.Name then
  868. hit:FindFirstChild("Humanoid"):TakeDamage(math.random(4,6))
  869. wait(.3)
  870. end
  871. end
  872. elseif ht and hit:IsA("Hat") then
  873. if hit.Parent.Name ~= p.Name then
  874. if hit.Parent:FindFirstChild("Humanoid") then
  875. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(4,6))
  876. wait(.3)
  877. end
  878. end
  879. end
  880. end)]]--
  881. for i,v in pairs(FindNearestTorso(X.CFrame.p,140))do
  882. if v:FindFirstChild('Humanoid') then
  883. v.Humanoid:TakeDamage(math.random(60,90))
  884. v.Humanoid.PlatformStand = true
  885. v:FindFirstChild("Torso").Velocity = hed.CFrame.lookVector * 100
  886. end
  887. end
  888.  
  889. local acos = math.acos
  890. local sqrt = math.sqrt
  891. local Vec3 = Vector3.new
  892. local fromAxisAngle = CFrame.fromAxisAngle
  893.  
  894. local function toAxisAngle(CFr)
  895. local X,Y,Z,R00,R01,R02,R10,R11,R12,R20,R21,R22 = CFr:components()
  896. local Angle = math.acos((R00+R11+R22-1)/2)
  897. local A = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  898. A = A == 0 and 0.00001 or A
  899. local B = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  900. B = B == 0 and 0.00001 or B
  901. local C = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  902. C = C == 0 and 0.00001 or C
  903. local x = (R21-R12)/sqrt(A)
  904. local y = (R02-R20)/sqrt(B)
  905. local z = (R10-R01)/sqrt(C)
  906. return Vec3(x,y,z),Angle
  907. end
  908.  
  909. function ApplyTrig(Num,Func)
  910. local Min,Max = Func(0),Func(1)
  911. local i = Func(Num)
  912. return (i-Min)/(Max-Min)
  913. end
  914.  
  915. function LerpCFrame(CFrame1,CFrame2,Num)
  916. local Vec,Ang = toAxisAngle(CFrame1:inverse()*CFrame2)
  917. return CFrame1*fromAxisAngle(Vec,Ang*Num) + (CFrame2.p-CFrame1.p)*Num
  918. end
  919.  
  920. function Crater(Torso,Radius)
  921. Spawn(function()
  922. local Ray = Ray.new(Torso.Position,Vector3.new(0,-1,0)*10)
  923. local Ignore = {}
  924. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  925. if v.Character ~= nil then
  926. Ignore[#Ignore+1] = v.Character
  927. end
  928. end
  929. local Hit,Pos,SurfaceNorm = Workspace:FindPartOnRayWithIgnoreList(Ray,Ignore)
  930. if Hit == nil then return end
  931. local Parts = {}
  932. for i = 1,360,10 do
  933. local P = Instance.new("Part",Torso.Parent)
  934. P.Anchored = true
  935. P.FormFactor = "Custom"
  936. P.BrickColor = Hit.BrickColor
  937. P.Material = Hit.Material
  938. P.TopSurface = "Smooth"
  939. P.BottomSurface = "Smooth"
  940. P.Size = Vector3.new(5,10,10)*(math.random(80,100)/100)
  941. P.CFrame = ((CFrame.new(Pos,Pos+SurfaceNorm)*CFrame.Angles(math.rad(90),0,0))-Vector3.new(0,7,0))*CFrame.Angles(math.rad(math.random(-50,50)),math.rad(math.random(-50,50)),math.rad(math.random(-50,50)))
  942. Parts[#Parts+1] = {P,P.CFrame,((CFrame.new(Pos,Pos+SurfaceNorm)*CFrame.Angles(math.rad(90),0,0))-Vector3.new(0,1,0))*CFrame.Angles(0,math.rad(i),0)*CFrame.new(0,0,-Radius)*CFrame.Angles(math.rad(math.random(-50,-20)),math.rad(math.random(-15,15)),math.rad(math.random(-15,15))),P.Size}
  943. if math.random(0,5) == 0 then -- rubble
  944. local P = Instance.new("Part",Torso.Parent)
  945. P.Anchored = true
  946. P.FormFactor = "Custom"
  947. P.BrickColor = Hit.BrickColor
  948. P.Material = Hit.Material
  949. P.TopSurface = "Smooth"
  950. P.BottomSurface = "Smooth"
  951. P.Size = Vector3.new(2,2,2)*(math.random(80,100)/100)
  952. P.CFrame = ((CFrame.new(Pos,Pos+SurfaceNorm)*CFrame.Angles(math.rad(90),0,0))-Vector3.new(0,2.5,0))*CFrame.Angles(math.rad(math.random(-50,50)),math.rad(math.random(-50,50)),math.rad(math.random(-50,50)))
  953. Parts[#Parts+1] = {P,P.CFrame,(CFrame.new(Pos,Pos+SurfaceNorm)*CFrame.Angles(math.rad(90),0,0))*CFrame.Angles(0,math.rad(i),0)*CFrame.new(0,0,-Radius-8)*CFrame.Angles(math.rad(math.random(-90,90)),math.rad(math.random(-90,90)),math.rad(math.random(-90,90))),P.Size}
  954. end
  955. end
  956. for i = 0,1,0.05 do
  957. for i2,v in pairs(Parts) do
  958. v[1].CFrame = LerpCFrame(v[2],v[3],ApplyTrig(i,math.cos))
  959. end
  960. wait(0.02)
  961. end
  962. for i,v in pairs(Parts) do
  963. if v[1].Size.X > 2.1 then
  964. v[1].CFrame = v[1].CFrame+Vector3.new(0,2,0)
  965. end
  966. v[1].Anchored = false
  967. end
  968. for i = 0,1,0.05 do
  969. for i2,v in pairs(Parts) do
  970. v[1].Transparency = i
  971. if i == 1 then
  972. v[1]:Destroy()
  973. elseif i >= 0.25 then
  974. v[1].CanCollide = false
  975. end
  976. end
  977. wait(0.02)
  978. end
  979. Parts = nil
  980. end)
  981. end
  982.  
  983. ROW = function(out, trans, s, wt, t, ang, plus)
  984. for i = 1, 360, 360/t do
  985. local c = Instance.new("Part", game.Workspace)
  986. c.FormFactor = 3
  987. c.TopSurface = 0
  988. c.BottomSurface = 0
  989. c.Size = s
  990. c.Anchored = true
  991. c.CanCollide = wt
  992. c.Material=workspace.Base.Material
  993. c.Transparency = trans
  994. c.BrickColor = workspace.Base.BrickColor
  995. c.CFrame = CFrame.new(X.CFrame.x,0,X.CFrame.z) * CFrame.Angles(0, math.rad(i + plus), 0) * CFrame.new(0, 0, out) * ang
  996. c.Locked=true
  997. game.Debris:AddItem(c,15)
  998. end
  999. end
  1000.  
  1001. Part = function(x,y,z,color,tr,cc,an,parent)
  1002. local p = Instance.new('Part',parent or Weapon)
  1003. p.formFactor = 'Custom'
  1004. p.Size = Vector3.new(x,y,z)
  1005. p.BrickColor = BrickColor.new(color)
  1006. p.CanCollide = cc
  1007. p.Transparency = tr
  1008. p.Anchored = an
  1009. p.TopSurface,p.BottomSurface = 0,0
  1010. p.Locked=true
  1011. p:BreakJoints()
  1012. return p end
  1013.  
  1014. Mesh = function(par,num,x,y,z)
  1015. local msh = _
  1016. if num == 1 then msh = Instance.new("CylinderMesh",par)
  1017. elseif num == 2 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 3
  1018. elseif num == 3 then msh = Instance.new("BlockMesh",par)
  1019. elseif num == 4 then msh = Instance.new("SpecialMesh",par) msh.MeshType = "Torso"
  1020. elseif type(num) == 'string' then msh = Instance.new("SpecialMesh",par) msh.MeshId = num
  1021. end msh.Scale = Vector3.new(x,y,z)
  1022. return msh end
  1023.  
  1024. function explosion(col1,col2,cfr,sz,rng,dmg)
  1025. local a= Part(1,1,1,col1,.5,false,true,workspace)
  1026. local a2= Part(1,1,1,col2,.5,false,true,workspace)
  1027. local a3= Part(1,1,1,col2,.5,false,true,workspace)
  1028. v1,v2,v3=sz.x,sz.y,sz.z
  1029. local m= Mesh(a,'http://www.roblox.com/asset/?id=1185246',v1,v2,v3)
  1030. local m2= Mesh(a2,3,v1/3,v2/3,v3/3)
  1031. local m3= Mesh(a3,3,v1/3,v2/3,v3/3)
  1032. a.CFrame=cfr
  1033. a2.CFrame=cfr*CFrame.Angles(math.random(),math.random(),math.random())
  1034. a3.CFrame=cfr*CFrame.Angles(math.random(),math.random(),math.random())
  1035.  
  1036. Spawn(function()
  1037. while wait() do
  1038. if a.Transparency >= 1 then a:Destroy() a2:Destroy() a3:Destroy() break end
  1039. m.Scale=m.Scale+Vector3.new(.1,0.1,0.1)
  1040. m2.Scale=m2.Scale+Vector3.new(.1,0.1,0.1)
  1041. m3.Scale=m3.Scale+Vector3.new(.1,0.1,0.1)
  1042. a.Transparency=a.Transparency+0.05
  1043. a2.Transparency=a2.Transparency+0.05
  1044. a3.Transparency=a3.Transparency+0.05
  1045. end
  1046. end)
  1047. end
  1048.  
  1049. Crater(X,20)
  1050. ROW(12, 0, Vector3.new(34.5, 30, 3), true, 8, CFrame.Angles(math.rad(math.random (30,60)), 0, math.rad (math.random(-30,30))), 0)
  1051. z = Instance.new("Sound",X)
  1052. z.SoundId = "rbxassetid://231917744"
  1053. z.Pitch = .5
  1054. z.Volume = 10
  1055. z1 = Instance.new("Sound",X)
  1056. z1.SoundId = "rbxassetid://231917744"
  1057. z1.Pitch = .5
  1058. z1.Volume = 10
  1059. z2 = Instance.new("Sound",X)
  1060. z2.SoundId = "rbxassetid://231917744"
  1061. z2.Pitch = .5
  1062. z2.Volume = 10
  1063. z3 = Instance.new("Sound",X)
  1064. z3.SoundId = "rbxassetid://245537790"
  1065. z3.Pitch = .7
  1066. z3.Volume = 1
  1067. z4 = Instance.new("Sound",X)
  1068. z4.SoundId = "rbxassetid://245537790"
  1069. z4.Pitch = .7
  1070. z4.Volume = 1
  1071. wait(0.1)
  1072. z:Play()
  1073. z1:Play()
  1074. z2:Play()
  1075. z3:Play()
  1076. z4:Play()
  1077.  
  1078. local part=Instance.new('Part',rarm)
  1079. part.Anchored=true
  1080. part.CanCollide=false
  1081. part.Locked = true
  1082. part.FormFactor='Custom'
  1083. part.Size=Vector3.new(1,1,1)
  1084. part.CFrame=X.CFrame*CFrame.new(0,0,0)
  1085. part.Transparency=0
  1086. part.BrickColor=BrickColor.new('Really black')
  1087. local mesh=Instance.new('SpecialMesh',part)
  1088. mesh.MeshId='http://www.roblox.com/asset/?id=20329976'
  1089. mesh.Scale=Vector3.new(2,2,2)
  1090. local part2=part:clone()
  1091. part2.Parent = rarm
  1092. part2.BrickColor=BrickColor.new("Toothpaste")
  1093. local part5=part:clone()
  1094. part5.Parent = rarm
  1095. part5.BrickColor=BrickColor.new("Toothpaste")
  1096. local part6=part:clone()
  1097. part6.Parent = rarm
  1098. part6.BrickColor=BrickColor.new("Black")
  1099. local mesh2=mesh:clone()
  1100. mesh2.Parent=part2
  1101. mesh2.Scale=Vector3.new(3, 3, 3)
  1102. local mesh5=mesh:clone()
  1103. mesh5.Parent=part5
  1104. mesh5.Scale=Vector3.new(3, 3, 3)
  1105. local mesh6=mesh:clone()
  1106. mesh6.Parent=part6
  1107. mesh6.Scale=Vector3.new(3, 3, 3)
  1108. local blast = Instance.new("Part", rarm)
  1109. blast.BrickColor = BrickColor.new("Really black")
  1110. blast.Anchored = true
  1111. blast.CanCollide = false
  1112. blast.Locked = true
  1113. blast.Size = Vector3.new(1, 1, 1)
  1114. blast.TopSurface = "Smooth"
  1115. blast.BottomSurface = "Smooth"
  1116. blast.Transparency = 0
  1117. blast.CFrame = HandCF
  1118. local bm = Instance.new("SpecialMesh", blast)
  1119. bm.Scale = Vector3.new(5,1,5)
  1120. bm.MeshId = "rbxassetid://156292343"
  1121. local blast2 = Instance.new("Part", rarm)
  1122. blast2.BrickColor = BrickColor.new("Really black")
  1123. blast2.Anchored = true
  1124. blast2.CanCollide = false
  1125. blast2.Locked = true
  1126. blast2.Size = Vector3.new(1, 1, 1)
  1127. blast2.TopSurface = "Smooth"
  1128. blast2.BottomSurface = "Smooth"
  1129. blast2.Transparency = 0
  1130. blast2.CFrame = HandCF
  1131. local bm2 = Instance.new("SpecialMesh", blast2)
  1132. bm2.Scale = Vector3.new(3,1,3)
  1133. bm2.MeshId = "rbxassetid://156292343"
  1134. local blast3 = Instance.new("Part", rarm)
  1135. blast3.BrickColor = BrickColor.new("Really black")
  1136. blast3.Anchored = true
  1137. blast3.CanCollide = false
  1138. blast3.Locked = true
  1139. blast3.Size = Vector3.new(1, 1, 1)
  1140. blast3.TopSurface = "Smooth"
  1141. blast3.BottomSurface = "Smooth"
  1142. blast3.Transparency = 0
  1143. blast3.CFrame = HandCF
  1144. local bm3 = Instance.new("SpecialMesh", blast3)
  1145. bm3.Scale = Vector3.new(3,1,3)
  1146. bm3.MeshId = "rbxassetid://3270017"
  1147. for i = 1,120 do rs:wait()
  1148. X.Transparency = X.Transparency + (1/120)
  1149. part.Transparency = part.Transparency + (1/120)
  1150. part2.Transparency = part2.Transparency + (1/120)
  1151. part3.Transparency = part3.Transparency + (1/120)
  1152. part4.Transparency = part4.Transparency + (1/120)
  1153. part5.Transparency = part5.Transparency + (1/120)
  1154. part6.Transparency = part6.Transparency + (1/120)
  1155. part7.Transparency = part7.Transparency + (1/120)
  1156. blast.Transparency = blast.Transparency + (1/120)
  1157. blast2.Transparency = blast2.Transparency + (1/120)
  1158. blast3.Transparency = blast3.Transparency + (1/120)
  1159. X.Size = X.Size + Vector3.new(.8,.8,.8)
  1160. --part3.Size = part3.Size + Vector3.new(3,3,3)
  1161. mesh.Scale = mesh.Scale + Vector3.new(1,.2,1)
  1162. mesh2.Scale = mesh2.Scale + Vector3.new(1.1,.2,1.1)
  1163. mesh3.Scale = mesh3.Scale + Vector3.new(3,3,3)
  1164. mesh4.Scale = mesh4.Scale + Vector3.new(1.7,1.7,1.7)
  1165. mesh5.Scale = mesh5.Scale + Vector3.new(1.6,.2,1.6)
  1166. mesh6.Scale = mesh6.Scale + Vector3.new(2,.2,2)
  1167. mesh7.Scale = mesh7.Scale + Vector3.new(4,4,4)
  1168. bm.Scale = bm.Scale + Vector3.new(6,6,.2)
  1169. bm2.Scale = bm2.Scale + Vector3.new(4,4,.2)
  1170. bm3.Scale = bm3.Scale + Vector3.new(4,4,.2)
  1171. X.CFrame = cf
  1172. part.CFrame=X.CFrame * CFrame.Angles(0,math.rad(i*2),0)
  1173. part2.CFrame=X.CFrame * CFrame.Angles(0,math.rad(-i*2),0)
  1174. part3.CFrame=X.CFrame
  1175. part4.CFrame=X.CFrame
  1176. part7.CFrame=X.CFrame
  1177. part5.CFrame=X.CFrame * CFrame.Angles(0,math.rad(i*2.6),0)
  1178. part6.CFrame=X.CFrame * CFrame.Angles(0,math.rad(-i*2.4),0)
  1179. blast.CFrame=X.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
  1180. blast2.CFrame=X.CFrame * CFrame.Angles(math.rad(-i*4), math.rad(i*4), math.rad(0))
  1181. blast3.CFrame=X.CFrame * CFrame.Angles(math.rad(180+i*4), math.rad(90-i*4), math.rad(0))
  1182. rs:wait()
  1183. end
  1184. X:Destroy()
  1185. part:Destroy()
  1186. part2:Destroy()
  1187. part3:Destroy()
  1188. part4:Destroy()
  1189. part5:Destroy()
  1190. part6:Destroy()
  1191. blast:Destroy()
  1192. blast2:Destroy()
  1193. blast3:Destroy()
  1194. z:Destroy()
  1195. z1:Destroy()
  1196. z2:Destroy()
  1197. z3:Destroy()
  1198. z4:Destroy()
  1199. end
  1200. end)
  1201. for i = 1, 20 do
  1202. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,0)*CFrame.Angles(math.rad(70),math.rad(-6),math.rad(-20)), 0.2)
  1203. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,0)*CFrame.Angles(math.rad(-6),math.rad(6),math.rad(-8)), 0.2)
  1204. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.2)*CFrame.Angles(math.rad(0),math.rad(0),0), 0.2)
  1205. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(30), math.rad(0)), 0.4)
  1206. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(10), 0, math.rad(-8)), 0.2)
  1207. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(-6), 0, math.rad(8)), 0.2)
  1208. if Debounces.on == false then break end
  1209. rs:wait()
  1210. end
  1211. if Debounces.CanAttack == false then
  1212. Debounces.CanAttack = true
  1213. Debounces.NoIdl = false
  1214. Debounces.on = false
  1215. end
  1216. end
  1217. end
  1218. end)
  1219. local HandCF = CFrame.new(root.Position - Vector3.new(0,3,0)) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
  1220. local Colors = {"Toothpaste", "Really black"}
  1221. local wave = Instance.new("Part", torso)
  1222. wave.BrickColor = BrickColor.new('Really red')
  1223. wave.Anchored = true
  1224. wave.CanCollide = false
  1225. wave.Locked = true
  1226. wave.Size = Vector3.new(1, 1, 1)
  1227. wave.TopSurface = "Smooth"
  1228. wave.BottomSurface = "Smooth"
  1229. wave.Transparency = 0.35
  1230. wave.CFrame = HandCF
  1231. wm = Instance.new("SpecialMesh", wave)
  1232. wm.MeshId = "rbxassetid://3270017"
  1233. coroutine.wrap(function()
  1234. for i = 1, 30, 1 do
  1235. wm.Scale = Vector3.new(10 + i*20.4, 10 + i*20.4, 1)
  1236. wave.Size = wm.Scale
  1237. wave.CFrame = HandCF
  1238. wave.Transparency = i/10
  1239. wait()
  1240. end
  1241. wait()
  1242. wave:Destroy()
  1243. end)()
  1244. end
  1245. ----------------------------------------------------
  1246. GroundWave = function()
  1247. if Transforming == true then
  1248. local wave = Instance.new("Part", torso)
  1249. wave.BrickColor = BrickColor.new("Really black")
  1250. wave.Anchored = true
  1251. wave.CanCollide = false
  1252. wave.Locked = true
  1253. wave.Size = Vector3.new(1, 1, 1)
  1254. wave.TopSurface = "Smooth"
  1255. wave.BottomSurface = "Smooth"
  1256. wave.Transparency = 0.35
  1257. wave.CFrame = fx.CFrame
  1258. wm = Instance.new("SpecialMesh", wave)
  1259. wm.MeshType = "Sphere"
  1260. wm.Scale = Vector3.new(1,1,1)
  1261. coroutine.wrap(function()
  1262. for i = 1, 18, 1 do
  1263. wm.Scale = Vector3.new(8 + i*8, 8 + i*8, 8 + i*8)
  1264. --wave.Size = wm.Scale
  1265. wave.CFrame = fx.CFrame
  1266. wave.Transparency = i/001
  1267. wait()
  1268. end
  1269. wait()
  1270. wave:Destroy()
  1271. end)()
  1272. elseif Transforming == false then
  1273. wait()
  1274. end
  1275. end
  1276.  
  1277. for i = 1, 100 do rs:wait()
  1278. fx.CFrame = torso.CFrame
  1279. end
  1280.  
  1281. Spawn(function()
  1282. while wait(1) do
  1283. GroundWave()
  1284. end
  1285. end)
  1286.  
  1287. wait(4)
  1288.  
  1289. Transforming = false
  1290.  
  1291. for i = 1, 20 do rs:wait()
  1292. fx.Transparency = fx.Transparency + (1/20)
  1293. fx.CFrame = torso.CFrame
  1294. fxm.Scale = fxm.Scale + Vector3.new(0.5,0.5,0.5)
  1295. rs:wait()
  1296. end
  1297.  
  1298. local HandCF = CFrame.new(root.Position - Vector3.new(0,3,0)) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
  1299. local wave = Instance.new("Part", torso)
  1300. wave.BrickColor = BrickColor.new("Institutional white")
  1301. wave.Anchored = true
  1302. wave.CanCollide = false
  1303. wave.Locked = true
  1304. wave.Size = Vector3.new(1, 1, 1)
  1305. wave.TopSurface = "Smooth"
  1306. wave.BottomSurface = "Smooth"
  1307. wave.Transparency = 0.35
  1308. wave.CFrame = HandCF
  1309. wm = Instance.new("SpecialMesh", wave)
  1310. wm.MeshId = "rbxassetid://3270017"
  1311. coroutine.wrap(function()
  1312. for i = 1, 14, 1 do
  1313. wm.Scale = Vector3.new(10 + i*10.1, 10 + i*10.1, 10)
  1314. wave.Size = wm.Scale
  1315. wave.CFrame = HandCF
  1316. wave.Transparency = i/14
  1317. wait()
  1318. end
  1319. wait()
  1320. wave:Destroy()
  1321. end)()
  1322. hum.WalkSpeed = 16
  1323. ----------------------------------------------------
  1324. Blast = function()
  1325. local Colors = {"Toothpaste", "Really black"}
  1326. local wave = Instance.new("Part", torso)
  1327. wave.BrickColor = BrickColor.new(Colors[math.random(1,#Colors)])
  1328. wave.Anchored = true
  1329. wave.CanCollide = false
  1330. wave.Locked = true
  1331. wave.Size = Vector3.new(1, 1, 1)
  1332. wave.TopSurface = "Smooth"
  1333. wave.BottomSurface = "Smooth"
  1334. wave.Transparency = 0.35
  1335. wave.CFrame = rarm.CFrame
  1336. wm = Instance.new("SpecialMesh", wave)
  1337. wm.MeshType = "Sphere"
  1338. wm.Scale = Vector3.new(1,1,1)
  1339. z = Instance.new("Sound",wave)
  1340. z.SoundId = "rbxassetid://237035051"
  1341. z.Volume = 1
  1342. z.Pitch = .9
  1343. z:Play()
  1344. coroutine.wrap(function()
  1345. for i = 1, 30, 1 do
  1346. wave.Size = Vector3.new(1 + i*4, 1 + i*4, 1 + i*4)
  1347. --wave.Size = wm.Scale
  1348. wave.CFrame = rarm.CFrame
  1349. wave.Transparency = (1/14)
  1350. rs:wait()
  1351. end
  1352. rs:wait()
  1353. wave:Destroy()
  1354. z:Destroy()
  1355. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement