Advertisement
zXzGamePROzXz

Untitled

Jan 4th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.17 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. local RealPlayer = Player
  4. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  5.  
  6. for i,v in pairs (game.Workspace:GetChildren()) do
  7. if v.Name == "Nuke" then
  8. v:Destroy()
  9. end
  10. end
  11. wait(1)
  12. local Tool = Instance.new("HopperBin", game.Players.LocalPlayer.Backpack)
  13. Tool.Name = "Detonater"
  14. local Mouse = game.Players.LocalPlayer:GetMouse()
  15.  
  16. local Place = Instance.new("HopperBin", game.Players.LocalPlayer.Backpack)
  17. Place.Name = "Placer"
  18. Nuke = Instance.new("Model")
  19. Nuke.Parent = game.Workspace
  20. Nuke.Name = "Nuke"
  21.  
  22. x5 = 1
  23. Mouse.Button1Down:connect(function()
  24. if x5 == 1 then
  25. if Place.Active == true then
  26. local name = game.Players.LocalPlayer.Name
  27. local Part1 = Instance.new("Part")
  28. Part1.Name = "Part"
  29. Part1.Parent = Nuke
  30. Part1.Size = Vector3.new(12,1,6)
  31. Part1.Position = Mouse.Hit.p
  32. Part1.BottomSurface = "Smooth"
  33. Part1.TopSurface = "Smooth"
  34. Part1.Material = "Metal"
  35. Part1.BrickColor = BrickColor.new("Really black")
  36. Part1.Anchored = true
  37. local x1 = game.Workspace.Nuke.Part.Position.X
  38. local y1 = game.Workspace.Nuke.Part.Position.Y
  39. local z1 = game.Workspace.Nuke.Part.Position.Z
  40. local Part2 = Instance.new("Part")
  41. Part2.Name = "Detonate"
  42. Part2.Parent = Nuke
  43. Part2.Size = Vector3.new(10, 5, 5)
  44. Part2.Position = Vector3.new(x1,y1+2,z1)
  45. Part2.BottomSurface = "Smooth"
  46. Part2.TopSurface = "Smooth"
  47. Part2.Material = "Metal"
  48. Part2.BrickColor = BrickColor.new("Really black")
  49. Part2.Anchored = true
  50. Part2.Shape = "Cylinder"
  51. x5 = x5+1
  52. local Decal = Instance.new("Decal")
  53. Decal.Texture = "http://www.roblox.com/asset/?id=14301975"
  54. Decal.Parent = Part2
  55. Decal.Face = "Back"
  56. end
  57. end
  58. end)
  59.  
  60.  
  61. Mouse.Button1Down:connect(function()
  62. if Tool.Active == true then
  63. local nuke = Instance.new("Part")
  64. nuke.Position = game.Workspace.Nuke.Detonate.Position
  65. nuke.Anchored = true
  66. nuke.Parent = game.Workspace
  67. local x, y, z = 5, 5, 5
  68. nuke.BrickColor = BrickColor.new ("New Yeller")
  69. nuke.Size = Vector3.new(x, y, z)
  70. nuke.CanCollide = false
  71. nuke.Name = "nuke"
  72. nuke.Shape = "Ball"
  73. nuke.Transparency = 0.3
  74. nuke.Material = "Neon"
  75. nuke.Locked = true
  76. game.Workspace.Nuke:Destroy()
  77. while x <= 100 do
  78. x, y, z = x+1, y+1, z+1
  79. nuke.Size = Vector3.new(x, y, z)
  80. local explosion = Instance.new("Explosion")
  81. explosion.BlastPressure = 1000000
  82. explosion.BlastRadius = x-15
  83. explosion.DestroyJointRadiusPercent = 1
  84. explosion.ExplosionType = "Craters"
  85. explosion.Parent = game.Workspace
  86. explosion.Position = game.Workspace.nuke.Position
  87. explosion.Hit:connect(function(Part, Distance)
  88. if Part.Name ~= "nuke" then
  89. Part.Anchored = false
  90. Part:BreakJoints()
  91. end
  92. end)
  93. wait(0.01)
  94. end
  95. while x <= 200 do
  96. x, y, z = x+3, y+3, z+3
  97. nuke.Size = Vector3.new(x, y, z)
  98. local explosion = Instance.new("Explosion")
  99. explosion.BlastPressure = 1000000
  100. explosion.BlastRadius = x+50
  101. explosion.DestroyJointRadiusPercent = 1
  102. explosion.ExplosionType = "Craters"
  103. explosion.Parent = game.Workspace
  104. explosion.Position = game.Workspace.nuke.Position
  105. explosion.Hit:connect(function(Part, Distance)
  106. if Part.Name ~= "nuke" then
  107. Part.Anchored = false
  108. Part:BreakJoints()
  109. end
  110. end)
  111. wait(0.01)
  112. end
  113. game.Workspace.nuke:Destroy()
  114. x5 = 1
  115. Nuke = Instance.new("Model")
  116. Nuke.Parent = game.Workspace
  117. Nuke.Name = "Nuke"
  118. Tool.Active = false
  119. end
  120. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement