SebTDZ

Rain

Jul 14th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.34 KB | None | 0 0
  1. function Drop(Position,Color)
  2.     local Drop = Instance.new("Part", workspace)
  3.     Drop.Name = "Drop"
  4.     Drop.Position = Position
  5.     Drop.Rotation = Vector3.new(0,0,90)
  6.     Drop.BrickColor = BrickColor.new(Color)
  7.     Drop.Size = Vector3.new(1,0.3,0.3)
  8.     Drop.Anchored = false
  9.     Drop.CanCollide = true
  10.     Drop.Shape = Enum.PartType.Cylinder
  11.     Drop.Transparency = 0.5
  12.    
  13.     Drop.Touched:Connect(function(TPart)
  14.         if Drop.Anchored == false then
  15.             Drop.Size = Vector3.new(0.3,3,3)
  16.             Drop.Rotation = Vector3.new(0,0,90)
  17.             wait(0.5)
  18.             Drop.Anchored = true
  19.             game.Debris:AddItem(Drop,60)
  20.         end
  21.     end)
  22. end
  23.  
  24. while true do
  25.     Drop(Vector3.new(math.random(-350,350),95,math.random(-350,350)),"Bright blue")
  26.     Drop(Vector3.new(math.random(-350,350),95,math.random(-350,350)),"Bright blue")
  27.     Drop(Vector3.new(math.random(-350,350),95,math.random(-350,350)),"Bright blue")
  28.     Drop(Vector3.new(math.random(-350,350),95,math.random(-350,350)),"Bright blue")
  29.     Drop(Vector3.new(math.random(-350,350),95,math.random(-350,350)),"Bright blue")
  30.     Drop(Vector3.new(math.random(-350,350),95,math.random(-350,350)),"Bright blue")
  31.     Drop(Vector3.new(math.random(-350,350),95,math.random(-350,350)),"Bright blue")
  32.     Drop(Vector3.new(math.random(-350,350),95,math.random(-350,350)),"Bright blue")
  33.     Drop(Vector3.new(math.random(-350,350),95,math.random(-350,350)),"Bright blue")
  34.     wait(0.1)
  35. end
Add Comment
Please, Sign In to add comment