seamty

Untitled

May 25th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.46 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,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126.  
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132.  
  133. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144.  
  145. local Model = Instance.new("Model",workspace)
  146. local Cloud1 = Instance.new("Part")
  147. local Cloud2 = Instance.new("Part")
  148. local Cloud1Mesh = Instance.new("SpecialMesh")
  149. local Cloud2Mesh = Instance.new("SpecialMesh")
  150. local Sound = Instance.new("Sound",workspace)
  151. local sky = Instance.new("Sky")
  152. NUKE_COLOR = 24 --Only BrickColor codes.
  153. CLOUD_TRANSPARENCY = 0.25
  154.  
  155. wait(1.5)
  156.  
  157. function radiation(hit)
  158. local h = hit.Parent:findFirstChild("Humanoid")
  159. local DAMAGE = 10
  160. if h~=nil then
  161. h.WalkSpeed = 5
  162. h.Parent["Right Leg"]:Destroy()
  163. h.Parent["Left Arm"]:Destroy()
  164. for i =1,h.MaxHealth do
  165. h.Health = h.Health - DAMAGE
  166. wait(1)
  167. end
  168. end
  169. end
  170. function unanchor (m)
  171. for _,i in pairs (m:GetChildren()) do
  172. if i:IsA("Part","Model","Union","WedgePart","CornerWedgePart") then
  173. -- i.Anchored = false
  174. local Fire = Instance.new("Fire")
  175. Fire.Parent = i
  176. Fire.Size = math.random(5,10)
  177. i.Material = "CorrodedMetal"
  178. i:BreakJoints()
  179. i.BrickColor = BrickColor.new(26)
  180. i.Touched:connect(radiation)
  181.  
  182. else
  183. unanchor(i)
  184. end
  185. end
  186. end
  187. unanchor(game.Workspace)
  188.  
  189. Sound.SoundId = "http://www.roblox.com/asset?id=2248511"
  190. Sound.PlaybackSpeed = 0.2
  191. Sound.Playing = true
  192. Sound.Volume = 10
  193.  
  194. Model.Name = "Mushroom Cloud"
  195. Cloud1.Parent = Model
  196. Cloud1.Anchored = true
  197. Cloud1.CanCollide = false
  198. Cloud1.Locked = true
  199. Cloud1Mesh.Parent = Cloud1
  200. Cloud1Mesh.MeshType = "FileMesh"
  201. Cloud1Mesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
  202. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(95,300,195) --1999
  203. Cloud2.Parent = Model
  204. Cloud2.Anchored = true
  205. Cloud2.CanCollide = false
  206. Cloud2.Locked = true
  207. Cloud2.Position = Cloud2.Position + Vector3.new(0,587,0)
  208. Cloud2Mesh.Parent = Cloud2
  209. Cloud2Mesh.MeshType = "FileMesh"
  210. Cloud2Mesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
  211. Cloud2Mesh.Scale = Cloud2Mesh.Scale + Vector3.new(399,399,649)
  212. Cloud1.Transparency = CLOUD_TRANSPARENCY
  213. Cloud2.Transparency = CLOUD_TRANSPARENCY
  214. Cloud1.BrickColor = BrickColor.new(NUKE_COLOR)
  215. Cloud2.BrickColor = BrickColor.new(NUKE_COLOR)
  216. sky.Parent = game.Lighting
  217. sky.Name = "NukeSky"
  218. sky.CelestialBodiesShown = true
  219. sky.SkyboxBk = "http://www.roblox.com/asset/?version=1&id=1012890"
  220. sky.SkyboxDn = "http://www.roblox.com/asset/?version=1&id=1012891"
  221. sky.SkyboxFt = "http://www.roblox.com/asset/?version=1&id=1012887"
  222. sky.SkyboxLf = "http://www.roblox.com/asset/?version=1&id=1012889"
  223. sky.SkyboxRt = "http://www.roblox.com/asset/?version=1&id=1012888"
  224. sky.SkyboxUp = "http://www.roblox.com/asset/?version=1&id=1014449"
  225. explosion = Instance.new("Explosion")
  226. explosion.Parent = game.Workspace
  227. explosion.BlastRadius = 9999999999999
  228. explosion.BlastPressure = 10000000
  229. game.Lighting.Brightness = 999
  230. game.Lighting.OutdoorAmbient = Color3.new(1,0,0)
  231. wait (1) --Fireball
  232. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --200
  233. wait (0.25)
  234. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --400
  235. wait (0.25)
  236. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --600
  237. wait (0.25)
  238. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --800
  239. wait (0.25)
  240. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --1000
  241. wait (0.25)
  242. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --1200
  243. wait (0.25)
  244. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --1400
  245. wait (0.25)
  246. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --1600
  247. wait (0.25)
  248. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,100,0) --1700
  249. wait (30) --End phase of the nuke
  250. game.Lighting.Ambient = Color3.new(0,0,0)
  251. game.Lighting.OutdoorAmbient = Color3.new(127 / 255,127 / 255,127 / 255)
  252. sky:Destroy()
  253. game.Lighting.Brightness = 1
  254. Cloud1.BrickColor = BrickColor.new(1)
  255. Cloud2.BrickColor = BrickColor.new(1)
  256. Cloud1.Transparency = 0.6
  257. Cloud2.Transparency = 0.6
  258. wait (5)
  259. Cloud1.Transparency = 0.7
  260. Cloud2.Transparency = 0.7
  261. wait (5)
  262. Cloud1.Transparency = 0.8
  263. Cloud2.Transparency = 0.8
  264. wait (5)
  265. Cloud1.Transparency = 0.9
  266. Cloud2.Transparency = 0.9
  267. wait (120)
  268. Cloud1:Destroy()
  269. Cloud2:Destroy()
  270. --BrickColor codes: http://wiki.roblox.com/index.php?title=BrickColor_codes
Advertisement
Add Comment
Please, Sign In to add comment