Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = owner
- local sound = Instance.new("Sound",player.Character.Head)
- player.Chatted:Connect(function(msg)
- if msg:sub(1,5) == "/play" then
- local victim = msg:sub(1,5)
- local soundid = string.gsub(msg,victim,"")
- sound.SoundId = "rbxassetid://"..soundid
- sound:Play()
- elseif msg:sub(1,5) == "/stop" then
- sound:Stop()
- end
- end)
- local LOUDREMOTE = Instance.new("RemoteEvent",player.Character)
- local part1 = Instance.new("Part",player.Character)
- local part2 = Instance.new("Part",player.Character)
- part1.Anchored = true part2.Anchored = true
- part1.Position = Vector3.new(29, 7, 0) part2.Position = Vector3.new(9, 7, 0)
- local beam = Instance.new("Beam",part1)
- local a1 = Instance.new("Attachment",part1)
- local a2 = Instance.new("Attachment",part2)
- beam.Attachment0 = a1
- beam.Attachment1 = a2
- LOUDREMOTE.OnServerEvent:Connect(function(plr,loud)
- local randomnumber = math.random(13,19)
- beam.Width0 = (loud/math.random(50,75))
- beam.Width1 = (loud/math.random(45,80))
- beam.Color = ColorSequence.new(Color3.fromRGB(loud/randomnumber,loud/randomnumber,loud/randomnumber))
- end)
- game:GetService("RunService")
- NLS([[
- local player = game.Players.LocalPlayer
- local sound = player.Character.Head.Sound
- game:GetService("RunService").RenderStepped:Connect(function()
- player.Character.RemoteEvent:FireServer(sound.PlaybackLoudness)
- end)
- ]],player.Character)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement