Advertisement
Baldeagle22

jhkh

Sep 10th, 2018
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.15 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  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 UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  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. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. local Model = Instance.new("Model",workspace)
  88. local Cloud1 = Instance.new("Part")
  89. local Cloud2 = Instance.new("Part")
  90. local Cloud1Mesh = Instance.new("SpecialMesh")
  91. local Cloud2Mesh = Instance.new("SpecialMesh")
  92. local Sound = Instance.new("Sound",workspace)
  93. local sky = Instance.new("Sky")
  94. NUKE_COLOR = 24 --Only BrickColor codes.
  95. CLOUD_TRANSPARENCY = 0.25
  96.  
  97. wait(1.5)
  98.  
  99. function radiation(hit)
  100. local h = hit.Parent:findFirstChild("Humanoid")
  101. local DAMAGE = 10
  102. if h~=nil then
  103. h.WalkSpeed = 5
  104. h.Parent["Right Leg"]:Destroy()
  105. h.Parent["Left Arm"]:Destroy()
  106. for i =1,h.MaxHealth do
  107. h.Health = h.Health - DAMAGE
  108. wait(1)
  109. end
  110. end
  111. end
  112. function unanchor (m)
  113. for _,i in pairs (m:GetChildren()) do
  114. if i:IsA("Part","Model","Union","WedgePart","CornerWedgePart") then
  115. -- i.Anchored = false
  116. local Fire = Instance.new("Fire")
  117. Fire.Parent = i
  118. Fire.Size = math.random(5,10)
  119. i.Material = "CorrodedMetal"
  120. i:BreakJoints()
  121. i.BrickColor = BrickColor.new(26)
  122. i.Touched:connect(radiation)
  123.  
  124. else
  125. unanchor(i)
  126. end
  127. end
  128. end
  129. unanchor(game.Workspace)
  130.  
  131. Sound.SoundId = "http://www.roblox.com/asset?id=2248511"
  132. Sound.PlaybackSpeed = 0.2
  133. Sound.Playing = true
  134. Sound.Volume = 10
  135.  
  136. Model.Name = "Mushroom Cloud"
  137. Cloud1.Parent = Model
  138. Cloud1.Anchored = true
  139. Cloud1.CanCollide = false
  140. Cloud1.Locked = true
  141. Cloud1Mesh.Parent = Cloud1
  142. Cloud1Mesh.MeshType = "FileMesh"
  143. Cloud1Mesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
  144. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(95,300,195) --1999
  145. Cloud2.Parent = Model
  146. Cloud2.Anchored = true
  147. Cloud2.CanCollide = false
  148. Cloud2.Locked = true
  149. Cloud2.Position = Cloud2.Position + Vector3.new(0,587,0)
  150. Cloud2Mesh.Parent = Cloud2
  151. Cloud2Mesh.MeshType = "FileMesh"
  152. Cloud2Mesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
  153. Cloud2Mesh.Scale = Cloud2Mesh.Scale + Vector3.new(399,399,649)
  154. Cloud1.Transparency = CLOUD_TRANSPARENCY
  155. Cloud2.Transparency = CLOUD_TRANSPARENCY
  156. Cloud1.BrickColor = BrickColor.new(NUKE_COLOR)
  157. Cloud2.BrickColor = BrickColor.new(NUKE_COLOR)
  158. sky.Parent = game.Lighting
  159. sky.Name = "NukeSky"
  160. sky.CelestialBodiesShown = true
  161. sky.SkyboxBk = "http://www.roblox.com/asset/?version=1&id=1012890"
  162. sky.SkyboxDn = "http://www.roblox.com/asset/?version=1&id=1012891"
  163. sky.SkyboxFt = "http://www.roblox.com/asset/?version=1&id=1012887"
  164. sky.SkyboxLf = "http://www.roblox.com/asset/?version=1&id=1012889"
  165. sky.SkyboxRt = "http://www.roblox.com/asset/?version=1&id=1012888"
  166. sky.SkyboxUp = "http://www.roblox.com/asset/?version=1&id=1014449"
  167. explosion = Instance.new("Explosion")
  168. explosion.Parent = game.Workspace
  169. explosion.BlastRadius = 9999999999999
  170. explosion.BlastPressure = 10000000
  171. game.Lighting.Brightness = 999
  172. game.Lighting.OutdoorAmbient = Color3.new(1,0,0)
  173. wait (1) --Fireball
  174. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --200
  175. wait (0.25)
  176. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --400
  177. wait (0.25)
  178. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --600
  179. wait (0.25)
  180. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --800
  181. wait (0.25)
  182. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --1000
  183. wait (0.25)
  184. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --1200
  185. wait (0.25)
  186. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --1400
  187. wait (0.25)
  188. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --1600
  189. wait (0.25)
  190. Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,100,0) --1700
  191. wait (30) --End phase of the nuke
  192. game.Lighting.Ambient = Color3.new(0,0,0)
  193. game.Lighting.OutdoorAmbient = Color3.new(127 / 255,127 / 255,127 / 255)
  194. sky:Destroy()
  195. game.Lighting.Brightness = 1
  196. Cloud1.BrickColor = BrickColor.new(1)
  197. Cloud2.BrickColor = BrickColor.new(1)
  198. Cloud1.Transparency = 0.6
  199. Cloud2.Transparency = 0.6
  200. wait (5)
  201. Cloud1.Transparency = 0.7
  202. Cloud2.Transparency = 0.7
  203. wait (5)
  204. Cloud1.Transparency = 0.8
  205. Cloud2.Transparency = 0.8
  206. wait (5)
  207. Cloud1.Transparency = 0.9
  208. Cloud2.Transparency = 0.9
  209. wait (120)
  210. Cloud1:Destroy()
  211. Cloud2:Destroy()
  212. --BrickColor codes: http://wiki.roblox.com/index.php?title=BrickColor_codes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement