squidingtin

Tower Battles Music Script

Jan 8th, 2020
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.06 KB | None | 0 0
  1. -------------------------------------
  2. V = 2 --Volume.
  3. P = 1 --Pitch/Speed.
  4. S = 10 --Size.
  5. -------------------------------------
  6. Num = 0 --Number to start on (The highest number in your console)
  7. User = "Username" --You user, or who ever has the music.
  8. -------------------------------------
  9. Towers = workspace.Towers
  10.  
  11. Folder = Towers:FindFirstChild(User)
  12. if Folder == nil then
  13. F1 = Instance.new("Folder")
  14. F1.Name = User
  15. F1.Parent = Towers
  16. F2 = Instance.new("Folder")
  17. F2.Name = "Music"
  18. F2.Parent = F1
  19. else
  20. print("Running Again.")
  21. end
  22.  
  23.  
  24. while true do
  25. List = Towers:FindFirstChild(Num)
  26. wait(.5)
  27. Num = Num +1
  28.  
  29. if List == nil then
  30. print("Error")
  31. break  
  32. end
  33.  
  34. if List.Owner.Value.name == User then
  35.     print(List.Owner.Parent.name)
  36.     Music = List.Owner.Parent.Tower.Torso:FindFirstChild("Music")
  37.         if Music == nil then
  38.             List.Owner.Parent.Parent = F1
  39.         else
  40.            List.Owner.Parent.Parent = F2
  41.             Music.Volume = V
  42.             Music.PlaybackSpeed = P
  43.             Music.EmitterSize = S
  44.         end
  45.     else
  46.         print(List.Owner.Parent.name)
  47.     end
  48. end
Add Comment
Please, Sign In to add comment