View difference between Paste ID: tcMKp55F and GjKVLZCD
SHOW: | | - or go back to the newest paste.
1
2
--https://github.com/Mokiros/roblox-FE-compatibility
3
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
4
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
5
local RealPlayer = Player
6
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
7
8
wait(10)
9
-----script By NewBleuguy On Youtube--------
10
function sandbox(var,func)
11
	local env = getfenv(func)
12
	local newenv = setmetatable({},{
13
		__index = function(self,k)
14
			if k=="script" then
15
				return var
16
			else
17
				return env[k]
18
			end
19
		end,
20
	})
21
	setfenv(func,newenv)
22
	return func
23
end
24
cors = {}
25
mas = Instance.new("Model",game:GetService("Lighting"))
26
Model0 = Instance.new("Model")
27
Part1 = Instance.new("Part")
28
SpecialMesh2 = Instance.new("SpecialMesh")
29
Script3 = Instance.new("Script")
30
Weld4 = Instance.new("Weld")
31
Script5 = Instance.new("Script")
32
Sound6 = Instance.new("Sound")
33
Sound7 = Instance.new("Sound")
34
Sound8 = Instance.new("Sound")
35
Script9 = Instance.new("Script")
36
Sound10 = Instance.new("Sound")
37
Script11 = Instance.new("Script")
38
Sound12 = Instance.new("Sound")
39
Sound13 = Instance.new("Sound")
40
Sound14 = Instance.new("Sound")
41
Model0.Name = "Advanced Thunderstorm Simulator"
42
Model0.Parent = mas
43
Part1.Name = "Head"
44
Part1.Parent = Model0
45
Part1.BrickColor = BrickColor.new("Dark stone grey")
46
Part1.Rotation = Vector3.new(0, -90, 0)
47
Part1.Anchored = true
48
Part1.Locked = true
49
Part1.Size = Vector3.new(2, 1.20000005, 2)
50
Part1.CFrame = CFrame.new(-8, 0.600001991, -12, 0, 0, -1, 0, 1, 0, 1, 0, 0)
51
Part1.BottomSurface = Enum.SurfaceType.Smooth
52
Part1.TopSurface = Enum.SurfaceType.Smooth
53
Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
54
Part1.Position = Vector3.new(-8, 0.600001991, -12)
55
Part1.Orientation = Vector3.new(0, -90, 0)
56
Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
57
SpecialMesh2.Parent = Part1
58
SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=1527559"
59
SpecialMesh2.Scale = Vector3.new(-3500, -3500, -3500)
60
SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=1529460"
61
SpecialMesh2.MeshType = Enum.MeshType.FileMesh
62
SpecialMesh2.Scale = Vector3.new(-3500, -3500, -3500)
63
Script3.Name = "Spin"
64
Script3.Parent = Part1
65
table.insert(cors,sandbox(Script3,function()
66
-- This script rotates the storm meaning NO BREAKING like other stormclouds -Rayblon
67
while true do --Infinite loop
68
wait() --Needed or the game will crash! Put any number (in seconds) in between the ()'s
69
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.
70
--(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!
71
end --Ends the "while true do"
72
73
end))
74
Weld4.Parent = Script3
75
Script5.Name = "Rayblons Rain Simulator"
76
Script5.Parent = Model0
77
table.insert(cors,sandbox(Script5,function()
78
while true do
79
wait() -- Lets the computer know that it can take it's time.
80
script.Rain1:Play()
81
wait(4)
82
script.Rain2:play()
83
wait(3)
84
script.Rain3:play()
85
wait(3)
86
87
88
end
89
90
end))
91
Sound6.Name = "Rain3"
92
Sound6.Parent = Script5
93
Sound6.Pitch = 0.5
94
Sound6.SoundId = "http://www.roblox.com/asset/?id=11387922"
95
Sound6.Volume = 1
96
Sound7.Name = "Rain2"
97
Sound7.Parent = Script5
98
Sound7.Pitch = 0.60000002384186
99
Sound7.SoundId = "http://www.roblox.com/asset/?id=11387922"
100
Sound7.Volume = 1
101
Sound8.Name = "Rain1"
102
Sound8.Parent = Script5
103
Sound8.Pitch = 0.64999997615814
104
Sound8.SoundId = "http://www.roblox.com/asset/?id=11387922"
105
Sound8.Volume = 1
106
Script9.Name = "Lightning/Thunder"
107
Script9.Parent = Model0
108
table.insert(cors,sandbox(Script9,function()
109
while true do
110
game.Lighting.Brightness = 0
111
wait(0)
112
game.Lighting.Brightness = 9999999 -- This is the flash from the lightning.
113
wait(0)
114
game.Lighting.Brightness = 0 -- this makes it dark during the lightning flashes!
115
wait(0)
116
game.Lighting.Brightness = 9999999
117
wait(0) --this is the wait between the flashes and darkness.
118
game.Lighting.Brightness = 0
119
wait(0)
120
game.Lighting.Brightness = 9999999
121
wait(0)
122
game.Lighting.Brightness = 0
123
wait(7) -- How long it takes for the thunder to sound.
124
script.Sound:Play()
125
print("BOOM!!")
126
wait(5) -- The wait between the thunder and next lightning strike
127
game.Lighting.Brightness = 0
128
wait(0)
129
game.Lighting.Brightness = 9999999
130
wait(0)
131
game.Lighting.Brightness = 0
132
wait(0)
133
game.Lighting.Brightness = 9999999
134
wait(0)
135
game.Lighting.Brightness = 0
136
wait(0)
137
game.Lighting.Brightness = 9999999
138
wait(0)
139
game.Lighting.Brightness = 0
140
wait(10)
141
script.Sound:Play()
142
print("BOOM!!")
143
wait(20)
144
game.Lighting.Brightness = 0
145
wait(0)
146
game.Lighting.Brightness = 9999999
147
wait(0)
148
game.Lighting.Brightness = 0
149
wait(0)
150
game.Lighting.Brightness = 9999999
151
wait(0)
152
game.Lighting.Brightness = 0
153
wait(0)
154
game.Lighting.Brightness = 9999999
155
wait(0)
156
game.Lighting.Brightness = 0
157
wait(7)
158
script.Sound:Play()
159
print("BOOM!!")
160
wait(5)
161
game.Lighting.Brightness = 0
162
wait(0)
163
game.Lighting.Brightness = 9999999
164
wait(0)
165
game.Lighting.Brightness = 0
166
wait(0)
167
game.Lighting.Brightness = 9999999
168
wait(0)
169
game.Lighting.Brightness = 0
170
wait(0)
171
game.Lighting.Brightness = 9999999
172
wait(0)
173
game.Lighting.Brightness = 0
174
wait(1)
175
script.Sound:Play()
176
print("BOOM!!")
177
wait(0)
178
game.Lighting.Brightness = 0
179
wait(0)
180
game.Lighting.Brightness = 9999999
181
wait(0)
182
game.Lighting.Brightness = 0
183
wait(0)
184
game.Lighting.Brightness = 9999999
185
wait(0)
186
game.Lighting.Brightness = 0
187
wait(0)
188
game.Lighting.Brightness = 9999999
189
wait(0)
190
game.Lighting.Brightness = 0
191
wait(1)
192
script.Sound:Play()
193
print("BOOM!!")
194
wait(0)
195
game.Lighting.Brightness = 0
196
wait(0)
197
game.Lighting.Brightness = 9999999
198
wait(0)
199
game.Lighting.Brightness = 0
200
wait(0)
201
game.Lighting.Brightness = 9999999
202
wait(0)
203
game.Lighting.Brightness = 0
204
wait(0)
205
game.Lighting.Brightness = 9999999
206
wait(0)
207
game.Lighting.Brightness = 0
208
wait(1)
209
script.Sound:Play()
210
print("BOOM!!")
211
wait(0)
212
game.Lighting.Brightness = 0
213
wait(0)
214
game.Lighting.Brightness = 9999999
215
wait(0)
216
game.Lighting.Brightness = 0
217
wait(0)
218
game.Lighting.Brightness = 9999999
219
wait(0)
220
game.Lighting.Brightness = 0
221
wait(0)
222
game.Lighting.Brightness = 9999999
223
wait(0)
224
game.Lighting.Brightness = 0
225
wait(7)
226
script.Sound:Play()
227
print("BOOM!!")
228
wait(5)
229
end -- This ends the script
230
end))
231
Sound10.Parent = Script9
232
Sound10.Pitch = 0.5
233
Sound10.SoundId = "http://www.roblox.com/asset/?id=12222030"
234
Sound10.Volume = 1
235
Script11.Name = "Rayblons Wind Simulator"
236
Script11.Parent = Model0
237
table.insert(cors,sandbox(Script11,function()
238
while true do
239
wait() -- Lets the computer know that it can take it's time.
240
script.Rain1:Play()
241
wait(2)
242
script.Rain2:play()
243
wait(2)
244
script.Rain3:play()
245
wait(2)
246
247
248
end
249
250
end))
251
Sound12.Name = "Rain3"
252
Sound12.Parent = Script11
253
Sound12.Pitch = 0.25
254
Sound12.SoundId = "http://www.roblox.com/asset/?id=18435238"
255
Sound12.Volume = 0.30000001192093
256
Sound13.Name = "Rain2"
257
Sound13.Parent = Script11
258
Sound13.Pitch = 0.40000000596046
259
Sound13.SoundId = "http://www.roblox.com/asset/?id=18435238"
260
Sound13.Volume = 0.40000000596046
261
Sound14.Name = "Rain1"
262
Sound14.Parent = Script11
263
Sound14.Pitch = 0.30000001192093
264
Sound14.SoundId = "http://www.roblox.com/asset/?id=18435238"
265
Sound14.Volume = 0.20000000298023
266
for i,v in pairs(mas:GetChildren()) do
267
	v.Parent = workspace
268
	pcall(function() v:MakeJoints() end)
269
end
270
mas:Destroy()
271
for i,v in pairs(cors) do
272
	spawn(function()
273
		pcall(v)
274
	end)
275
end