Quick actions

cmd+k|ctrl+k

Navigation

Languages

Music player

Snippet info

Language

Lua

Visibility

public

Author

ghast

Created

2020-06-03T08:54:03Z

Updated

2020-07-29T15:23:50Z

plr = owner
char = plr.Character
hed = char["Head"]

sound = Instance.new('Sound',hed)
sound.SoundId = "rbxassetid://4407929531"
sound.Looped = true
sound.Volume = 4
sound.MaxDistance = 100
sound:Play()

plr.Chatted:connect(function(m)
    if m:match(">pl%s%d+") then
        sound:Stop()
        sound.SoundId = "rbxassetid://"..m:match(">pl%s(%d+)")
        sound:Play()
        sound.TimePosition = 0
    elseif m:match(">depth%s%d+") then
         effect.Depth = m:match(">depth%s(%d+)")
   end
end)

while true do 
    wait()
    print(sound.TimePosition)
end
INFO