hecknes

Astroid Bomb!

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