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
- -----script By NewBleuguy On Youtube--------
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Script3 = Instance.new("Script")
- Weld4 = Instance.new("Weld")
- Script5 = Instance.new("Script")
- Sound6 = Instance.new("Sound")
- Sound7 = Instance.new("Sound")
- Sound8 = Instance.new("Sound")
- Script9 = Instance.new("Script")
- Sound10 = Instance.new("Sound")
- Script11 = Instance.new("Script")
- Sound12 = Instance.new("Sound")
- Sound13 = Instance.new("Sound")
- Sound14 = Instance.new("Sound")
- Model0.Name = "Advanced Thunderstorm Simulator"
- Model0.Parent = mas
- Part1.Name = "Head"
- Part1.Parent = Model0
- Part1.BrickColor = BrickColor.new("Dark stone grey")
- Part1.Rotation = Vector3.new(0, -90, 0)
- Part1.Anchored = true
- Part1.Locked = true
- Part1.Size = Vector3.new(2, 1.20000005, 2)
- Part1.CFrame = CFrame.new(-8, 0.600001991, -12, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part1.Position = Vector3.new(-8, 0.600001991, -12)
- Part1.Orientation = Vector3.new(0, -90, 0)
- Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=1527559"
- SpecialMesh2.Scale = Vector3.new(-3500, -3500, -3500)
- SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=1529460"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- SpecialMesh2.Scale = Vector3.new(-3500, -3500, -3500)
- Script3.Name = "Spin"
- Script3.Parent = Part1
- table.insert(cors,sandbox(Script3,function()
- -- This script rotates the storm meaning NO BREAKING like other stormclouds -Rayblon
- while true do --Infinite loop
- wait() --Needed or the game will crash! Put any number (in seconds) in between the ()'s
- script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, math.pi/100, 0) --Rotates the brick. Change the numbers for how fast/slow the brick rotates.
- --(continued from last line) The higher, the slower. The lower, the faster. Change the 0's to "math.pi/number." Make sure the number ISN'T 0!
- end --Ends the "while true do"
- end))
- Weld4.Parent = Script3
- Script5.Name = "Rayblons Rain Simulator"
- Script5.Parent = Model0
- table.insert(cors,sandbox(Script5,function()
- while true do
- wait() -- Lets the computer know that it can take it's time.
- script.Rain1:Play()
- wait(4)
- script.Rain2:play()
- wait(3)
- script.Rain3:play()
- wait(3)
- end
- end))
- Sound6.Name = "Rain3"
- Sound6.Parent = Script5
- Sound6.Pitch = 0.5
- Sound6.SoundId = "http://www.roblox.com/asset/?id=11387922"
- Sound6.Volume = 1
- Sound7.Name = "Rain2"
- Sound7.Parent = Script5
- Sound7.Pitch = 0.60000002384186
- Sound7.SoundId = "http://www.roblox.com/asset/?id=11387922"
- Sound7.Volume = 1
- Sound8.Name = "Rain1"
- Sound8.Parent = Script5
- Sound8.Pitch = 0.64999997615814
- Sound8.SoundId = "http://www.roblox.com/asset/?id=11387922"
- Sound8.Volume = 1
- Script9.Name = "Lightning/Thunder"
- Script9.Parent = Model0
- table.insert(cors,sandbox(Script9,function()
- while true do
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999 -- This is the flash from the lightning.
- wait(0)
- game.Lighting.Brightness = 0 -- this makes it dark during the lightning flashes!
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0) --this is the wait between the flashes and darkness.
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(7) -- How long it takes for the thunder to sound.
- script.Sound:Play()
- print("BOOM!!")
- wait(5) -- The wait between the thunder and next lightning strike
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(10)
- script.Sound:Play()
- print("BOOM!!")
- wait(20)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(7)
- script.Sound:Play()
- print("BOOM!!")
- wait(5)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(1)
- script.Sound:Play()
- print("BOOM!!")
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(1)
- script.Sound:Play()
- print("BOOM!!")
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(1)
- script.Sound:Play()
- print("BOOM!!")
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(0)
- game.Lighting.Brightness = 9999999
- wait(0)
- game.Lighting.Brightness = 0
- wait(7)
- script.Sound:Play()
- print("BOOM!!")
- wait(5)
- end -- This ends the script
- end))
- Sound10.Parent = Script9
- Sound10.Pitch = 0.5
- Sound10.SoundId = "http://www.roblox.com/asset/?id=12222030"
- Sound10.Volume = 1
- Script11.Name = "Rayblons Wind Simulator"
- Script11.Parent = Model0
- table.insert(cors,sandbox(Script11,function()
- while true do
- wait() -- Lets the computer know that it can take it's time.
- script.Rain1:Play()
- wait(2)
- script.Rain2:play()
- wait(2)
- script.Rain3:play()
- wait(2)
- end
- end))
- Sound12.Name = "Rain3"
- Sound12.Parent = Script11
- Sound12.Pitch = 0.25
- Sound12.SoundId = "http://www.roblox.com/asset/?id=18435238"
- Sound12.Volume = 0.30000001192093
- Sound13.Name = "Rain2"
- Sound13.Parent = Script11
- Sound13.Pitch = 0.40000000596046
- Sound13.SoundId = "http://www.roblox.com/asset/?id=18435238"
- Sound13.Volume = 0.40000000596046
- Sound14.Name = "Rain1"
- Sound14.Parent = Script11
- Sound14.Pitch = 0.30000001192093
- Sound14.SoundId = "http://www.roblox.com/asset/?id=18435238"
- Sound14.Volume = 0.20000000298023
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement