Advertisement
tsup2

Untitled

Aug 16th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.43 KB | None | 0 0
  1. -- Roblox.LUA | Earth Shaker, WIP. | Made by Cass.
  2.  
  3. print[[
  4. click = smash
  5. Q = dash
  6. E = slow dash
  7. R = ride part you're standing on
  8. T = spawn large cloud
  9. ]]
  10.  
  11. antig=193
  12. bforce = 100
  13.  
  14. cloudcolors = {353,354,1002,358,194,208,1,311}
  15. function cloud(a)
  16. a.BrickColor = BrickColor.new(cloudcolors[math.random(1,#cloudcolors)])
  17. end
  18.  
  19. base = nil
  20. game:GetService'RunService'.Stepped:connect(function()
  21. if workspace:FindFirstChild'Base' ~= nil then base = workspace.Base else base = nil end
  22. end)
  23.  
  24. function dash(a,b,d)
  25. local c = Instance.new('BodyVelocity',a)
  26. game:GetService'Debris':AddItem(c,.1)
  27. c.Velocity = Vector3.new(0,20,0) + ((a.CFrame * CFrame.Angles(math.random(-2e9,2e9),math.random(-2e9,2e9),math.random(-2e9,2e9))).lookVector * 100)
  28. end
  29.  
  30. function fragment(a,todash)
  31. if a.Size.Y ~= .2 and a.Size.X ~= .2 and a.Size.Z ~= .2 then
  32. local model = a.Parent
  33. --[[local cf = a.CFrame
  34. a.Size = a.Size + Vector3.new(1,1,1)
  35. a.CFrame = cf]]--
  36. a:Destroy()
  37. a.CanCollide = true
  38. local ofs = 2
  39. local psize = Vector3.new(a.Size.X / ofs,a.Size.Y / ofs,a.Size.Z / ofs)
  40. local sizex = a.Size.X
  41. local sizez = a.Size.Z
  42. local offset1 = 0
  43. local offset2 = 0
  44. local offset3 = 0
  45. local start = a.CFrame * CFrame.new(a.Size.X / -2,a.Size.Y / -2,a.Size.Z / -2)
  46. for i=1,a.Size.Y / psize.Y,1 do
  47. for i=1,sizez / psize.Z,1 do
  48. for i=1,sizex / psize.X,1 do
  49. local b = a:Clone()
  50. if model:FindFirstChild'Humanoid' then
  51. b.Material = 'Neon'
  52. b.BrickColor = BrickColor.new(cloudcolors[math.random(1,#cloudcolors)])
  53. spawn(function()
  54. for i=0,1,.0025 do
  55. wait()
  56. b.Transparency = i
  57. end
  58. b:Destroy()
  59. end)
  60. end
  61. b.Parent = workspace
  62. if not todash then
  63. b.Velocity = (b.CFrame * CFrame.Angles(math.random(),math.random(),math.random())).lookVector*bforce
  64. end
  65. b:ClearAllChildren()
  66. b.Name = 'fragmentDelayed'
  67. if a.Name == 'cloud' then cloud(b) end
  68. if not model:FindFirstChild'Humanoid' then spawn(function() wait(.6) b.Name = 'fragment'
  69. if a.Name == 'cloud' then b.Name = 'cloud' end end) end
  70. b.Size = psize
  71. Instance.new('BodyForce',b).Force = Vector3.new(0,b:GetMass()*antig,0)
  72. b.CFrame = start * CFrame.new(offset1,offset3,offset2)
  73. b:BreakJoints()
  74. b.Anchored = false
  75. offset1 = offset1 + psize.X
  76. end
  77. offset1 = 0
  78. offset2 = offset2 + psize.Z
  79. end
  80. offset1 = 0
  81. offset2 = 0
  82. offset3 = offset3 + psize.Y
  83. end
  84. end
  85. end
  86.  
  87. plr = game:GetService'Players'.LocalPlayer
  88. char = plr.Character
  89. mouse = plr:GetMouse()
  90. dhit = false
  91. qdeb = false
  92.  
  93. handle = Instance.new('Part',script) handle.Material = 'Wood'
  94. handle.Size = Vector3.new(.2,.2,.2) handle.BrickColor = BrickColor.new(364)
  95. handle.CanCollide = false
  96. Instance.new('BlockMesh',handle).Scale = Vector3.new(1,1,20)
  97.  
  98. function weightless(a)
  99. Instance.new('BodyForce',a).Force = Vector3.new(0,a:GetMass(),0)
  100. end
  101.  
  102. mcf = CFrame.new(0,0,2)
  103. for i=1,10,1 do
  104. local a = Instance.new('Part',script)
  105. a.Material = 'Concrete'
  106. a.CanCollide = false
  107. a.BrickColor = BrickColor.new('Flint')
  108. a.Size = Vector3.new(.2,.2,.2)
  109. Instance.new('BlockMesh',a).Scale = Vector3.new(1.1,1.1,1)
  110. local b = Instance.new('Weld',a)
  111. b.Part0 = handle
  112. b.Part1 = a
  113. b.C0 = mcf
  114. mcf = mcf * CFrame.new(0,0,-.4)
  115. weightless(a)
  116. end
  117.  
  118. met = Instance.new('Part',script) met.Material = 'Concrete'
  119. met.BrickColor = BrickColor.new(363) met.Size = Vector3.new(0,0,0)
  120. Instance.new('BlockMesh',met).Scale = Vector3.new(10,15,10)
  121. met.CanCollide = false
  122. met.Name = 'met'
  123.  
  124. hitbox = met:Clone() hitbox.Parent = script
  125. hitbox.Size = Vector3.new(2.5,2.5,2.5) hitbox.Mesh:Destroy()
  126. hitbox.BrickColor = BrickColor.new(363)
  127.  
  128. des = hitbox:Clone() des.Parent = script des.Size = Vector3.new(1.5,3,1.5)
  129. dw = Instance.new('Weld',des) dw.Part0 = hitbox dw.Part1 = des
  130. dw.C0 = CFrame.new(0,-.25,0)
  131.  
  132. hbw = Instance.new('Weld',hitbox) hbw.Part0 = met hbw.Part1 = hitbox hbw.C0 = CFrame.new(0,0,0) * CFrame.Angles(0,math.rad(45),0)
  133.  
  134. function weld(a,b,c,d)
  135. local e = Instance.new('Weld',b) e.Part0 = a e.Part1 = b
  136. e.C1 = c e.C0 = d
  137. return e
  138. end
  139.  
  140. function move(a,b,c)
  141. a.C0 = a.C0:lerp(b,c)
  142. end
  143.  
  144. weightless(hitbox)
  145.  
  146. ra = weld(char.HumanoidRootPart,char['Right Arm'],CFrame.new(0,.5,0),CFrame.new(1.5,.5,0) * CFrame.Angles(math.rad(230),math.rad(-45),math.rad(-25)))
  147.  
  148. hw = Instance.new('Weld',handle) hw.Part0 = char['Right Arm']
  149. hw.Part1 = handle
  150. hw.C0 = CFrame.new(0,-1,0) * CFrame.Angles(0,math.rad(90),0)
  151.  
  152. mw = Instance.new('Weld',met) mw.Part0 = handle mw.Part1 = met
  153. mw.C0 = CFrame.new(0,0,-3)
  154.  
  155. weightless(handle)
  156. weightless(met)
  157.  
  158. on = false
  159.  
  160. function blur(ma,ofs)
  161. local a = ma:Clone()
  162. a.CanCollide = false
  163. a.Parent = script
  164. a.Size = ma.Size + Vector3.new(ofs,ofs,ofs)
  165. a.BrickColor = BrickColor.new(cloudcolors[math.random(1,#cloudcolors)])
  166. a.Material = 'SmoothPlastic'
  167. if a.Name == 'Torso' then
  168. a:ClearAllChildren()
  169. end
  170. a.Name = 'fragmentDelayed'
  171. if a:FindFirstChild'Mesh' then
  172. a.Mesh.Scale = a.Mesh.Scale - Vector3.new(.1,.1,.1)
  173. end
  174. a.CFrame = ma.CFrame
  175. a:BreakJoints()
  176. a.Anchored = true
  177.  
  178. local done = false game:GetService'RunService'.Stepped:connect(function() if done == false then done = true
  179. for i=0,1,.2 do
  180. wait()
  181. a.Transparency = i
  182. end
  183. a:Destroy()
  184. end end)
  185.  
  186. return a
  187.  
  188. end
  189.  
  190. mouse.Button1Down:connect(function()
  191. if on == false then
  192. on = true
  193. dhit = true
  194.  
  195. local s2 = Instance.new('Sound',met)
  196. s2.SoundId = 'rbxassetid://145486992'
  197. s2.Pitch = math.random(7,10) * .1
  198. s2:Play()
  199. game:GetService('Debris'):AddItem(s2,s2.TimeLength)
  200.  
  201. for i=0,1,.1 do wait()
  202. move(ra,CFrame.new(1.5,.5,0) * CFrame.Angles(math.rad(70),0,0),.5)
  203. move(hw,CFrame.new(0,-2,0) * CFrame.Angles(math.rad(-90),0,0),.9)
  204.  
  205. blur(met)
  206.  
  207. end
  208.  
  209. dhit = false
  210.  
  211. for i=0,1,.1 do wait()
  212. move(ra,CFrame.new(1.5,.5,0) * CFrame.Angles(math.rad(230),math.rad(-45),math.rad(-25)),.3)
  213. move(hw,CFrame.new(0,-1,0) * CFrame.Angles(0,math.rad(90),0),.9)
  214. end
  215.  
  216. on = false
  217.  
  218. end
  219. end)
  220.  
  221. welded = false
  222. footweld = nil
  223. cdeb = false
  224. edeb = false
  225. mouse.KeyDown:connect(function(key)
  226.  
  227. if key == 't' and cdeb == false then
  228. cdeb = true
  229. local a = Instance.new('Part',workspace)
  230. a.Material = 'SmoothPlastic'
  231. a.Name = 'cloud'
  232. a.BrickColor = BrickColor.new(1002)
  233. a.Size = Vector3.new(0,0,0)
  234. a.Anchored = true
  235. a.CFrame = char.Torso.CFrame * CFrame.new(0,-3,0)
  236. a.Velocity = Vector3.new(0,2,0)
  237. a:BreakJoints()
  238. a.Transparency = 1
  239. cloud(a)
  240. local rsize = math.random(100,250)
  241. spawn(function()
  242. for i=1,.3,-.01 do
  243. wait()
  244. a.Transparency = i
  245. end
  246. end)
  247. local origcf = a.CFrame
  248. for i=0,rsize,.5 do
  249. wait()
  250. a.Size = Vector3.new(i,i,i)
  251. a.CFrame = origcf * CFrame.new(0,.5*i,0)
  252. end
  253. cdeb = false
  254. a.Anchored = false
  255. Instance.new('BodyForce',a).Force = Vector3.new(0,a:GetMass()*antig,0)
  256. end
  257.  
  258. if key == 'e' and qdeb == false then
  259. qdeb = true
  260. local s2 = Instance.new('Sound',char.Torso)
  261. s2.Pitch = math.random(7,10) * .1
  262. s2.SoundId = 'rbxassetid://134012322'
  263. s2:Play()
  264. game:GetService('Debris'):AddItem(s2,s2.TimeLength)
  265. local spd = 50
  266. local c = Instance.new('BodyVelocity',char.Torso)
  267. c.Velocity = CFrame.new(char.Torso.Position,mouse.hit.p).lookVector * spd
  268. c.P = 100
  269. c.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  270. game:GetService'Debris':AddItem(c,.1)
  271. spawn(function()
  272. for i=1,10,1 do wait()
  273. blur(char.Torso,-1)
  274. c.Velocity = c.Velocity + CFrame.new(char.Torso.Position,mouse.hit.p).lookVector * spd
  275. end
  276. end)
  277. wait(.2)
  278. qdeb = false
  279. end
  280.  
  281. if key == 'q' and qdeb == false then
  282. qdeb = true
  283. local s2 = Instance.new('Sound',char.Torso)
  284. s2.SoundId = 'rbxassetid://154723542'
  285. s2.Pitch = math.random(7,10) * .1
  286. s2:Play()
  287. game:GetService('Debris'):AddItem(s2,s2.TimeLength)
  288. local spd = 125
  289. local c = Instance.new('BodyVelocity',char.Torso)
  290. c.Velocity = CFrame.new(char.Torso.Position,mouse.hit.p).lookVector * spd
  291. c.P = 100
  292. c.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  293. game:GetService'Debris':AddItem(c,.1)
  294. spawn(function()
  295. for i=1,10,1 do wait()
  296. blur(char.Torso,2)
  297. c.Velocity = c.Velocity + CFrame.new(char.Torso.Position,mouse.hit.p).lookVector * spd
  298. end
  299. end)
  300. wait(.2)
  301. qdeb = false
  302. end
  303.  
  304. if key == 'r' then
  305. if welded == false then
  306. local ray = Ray.new(char['Left Leg'].Position, ((char['Left Leg'].Position - Vector3.new(0,4,0)) - char['Left Leg'].Position).unit * 4)
  307. local hit = workspace:FindPartOnRay(ray)
  308. if hit then
  309. local w = Instance.new('Weld',char.Torso)
  310. w.C0 = char.Torso.CFrame:toObjectSpace(hit.CFrame)
  311. w.Part0 = char.Torso
  312. w.Part1 = hit
  313. footweld = w
  314. welded = true
  315. end
  316. else
  317. footweld.Parent = nil
  318. welded = false
  319. end
  320. end
  321.  
  322. end)
  323.  
  324. hitbox.Touched:connect(function(hit)
  325. if hit.Name ~= 'fragmentDelayed' and hit.Name ~= 'hitshockwave' and hit.Size.X+hit.Size.Y+hit.Size.Z > .2 then
  326. if dhit == true and hit ~= base and hit.Name ~='Base' then
  327.  
  328. fragment(hit)
  329.  
  330. if met:FindFirstChild'fragSound' == nil then
  331. local s1 = Instance.new('Sound',met)
  332. s1.Name = 'fragSound'
  333. s1.SoundId = 'rbxassetid://558640653'
  334. s1.Pitch = math.random(7,10) * .1
  335. s1:Play()
  336. game:GetService('Debris'):AddItem(s1,.5)
  337. end
  338.  
  339. if script:FindFirstChild'hitshockwave' == nil then
  340. local a = Instance.new('Part',script)
  341. a.Name = 'hitshockwave'
  342. a.Anchored = true
  343. a.CanCollide = false
  344. a.Material = 'SmoothPlastic'
  345. a.BrickColor = BrickColor.new(1)
  346. a.Size = Vector3.new(0,0,0)
  347. a.CFrame = met.CFrame
  348. a.Shape = 'Ball'
  349. local origcfa = a.CFrame
  350. for i=0,1,.2 do
  351. wait()
  352. a.Transparency = i
  353. a.Size = a.Size + Vector3.new(5,5,5)
  354. a.CFrame = origcfa
  355. end
  356. a:Destroy()
  357. end
  358.  
  359. end
  360. end
  361. end)
  362.  
  363. game:GetService'RunService'.Stepped:connect(function()
  364. char:WaitForChild('Humanoid').WalkSpeed = 30
  365. if welded == true then
  366. char.Humanoid.PlatformStand = true
  367. char.Humanoid.WalkSpeed = 0
  368. else
  369. char.Humanoid.PlatformStand = false
  370. end
  371. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement