Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function findPlayer(name)
- for i, player in pairs(game.Players:GetPlayers()) do
- if string.find(string.lower(player.Name), string.lower(name)) then
- return player
- end
- end
- return nil
- end
- local prefix = "//"
- game.Players.LocalPlayer.Chatted:Connect(function(msg)
- local cmd = string.lower(msg)
- local args = string.split(cmd, " ")
- if args[1] == prefix .. "setprefix" and args[2] ~= nil then
- prefix = tostring(args[2])
- elseif args[1] == prefix .. "to" and args[2] ~= nil then
- local plr = findPlayer(args[2])
- if plr ~= nil then
- game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart").CFrame = plr.Character:WaitForChild("HumanoidRootPart").CFrame
- else
- print('nicKadmiN | Nil player.')
- end
- end
- end)
Add Comment
Please, Sign In to add comment