Advertisement
Baldeagle22

box

Sep 10th, 2018
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.05 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. -----script By NewBleuguy On Youtube--------
  88. function sandbox(var,func)
  89. local env = getfenv(func)
  90. local newenv = setmetatable({},{
  91. __index = function(self,k)
  92. if k=="script" then
  93. return var
  94. else
  95. return env[k]
  96. end
  97. end,
  98. })
  99. setfenv(func,newenv)
  100. return func
  101. end
  102. cors = {}
  103. mas = Instance.new("Model",game:GetService("Lighting"))
  104. Model0 = Instance.new("Model")
  105. Part1 = Instance.new("Part")
  106. SpecialMesh2 = Instance.new("SpecialMesh")
  107. Script3 = Instance.new("Script")
  108. Weld4 = Instance.new("Weld")
  109. Script5 = Instance.new("Script")
  110. Sound6 = Instance.new("Sound")
  111. Sound7 = Instance.new("Sound")
  112. Sound8 = Instance.new("Sound")
  113. Script9 = Instance.new("Script")
  114. Sound10 = Instance.new("Sound")
  115. Script11 = Instance.new("Script")
  116. Sound12 = Instance.new("Sound")
  117. Sound13 = Instance.new("Sound")
  118. Sound14 = Instance.new("Sound")
  119. Model0.Name = "Advanced Thunderstorm Simulator"
  120. Model0.Parent = mas
  121. Part1.Name = "Head"
  122. Part1.Parent = Model0
  123. Part1.BrickColor = BrickColor.new("Dark stone grey")
  124. Part1.Rotation = Vector3.new(0, -90, 0)
  125. Part1.Anchored = true
  126. Part1.Locked = true
  127. Part1.Size = Vector3.new(2, 1.20000005, 2)
  128. Part1.CFrame = CFrame.new(-8, 0.600001991, -12, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  129. Part1.BottomSurface = Enum.SurfaceType.Smooth
  130. Part1.TopSurface = Enum.SurfaceType.Smooth
  131. Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
  132. Part1.Position = Vector3.new(-8, 0.600001991, -12)
  133. Part1.Orientation = Vector3.new(0, -90, 0)
  134. Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
  135. SpecialMesh2.Parent = Part1
  136. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=1527559"
  137. SpecialMesh2.Scale = Vector3.new(-3500, -3500, -3500)
  138. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=1529460"
  139. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  140. SpecialMesh2.Scale = Vector3.new(-3500, -3500, -3500)
  141. Script3.Name = "Spin"
  142. Script3.Parent = Part1
  143. table.insert(cors,sandbox(Script3,function()
  144. -- This script rotates the storm meaning NO BREAKING like other stormclouds -Rayblon
  145. while true do --Infinite loop
  146. wait() --Needed or the game will crash! Put any number (in seconds) in between the ()'s
  147. 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.
  148. --(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!
  149. end --Ends the "while true do"
  150.  
  151. end))
  152. Weld4.Parent = Script3
  153. Script5.Name = "Rayblons Rain Simulator"
  154. Script5.Parent = Model0
  155. table.insert(cors,sandbox(Script5,function()
  156. while true do
  157. wait() -- Lets the computer know that it can take it's time.
  158. script.Rain1:Play()
  159. wait(4)
  160. script.Rain2:play()
  161. wait(3)
  162. script.Rain3:play()
  163. wait(3)
  164.  
  165.  
  166. end
  167.  
  168. end))
  169. Sound6.Name = "Rain3"
  170. Sound6.Parent = Script5
  171. Sound6.Pitch = 0.5
  172. Sound6.SoundId = "http://www.roblox.com/asset/?id=11387922"
  173. Sound6.Volume = 1
  174. Sound7.Name = "Rain2"
  175. Sound7.Parent = Script5
  176. Sound7.Pitch = 0.60000002384186
  177. Sound7.SoundId = "http://www.roblox.com/asset/?id=11387922"
  178. Sound7.Volume = 1
  179. Sound8.Name = "Rain1"
  180. Sound8.Parent = Script5
  181. Sound8.Pitch = 0.64999997615814
  182. Sound8.SoundId = "http://www.roblox.com/asset/?id=11387922"
  183. Sound8.Volume = 1
  184. Script9.Name = "Lightning/Thunder"
  185. Script9.Parent = Model0
  186. table.insert(cors,sandbox(Script9,function()
  187. while true do
  188. game.Lighting.Brightness = 0
  189. wait(0)
  190. game.Lighting.Brightness = 9999999 -- This is the flash from the lightning.
  191. wait(0)
  192. game.Lighting.Brightness = 0 -- this makes it dark during the lightning flashes!
  193. wait(0)
  194. game.Lighting.Brightness = 9999999
  195. wait(0) --this is the wait between the flashes and darkness.
  196. game.Lighting.Brightness = 0
  197. wait(0)
  198. game.Lighting.Brightness = 9999999
  199. wait(0)
  200. game.Lighting.Brightness = 0
  201. wait(7) -- How long it takes for the thunder to sound.
  202. script.Sound:Play()
  203. print("BOOM!!")
  204. wait(5) -- The wait between the thunder and next lightning strike
  205. game.Lighting.Brightness = 0
  206. wait(0)
  207. game.Lighting.Brightness = 9999999
  208. wait(0)
  209. game.Lighting.Brightness = 0
  210. wait(0)
  211. game.Lighting.Brightness = 9999999
  212. wait(0)
  213. game.Lighting.Brightness = 0
  214. wait(0)
  215. game.Lighting.Brightness = 9999999
  216. wait(0)
  217. game.Lighting.Brightness = 0
  218. wait(10)
  219. script.Sound:Play()
  220. print("BOOM!!")
  221. wait(20)
  222. game.Lighting.Brightness = 0
  223. wait(0)
  224. game.Lighting.Brightness = 9999999
  225. wait(0)
  226. game.Lighting.Brightness = 0
  227. wait(0)
  228. game.Lighting.Brightness = 9999999
  229. wait(0)
  230. game.Lighting.Brightness = 0
  231. wait(0)
  232. game.Lighting.Brightness = 9999999
  233. wait(0)
  234. game.Lighting.Brightness = 0
  235. wait(7)
  236. script.Sound:Play()
  237. print("BOOM!!")
  238. wait(5)
  239. game.Lighting.Brightness = 0
  240. wait(0)
  241. game.Lighting.Brightness = 9999999
  242. wait(0)
  243. game.Lighting.Brightness = 0
  244. wait(0)
  245. game.Lighting.Brightness = 9999999
  246. wait(0)
  247. game.Lighting.Brightness = 0
  248. wait(0)
  249. game.Lighting.Brightness = 9999999
  250. wait(0)
  251. game.Lighting.Brightness = 0
  252. wait(1)
  253. script.Sound:Play()
  254. print("BOOM!!")
  255. wait(0)
  256. game.Lighting.Brightness = 0
  257. wait(0)
  258. game.Lighting.Brightness = 9999999
  259. wait(0)
  260. game.Lighting.Brightness = 0
  261. wait(0)
  262. game.Lighting.Brightness = 9999999
  263. wait(0)
  264. game.Lighting.Brightness = 0
  265. wait(0)
  266. game.Lighting.Brightness = 9999999
  267. wait(0)
  268. game.Lighting.Brightness = 0
  269. wait(1)
  270. script.Sound:Play()
  271. print("BOOM!!")
  272. wait(0)
  273. game.Lighting.Brightness = 0
  274. wait(0)
  275. game.Lighting.Brightness = 9999999
  276. wait(0)
  277. game.Lighting.Brightness = 0
  278. wait(0)
  279. game.Lighting.Brightness = 9999999
  280. wait(0)
  281. game.Lighting.Brightness = 0
  282. wait(0)
  283. game.Lighting.Brightness = 9999999
  284. wait(0)
  285. game.Lighting.Brightness = 0
  286. wait(1)
  287. script.Sound:Play()
  288. print("BOOM!!")
  289. wait(0)
  290. game.Lighting.Brightness = 0
  291. wait(0)
  292. game.Lighting.Brightness = 9999999
  293. wait(0)
  294. game.Lighting.Brightness = 0
  295. wait(0)
  296. game.Lighting.Brightness = 9999999
  297. wait(0)
  298. game.Lighting.Brightness = 0
  299. wait(0)
  300. game.Lighting.Brightness = 9999999
  301. wait(0)
  302. game.Lighting.Brightness = 0
  303. wait(7)
  304. script.Sound:Play()
  305. print("BOOM!!")
  306. wait(5)
  307. end -- This ends the script
  308. end))
  309. Sound10.Parent = Script9
  310. Sound10.Pitch = 0.5
  311. Sound10.SoundId = "http://www.roblox.com/asset/?id=12222030"
  312. Sound10.Volume = 1
  313. Script11.Name = "Rayblons Wind Simulator"
  314. Script11.Parent = Model0
  315. table.insert(cors,sandbox(Script11,function()
  316. while true do
  317. wait() -- Lets the computer know that it can take it's time.
  318. script.Rain1:Play()
  319. wait(2)
  320. script.Rain2:play()
  321. wait(2)
  322. script.Rain3:play()
  323. wait(2)
  324.  
  325.  
  326. end
  327.  
  328. end))
  329. Sound12.Name = "Rain3"
  330. Sound12.Parent = Script11
  331. Sound12.Pitch = 0.25
  332. Sound12.SoundId = "http://www.roblox.com/asset/?id=18435238"
  333. Sound12.Volume = 0.30000001192093
  334. Sound13.Name = "Rain2"
  335. Sound13.Parent = Script11
  336. Sound13.Pitch = 0.40000000596046
  337. Sound13.SoundId = "http://www.roblox.com/asset/?id=18435238"
  338. Sound13.Volume = 0.40000000596046
  339. Sound14.Name = "Rain1"
  340. Sound14.Parent = Script11
  341. Sound14.Pitch = 0.30000001192093
  342. Sound14.SoundId = "http://www.roblox.com/asset/?id=18435238"
  343. Sound14.Volume = 0.20000000298023
  344. for i,v in pairs(mas:GetChildren()) do
  345. v.Parent = workspace
  346. pcall(function() v:MakeJoints() end)
  347. end
  348. mas:Destroy()
  349. for i,v in pairs(cors) do
  350. spawn(function()
  351. pcall(v)
  352. end)
  353. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement