ConTheKoala

Raining

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