Advertisement
Pukaciu

random blocks

Aug 20th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. -- // Variables //--
  2. local player = game.Players.LocalPlayer
  3. local mouse = player:GetMouse()
  4.  
  5. -- // Music // --
  6. local Music = Instance.new("Sound", game.Workspace)
  7. Music.SoundId = "rbxassetid://131154740"
  8. Music.Volume = 10
  9. Music.Looped = true
  10. Music:Play()
  11.  
  12. -- // Events // --
  13.  
  14. mouse.KeyDown:connect(function(key)
  15. if key == "q" then
  16. local part = Instance.new("Part", workspace)
  17. part.Name = "Brick"
  18. part.BrickColor = BrickColor: "Lime green"
  19. part.Material = Neon
  20. part.Scale = Vector3.new(2,2,2)
  21. while wait() do
  22. part.BrickColor = BrickColor.Random()
  23. end
  24. elseif key == "e" then
  25. for i, v in pairs(workspace:GetChildren()) do
  26. if v:IsA "Part" and v.Name == "Brick" then
  27. v:remove()
  28. end
  29. end
  30. end
  31. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement