hecknes

Astroid Bomb 2

Jun 2nd, 2019
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.15 KB | None | 0 0
  1. --[[hecknes1800]]--
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. script.Parent = Player.Character
  7.  
  8. --RemoteEvent for communicating
  9. local Event = Instance.new("RemoteEvent")
  10. Event.Name = "UserInput_Event"
  11.  
  12. --Fake event to make stuff like Mouse.KeyDown work
  13. local function fakeEvent()
  14. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  15. t.connect = t.Connect
  16. return t
  17. end
  18.  
  19. --Creating fake input objects with fake variables
  20. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  21. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  22. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  23. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  24. end}
  25. --Merged 2 functions into one by checking amount of arguments
  26. CAS.UnbindAction = CAS.BindAction
  27.  
  28. --This function will trigger the events that have been :Connect()'ed
  29. local function te(self,ev,...)
  30. local t = m[ev]
  31. if t and t._fakeEvent and t.Function then
  32. t.Function(...)
  33. end
  34. end
  35. m.TrigEvent = te
  36. UIS.TrigEvent = te
  37.  
  38. Event.OnServerEvent:Connect(function(plr,io)
  39. if plr~=Player then return end
  40. if io.isMouse then
  41. m.Target = io.Target
  42. m.Hit = io.Hit
  43. else
  44. local b = io.UserInputState == Enum.UserInputState.Begin
  45. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  46. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  47. end
  48. for _,t in pairs(CAS.Actions) do
  49. for _,k in pairs(t.Keys) do
  50. if k==io.KeyCode then
  51. t.Function(t.Name,io.UserInputState,io)
  52. end
  53. end
  54. end
  55. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  56. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  57. end
  58. end)
  59. Event.Parent = NLS([==[
  60. local Player = game:GetService("Players").LocalPlayer
  61. local Event = script:WaitForChild("UserInput_Event")
  62.  
  63. local UIS = game:GetService("UserInputService")
  64. local input = function(io,a)
  65. if a then return end
  66. --Since InputObject is a client-side instance, we create and pass table instead
  67. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  68. end
  69. UIS.InputBegan:Connect(input)
  70. UIS.InputEnded:Connect(input)
  71.  
  72. local Mouse = Player:GetMouse()
  73. local h,t
  74. --Give the server mouse data 30 times every second, but only if the values changed
  75. --If player is not moving their mouse, client won't fire events
  76. while wait(1/30) do
  77. if h~=Mouse.Hit or t~=Mouse.Target then
  78. h,t=Mouse.Hit,Mouse.Target
  79. Event:FireServer({isMouse=true,Target=t,Hit=h})
  80. end
  81. end]==],Player.Character)
  82. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  83. end
  84.  
  85. local char = Player.Character
  86. local hum = char:WaitForChild("Humanoid")
  87. print("Do Not Point Up! Reset If You Did!")
  88.  
  89.  
  90. en = true
  91. ButtonDown = true
  92.  
  93. mouse.KeyDown:connect(function(key)
  94. if en == false then return end
  95. key = key:lower()
  96. if key == "q" then
  97. en = false
  98. local sounds = Instance.new("Sound",workspace)
  99. local pa = Instance.new("Part")
  100. local ma = Instance.new("Part")
  101.  
  102. sounds.Looped = false
  103. sounds.Volume = 10
  104. sounds.SoundId = ("rbxassetid://1398471768")
  105. sounds:Play()
  106. local Fr = Instance.new("Part")
  107.  
  108. local woosh = Instance.new("Sound",Fr)
  109. woosh.SoundId = "rbxassetid://1846550529"
  110.  
  111. ma.Parent = Fr
  112. ma.CFrame = char.Head.CFrame+Vector3.new(0,1,0)
  113. ma.Anchored = true
  114. ma.CanCollide = false
  115. ma.Transparency = 1
  116. ma.Size = Vector3.new(10,0.00001,10)
  117. local dec = Instance.new("Decal",ma)
  118. dec.Texture = ("http://www.roblox.com/asset/?id=1003309602")
  119. dec.Face = ("Top")
  120. local dec2 = dec:Clone()
  121. dec2.Parent = ma
  122. dec2.Face = ("Bottom")
  123. pa.Parent = Fr
  124. local mesh = Instance.new("SpecialMesh",pa)
  125. mesh.MeshId = ("http://www.roblox.com/asset/?id=3270017")
  126. pa.BrickColor = BrickColor.new("Medium stoneg rey")
  127. pa.Transparency = 0.4
  128. local fire = Instance.new("Fire",Fr)
  129. Fr.Shape = ("Ball")
  130. fire.Color = Color3.fromRGB(15,7,236)
  131. fire.Heat = 9
  132. fire.Size = 7
  133. fire.SecondaryColor = Color3.fromRGB(255,8,0)
  134. Fr.Transparency = 0
  135. Fr.Material = ("Neon")
  136. Fr.Parent = char
  137. Fr.Anchored = true
  138. Fr.CFrame = char.Torso.CFrame*CFrame.new(0,5,0)
  139. Fr.BrickColor = BrickColor.new("Really black")
  140. Fr.Name = ("Astroid Bomb")
  141. Fr.CanCollide = false
  142. ---Forces---
  143. local BG = Instance.new("BodyGyro", char.Torso)
  144. BG.Name = "SkillGyro"
  145. BG.D = 100
  146. BG.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
  147. local BP = Instance.new("BodyPosition", char.Torso)
  148. BP.Position = char.HumanoidRootPart.Position
  149. BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  150. pa.Anchored = true
  151. pa.CFrame = Fr.CFrame
  152. mesh.Scale = Vector3.new(5,5,5)
  153. ------------
  154.  
  155. --Charging
  156. while ButtonDown == true do
  157. local pos = mouse.Hit.p
  158. BG.CFrame = CFrame.new(char.Torso.Position, pos)
  159. Fr.Size = Fr.Size+Vector3.new(0.008,0.008,0.008)
  160. Fr.CFrame = Fr.CFrame*CFrame.new(0,0.008,0)
  161. mesh.Scale = mesh.Scale+Vector3.new(0.05,0.05,0.05)
  162. pa.CFrame = pa.CFrame*CFrame.new(0,0.01,0)
  163. pa.Orientation = pa.Orientation+Vector3.new(0.5,0.5,0.5)
  164. ma.Size = ma.Size+Vector3.new(0.01,0,0.01)
  165. ma.CFrame = ma.CFrame*CFrame.new(0,0.005,0)
  166. wait()
  167. end
  168.  
  169. woosh:Play()
  170. --
  171.  
  172.  
  173.  
  174.  
  175. Fr.CFrame = char.Torso.CFrame*CFrame.new(0,0, -5)
  176. Fr.Anchored = false
  177. local BV = Instance.new("BodyVelocity")
  178. BV.Parent = Fr
  179. BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  180. BV.Velocity = char.Torso.CFrame.lookVector*100
  181. pa.Transparency = 0.7
  182. wait()
  183. pa.Transparency = 0.8
  184. wait()
  185. pa.Transparency = 0.9
  186. wait()
  187. pa.Transparency = 1
  188. local ten = true
  189.  
  190.  
  191. ---Damaging--
  192. Fr.Touched:connect(function(hit)
  193. if ten == false then return end
  194. ten = false
  195. local ehum = hit.Parent:FindFirstChild("Humanoid") or hit.Parent.Parent:FindFirstChild("Humanoid")
  196. if ehum and ehum ~= hum then
  197. ehum:TakeDamage(20)
  198. Fr.Transparency = 1
  199. Fr.Anchored = true
  200. Fr.CanCollide = false
  201. local sound = Instance.new("Sound",workspace)
  202. sound.SoundId = ("rbxassetid://138186576")
  203. sound:Play()
  204. elseif hit.Anchored == true and hit.CanCollide == true then
  205. local sound = Instance.new("Sound",workspace)
  206. sound.SoundId = ("rbxassetid://138186576")
  207. sound:Play()
  208. hit.Color = Color3.fromRGB(2,2,2)
  209. hit.Material = ("Neon")
  210. for i = 1, 20 do
  211. Fr.Transparency = 1
  212. Fr.Anchored = true
  213. Fr.CanCollide = false
  214. hum.CameraOffset = Vector3.new(math.random(-0.7,0.7),math.random(-0.7,0.7),math.random(-0.7,0.7))
  215. wait()
  216. end
  217. hum.CameraOffset = Vector3.new(0,0,0)
  218. local cloud = Instance.new("Part",Fr)
  219. cloud.CanCollide = true
  220. cloud.Anchored = true
  221. local clm = Instance.new("SpecialMesh",cloud)
  222. clm.Parent = cloud
  223. clm.MeshId = ("rbxassetid://700927324")
  224. clm.Scale = Vector3.new(10,10,10)
  225. cloud.Position = Fr.Position
  226. cloud.BrickColor = BrickColor.new("Dark stone grey")
  227. for i = 1, 20 do
  228. print("i")
  229. clm.Scale = clm.Scale+Vector3.new(0.05,0.05,0.05)
  230. wait()
  231. end
  232. for i = 1,20 do
  233. cloud.Transparency = cloud.Transparency + 0.1
  234. wait()
  235. end
  236. cloud:Destroy()
  237. end
  238. wait(1)
  239. Fr:Destroy()
  240. BG:remove()
  241. BP:remove()
  242. sounds:Stop()
  243. hit.Color = Color3.fromRGB(2,2,2)
  244. wait(0.1)
  245. hit.Color = Color3.fromRGB(5,5,5)
  246. wait(0.1)
  247. hit.Color = Color3.fromRGB(8,8,8)
  248. wait(0.1)
  249. hit.Color = Color3.fromRGB(11,11,11)
  250. wait(0.1)
  251. hit.Color = Color3.fromRGB(14,14,14)
  252. ten = true
  253. end)
  254. end
  255. wait(3)
  256. ButtonDown = true
  257.  
  258. en = true
  259. end)
  260.  
  261. mouse.KeyUp:connect(function(key)
  262. key = key:lower()
  263. if key == "q" then
  264. ButtonDown = false
  265. end
  266. end)
Advertisement
Add Comment
Please, Sign In to add comment