Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- local Model = Instance.new("Model",workspace)
- local Cloud1 = Instance.new("Part")
- local Cloud2 = Instance.new("Part")
- local Cloud1Mesh = Instance.new("SpecialMesh")
- local Cloud2Mesh = Instance.new("SpecialMesh")
- local Sound = Instance.new("Sound",workspace)
- local sky = Instance.new("Sky")
- NUKE_COLOR = 24 --Only BrickColor codes.
- CLOUD_TRANSPARENCY = 0.25
- wait(1.5)
- function radiation(hit)
- local h = hit.Parent:findFirstChild("Humanoid")
- local DAMAGE = 10
- if h~=nil then
- h.WalkSpeed = 5
- h.Parent["Right Leg"]:Destroy()
- h.Parent["Left Arm"]:Destroy()
- for i =1,h.MaxHealth do
- h.Health = h.Health - DAMAGE
- wait(1)
- end
- end
- end
- function unanchor (m)
- for _,i in pairs (m:GetChildren()) do
- if i:IsA("Part","Model","Union","WedgePart","CornerWedgePart") then
- -- i.Anchored = false
- local Fire = Instance.new("Fire")
- Fire.Parent = i
- Fire.Size = math.random(5,10)
- i.Material = "CorrodedMetal"
- i:BreakJoints()
- i.BrickColor = BrickColor.new(26)
- i.Touched:connect(radiation)
- else
- unanchor(i)
- end
- end
- end
- unanchor(game.Workspace)
- Sound.SoundId = "http://www.roblox.com/asset?id=2248511"
- Sound.PlaybackSpeed = 0.2
- Sound.Playing = true
- Sound.Volume = 10
- Model.Name = "Mushroom Cloud"
- Cloud1.Parent = Model
- Cloud1.Anchored = true
- Cloud1.CanCollide = false
- Cloud1.Locked = true
- Cloud1Mesh.Parent = Cloud1
- Cloud1Mesh.MeshType = "FileMesh"
- Cloud1Mesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
- Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(95,300,195) --1999
- Cloud2.Parent = Model
- Cloud2.Anchored = true
- Cloud2.CanCollide = false
- Cloud2.Locked = true
- Cloud2.Position = Cloud2.Position + Vector3.new(0,587,0)
- Cloud2Mesh.Parent = Cloud2
- Cloud2Mesh.MeshType = "FileMesh"
- Cloud2Mesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
- Cloud2Mesh.Scale = Cloud2Mesh.Scale + Vector3.new(399,399,649)
- Cloud1.Transparency = CLOUD_TRANSPARENCY
- Cloud2.Transparency = CLOUD_TRANSPARENCY
- Cloud1.BrickColor = BrickColor.new(NUKE_COLOR)
- Cloud2.BrickColor = BrickColor.new(NUKE_COLOR)
- sky.Parent = game.Lighting
- sky.Name = "NukeSky"
- sky.CelestialBodiesShown = true
- sky.SkyboxBk = "http://www.roblox.com/asset/?version=1&id=1012890"
- sky.SkyboxDn = "http://www.roblox.com/asset/?version=1&id=1012891"
- sky.SkyboxFt = "http://www.roblox.com/asset/?version=1&id=1012887"
- sky.SkyboxLf = "http://www.roblox.com/asset/?version=1&id=1012889"
- sky.SkyboxRt = "http://www.roblox.com/asset/?version=1&id=1012888"
- sky.SkyboxUp = "http://www.roblox.com/asset/?version=1&id=1014449"
- explosion = Instance.new("Explosion")
- explosion.Parent = game.Workspace
- explosion.BlastRadius = 9999999999999
- explosion.BlastPressure = 10000000
- game.Lighting.Brightness = 999
- game.Lighting.OutdoorAmbient = Color3.new(1,0,0)
- wait (1) --Fireball
- Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --200
- wait (0.25)
- Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --400
- wait (0.25)
- Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --600
- wait (0.25)
- Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --800
- wait (0.25)
- Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --1000
- wait (0.25)
- Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --1200
- wait (0.25)
- Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --1400
- wait (0.25)
- Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,200,0) --1600
- wait (0.25)
- Cloud1Mesh.Scale = Cloud1Mesh.Scale + Vector3.new(0,100,0) --1700
- wait (30) --End phase of the nuke
- game.Lighting.Ambient = Color3.new(0,0,0)
- game.Lighting.OutdoorAmbient = Color3.new(127 / 255,127 / 255,127 / 255)
- sky:Destroy()
- game.Lighting.Brightness = 1
- Cloud1.BrickColor = BrickColor.new(1)
- Cloud2.BrickColor = BrickColor.new(1)
- Cloud1.Transparency = 0.6
- Cloud2.Transparency = 0.6
- wait (5)
- Cloud1.Transparency = 0.7
- Cloud2.Transparency = 0.7
- wait (5)
- Cloud1.Transparency = 0.8
- Cloud2.Transparency = 0.8
- wait (5)
- Cloud1.Transparency = 0.9
- Cloud2.Transparency = 0.9
- wait (120)
- Cloud1:Destroy()
- Cloud2:Destroy()
- --BrickColor codes: http://wiki.roblox.com/index.php?title=BrickColor_codes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement