Advertisement
antoniorigo4

Snowball Visualizer V1.0

Sep 9th, 2020 (edited)
723
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.46 KB | None | 0 0
  1. local player = owner
  2. local remote = Instance.new("RemoteEvent",player.Character)
  3. local ball = Instance.new("Part",player.Character)
  4. local weld = Instance.new("Weld",ball)
  5. local sound = Instance.new("Sound",player.Character.Head)
  6. player.Chatted:Connect(function(msg)
  7.     if msg:sub(1,5) == "/play" then
  8.         local victim = msg:sub(1,5)
  9.         local soundid = string.gsub(msg,victim,"")
  10.         sound.SoundId = "rbxassetid://"..soundid
  11.         sound:Play()
  12.     elseif msg:sub(1,5) == "/stop" then
  13.         sound:Stop()
  14.     end
  15. end)
  16. ball.Size =Vector3.new(2,2,2)
  17. weld.Part0 = ball
  18. weld.Part1 = player.Character.Head
  19. weld.C0 = CFrame.new(0,-2,0)
  20. local mesh = Instance.new("SpecialMesh",ball)
  21. mesh.MeshType = Enum.MeshType.Sphere
  22. ball.Shape = "Ball"
  23. ball.Material = Enum.Material.Grass
  24. ball.Color = Color3.fromRGB(250,250,250)
  25. --local particle = Instance.new("ParticleEmitter",ball)
  26. --particle.Texture = "rbxassetid://138994719"
  27. remote.OnServerEvent:Connect(function(plr,loud)
  28.     local particle = Instance.new("ParticleEmitter",ball)
  29. particle.Texture = "rbxassetid://138994719"
  30. particle.Rate = NumberRange.new((loud*0.05)*6)
  31.     particle.Speed = NumberRange.new((loud*0.05)*5)
  32.     mesh.Scale = Vector3.new((loud*0.02)+0.1,(loud*0.02)+0.1,(loud*0.02)+0.1)  
  33. end)
  34. NLS([[
  35. local player = game:GetService("Players").LocalPlayer
  36. local remote = player.Character.RemoteEvent
  37. local sound = player.Character.Head.Sound
  38. while true do wait()
  39. remote:FireServer(sound.PlaybackLoudness)
  40. end
  41. ]],player.Character)
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement