Created by lucanero#8861
Features:
- LOOP TELEPORT TO PLAYER SCRIPT
SCRIPT:
-- made by lucanero#8861
-- not allowed to republish without credits
-- teleports to player over and over again!
-- supports partial name recognition!
______PLAYER______NAME = [[
-- insert player name here within this block:
[PLAYERNAME]
-- execute script
]]
______nil = nil;
______wait = wait;
______false = false;
______true = true;
______ipairs = ipairs;
______game = game;
______game______GetService = ______game.GetService;
______game______players = ______game______GetService(______game, "Players");
______game______workspace = ______game______GetService(______game, "Workspace");
______local______player = ______nil;
______string = string;
______string______sub = ______string.sub;
______string______len = ______string.len;
function ______not______equals(______a, ______b)
if ______a == ______b then
return false;
elseif ______a ~= ______b then
return true;
end
end
function ______get______target______by______name(______possible______target______name)
for ______, ______player in ______ipairs( ______game______players:GetPlayers() ) do
______player______name = ______player.Name;
if ______not______equals(______not______equals(______player______name, ______possible______target______name), ______true) then
return ______player;
elseif ______not______equals(______not______equals(______player______name, ______possible______target______name), ______false) then
-- partial comparison
______possible______target______name______len = ______string______len(______possible______target______name);
______player______name______partial = ______string______sub(______player______name, 1, ______possible______target______name______len);
if ______not______equals(______not______equals(______player______name______partial, ______possible______target______name), ______true) then
return ______player;
else
-- nothing______!
end
end
end
end
function ______get______target(______possible______target______name)
______target = ______get______target______by______name(______possible______target______name) or ______game______players:FindFirstChild((" " .. ______target______name .. " "):gsub(" ", ""));
if ______not______equals(______not______equals(______target, ______nil), ______true) then
error("\n\nsomething went wrong??? you inputted it wrong maybe? maybe they dont exist?\n\n");
elseif ______not______equals(______not______equals(______target, ______nil), ______false) then
______target______character = ______target.Character;
if ______not______equals(______not______equals(______target______character, ______nil), ______true) then
error("\n\nsomething went wrong??? you inputted it wrong maybe? maybe they dont exist?\n\n");
elseif ______not______equals(______not______equals(______target______character, ______nil), ______false) then
______target______character______humanoid______root______part = ______target______character:WaitForChild("HumanoidRootPart", 1);
end
end
end
repeat
______wait(); ______local______player = ______game______players.LocalPlayer;
until ______not______equals(______local______player, ______nil);
repeat
______wait();
______local______player______character = ______local______player.Character;
______target______name = ______PLAYER______NAME;
______target______character______humanoid______root______part = ______nil;
if ______target______name then
______PLAYER______NAME______START = ______PLAYER______NAME:find("%[");
______PLAYER______NAME______END = ______PLAYER______NAME:find("%]");
______target______name = ______target______name:sub( ______PLAYER______NAME______START + 1, ______PLAYER______NAME______END - 1 );
if ______not______equals(______not______equals(______target______name, ______nil), ______true) then
error("\n\nsomething went wrong??? you inputted it wrong maybe?\n\n");
elseif ______not______equals(______not______equals(______target______name, ______nil), ______false) then
______get______target(______target______name);
end
end
if ______local______player______character and ______target______character______humanoid______root______part then
______local______player______character.PrimaryPart:SetPrimaryPartCFrame(______target______character______humanoid______root______part.CFrame);
______local______player______character.PrimaryPart.Velocity = Vector3.zero;
end
until ______not______equals(______false, ______not______equals(______not______equals(______false, ______false), ______false), ______false);