Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- math.randomseed(tick())
- local plr = owner; local char = plr.Character;
- if not char then error("Your character does not exist.") end
- function writeToObject(name,value,typ)
- local stringV = Instance.new(typ.."Value")
- stringV.Name = name
- stringV.Value = value
- return stringV
- end
- local hum = char:FindFirstChildOfClass("Humanoid")
- plr.Chatted:connect(function(msg)
- local msg1 = msg:lower()
- if string.sub(msg1,1,6)=="/play "then
- local sub = string.sub(msg,7)
- ypcall(function()char.Humanoid:FindFirstChild("Sound"):Destroy()end)
- local sound = Instance.new("Sound",char.Humanoid)
- sound.SoundId = "rbxassetid://"..sub
- sound.Volume = "inf"
- sound.Loop = true
- sound:Play()
- end
- if string.sub(msg1,1,6)=="/time "then
- local sub = string.sub(msg,7)
- ypcall(function()char.Humanoid:FindFirstChild("Sound").TimePosition = sub end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement