Advertisement
PR0J3CT11

Untitled

Jul 29th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. math.randomseed(tick())
  2. local plr = owner; local char = plr.Character;
  3. if not char then error("Your character does not exist.") end
  4. function writeToObject(name,value,typ)
  5. local stringV = Instance.new(typ.."Value")
  6. stringV.Name = name
  7. stringV.Value = value
  8. return stringV
  9. end
  10. local hum = char:FindFirstChildOfClass("Humanoid")
  11. plr.Chatted:connect(function(msg)
  12. local msg1 = msg:lower()
  13. if string.sub(msg1,1,6)=="/play "then
  14. local sub = string.sub(msg,7)
  15. ypcall(function()char.Humanoid:FindFirstChild("Sound"):Destroy()end)
  16. local sound = Instance.new("Sound",char.Humanoid)
  17. sound.SoundId = "rbxassetid://"..sub
  18. sound.Volume = "inf"
  19. sound.Looped = true
  20. sound:Play()
  21. end
  22. if string.sub(msg1,1,6)=="/time "then
  23. local sub = string.sub(msg,7)
  24. ypcall(function()char.Humanoid:FindFirstChild("Sound").TimePosition = sub end)
  25. end
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement