LuaExploitz

Weather

Oct 3rd, 2016
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.61 KB | None | 0 0
  1. --By Chromium
  2. --I made this script to troll in games :P
  3.  
  4. l = game.Lighting
  5. l.TimeOfDay = 1
  6. l.FogEnd = 100
  7. game.Lighting.Ambient = Color3.new(0,0,0)
  8. l.Brightness = 0.1
  9.  
  10. s=Instance.new'Sound';
  11. s.Parent=workspace;
  12. s.SoundId='rbxassetid://376019028';
  13. s.Pitch=1;
  14. s.Volume=1;
  15. s.Looped=true;
  16. s:play();
  17.  
  18. wait(0.1)
  19.  
  20.  
  21. s=Instance.new'Sound';
  22. s.Parent=workspace;
  23. s.SoundId='rbxassetid://376019028';
  24. s.Pitch=1;
  25. s.Volume=1;
  26. s.Looped=true;
  27. s:play();
  28.  
  29. wait(0.1)
  30.  
  31. s=Instance.new'Sound';
  32. s.Parent=workspace;
  33. s.SoundId='rbxassetid://163474903';
  34. s.Pitch=1;
  35. s.Volume=1;
  36. s.Looped=true;
  37. s:play();
  38.  
  39.  
  40. wait(0.1)
  41. local colors = {
  42.     BrickColor.new("White"),
  43.     BrickColor.new("White"),
  44.     BrickColor.new("Really black"),
  45.     BrickColor.new("Really black"),
  46. }
  47. for i = 1, 1200 do
  48.     local p = Instance.new("Part",workspace)
  49.     p.Anchored = true
  50.     p.Size = Vector3.new( math.random(10, 160), math.random(4,60), math.random(10, 160) )
  51.     p.CFrame = CFrame.new( math.random(-1700, 1700), math.random(710, 2500), math.random(-1700, 1700) )
  52.     p.CanCollide = false
  53.     p.TopSurface = 0
  54.     p.BottomSurface = 0
  55.     p.BrickColor = colors[math.random(1,#colors)]
  56.    
  57.     if i%20 == 0 then
  58.    
  59.         local currentpos = Vector3.new( math.random(-1700, 1700), math.random(710, 2500), math.random(-1700, 1700) )
  60.         local frompos = currentpos
  61.         local targetpos = Vector3.new( math.random(-1700, 1700), math.random(710, 2500), math.random(-1700, 1700) )
  62.        
  63.         local rotation = 0
  64.        
  65.         local speed = math.random()*1.5+0.1
  66.         local rotspeed = ( math.random() - 0.5 ) * 2 * 2.5
  67.         local factor = 0
  68.        
  69.         p.CFrame = CFrame.new(currentpos)
  70.        
  71.         local dist = (frompos - targetpos).magnitude
  72.        
  73.         local loop = function()
  74.             rotation = rotation + rotspeed
  75.             if rotation > 180 then rotation = rotation - 360 end
  76.             if rotation < -180 then rotation = rotation + 360 end
  77.            
  78.             factor = factor + speed / dist
  79.             if factor > 1 then
  80.                 factor = 0
  81.                 targetpos = Vector3.new( math.random(-1700, 1700), math.random(710, 2500), math.random(-1700, 1700) )
  82.                 frompos = currentpos
  83.                 dist = (frompos - targetpos).magnitude
  84.                 rotspeed = ( math.random() - 0.5 ) * 2 * 3
  85.             end
  86.            
  87.             currentpos = frompos:Lerp(targetpos, factor)
  88.             p.CFrame = CFrame.new(currentpos) * CFrame.Angles( 0, math.rad(rotation), 0 )
  89.         end
  90.         game:service("RunService").Stepped:connect(loop)
  91.        
  92.     end
  93. end
  94. wait(0.1)
  95.  
  96. script.Name = "Lol Derp"
  97.     local bright = game.Lighting.Brightness
  98.      
  99.     function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
  100.     part.Parent = parent
  101.     part.formFactor = form
  102.     part.CanCollide = collide
  103.     part.Transparency = tran
  104.     part.Material = 'Neon'
  105.     part.Reflectance = ref
  106.     part.Size = Vector3.new(x,y,z)
  107.     part.BrickColor = BrickColor.new(color)
  108.     part.TopSurface = 0
  109.     part.BottomSurface = 0
  110.     part.Anchored = anchor
  111.     part.Locked = true
  112.     part:BreakJoints()
  113.     end
  114.      
  115.      
  116.     function thunder(pos)
  117.             local last = CFrame.new(pos)
  118.             local scale = 1
  119.             local lights = {}
  120.             repeat
  121.                     local si = math.random(15,45)
  122.                     local p = Instance.new("Part")
  123.                     prop(p,workspace,true,0,0,5,si,5,"Institutional white",true,"Custom")
  124.                     p.CFrame = last * CFrame.new(0,-scale/2,0)
  125.                     p.CFrame = CFrame.new(p.Position) * CFrame.Angles(math.random(-120,120)/100,math.random(-30,30)/100,math.random(-120,120)/100) * CFrame.new(0,-si/2,0)
  126.                     last = p.CFrame
  127.                     scale = si
  128.                     table.insert(lights,p)
  129.             until last.y < 14
  130.             local ex = Instance.new("Explosion",workspace)
  131.             ex.BlastRadius = 22
  132.             ex.BlastPressure = 300000
  133.             ex.Position = last * CFrame.new(0,-scale/2,0).p
  134.             local pew = Instance.new("Sound",workspace)
  135.             pew.SoundId = "rbxasset://sounds\HalloweenLightning.wav"
  136.             pew.Volume = math.random(70,110)/100
  137.             pew.Pitch = math.random(85,120)/100
  138.             coroutine.resume(coroutine.create(function()
  139.                     for i=1,math.random(5,25) do
  140.                             if game.Lighting.Brightness == bright then
  141.                                     game.Lighting.Brightness = 9999
  142.                             else
  143.                                     game.Lighting.Brightness = bright
  144.                             end
  145.                             wait()
  146.                     end
  147.                     game.Lighting.Brightness = bright
  148.             end))
  149.             wait(0.05)
  150.             pew:play()
  151.             wait(math.random(10,80)/100)
  152.             ex:remove()
  153.             for _,v in pairs(lights) do
  154.                     coroutine.resume(coroutine.create(function()
  155.                             for i=0,1,0.25 do
  156.                                     wait()
  157.                                     v.Transparency = i
  158.                             end
  159.                             v:remove()
  160.                     end))
  161.             end
  162.     end
  163.      
  164.     while true do
  165.             wait(math.random(1,300)/100)
  166.             coroutine.resume(coroutine.create(function()
  167.                     thunder(Vector3.new(math.random(-250,250),math.random(700,1000),math.random(-250,250)))
  168.             end))
  169.     end
  170.  
  171. while true do
  172. wait(0.01)
  173. c = Instance.new("Part")
  174. c.Position = Vector3.new(math.random(-100,100),math.random(0,50),math.random(-100,100))
  175. c.Transparency = 0.5
  176. c.Reflectance = 0
  177. c.Size = Vector3.new(0.5, 0.5, 0.5)
  178. c.BrickColor = BrickColor.new(23)
  179. c.CanCollide = true
  180. c.Locked = true
  181. c.Anchored = false
  182. c.Shape = 0
  183. c.Parent = game.Workspace
  184. end
Add Comment
Please, Sign In to add comment