function onChat(player, chat)
if chat:sub(1,9) == "teleport/" then
if player.Character:FindFirstChild("Torso") then
for _,v in pairs(game.Players:GetChildren()) do
if v.Name:sub(1, chat:sub(10):len()):lower() == chat:sub(10):lower() then
if v.Character:FindFirstChild("Torso") then
player.Character:MoveTo(v.Character.Torso.Position)
end
break
end
end
end
end
end
game.Players.PlayerAdded:connect(function(player)
if game:GetService("GamePassService"):PlayerHasPass(player, 174527407) then
player.Chatted:connect(function(chat)
onChat(player, chat)
end)
end
end)
Alright, I guess it was not easy to make. This has not been tested! All the comments of as to how the sections of the script work are in the script itself.
3 comments
Is this your entire script?
No
Actually, never mind, this is fairly easy. I'll make it.