local teleportPart = script.Parent
local destination = workspace.TeleportPoint.Position
teleportPart.Touched:Connect(function(hit)
local character = hit.Parent
local hrp = character:FindFirstChild("HumanoidRootPart")
if hrp then
hrp.CFrame = CFrame.new(destination)
end
end)local clickPart = script.Parent
local destination = workspace.TeleportTarget.Position
clickPart.ClickDetector.MouseClick:Connect(function(player)
local character = player.Character
local hrp = character and character:FindFirstChild("HumanoidRootPart")
if hrp then
hrp.CFrame = CFrame.new(destination)
end
end)local prompt = script.Parent.ProximityPrompt
local target = workspace.TeleportHere
prompt.Triggered:Connect(function(player)
local char = player.Character
local hrp = char and char:FindFirstChild("HumanoidRootPart")
if hrp then
hrp.CFrame = CFrame.new(target.Position)
end
end)local prompt = script.Parent.ProximityPrompt
local target = workspace.SafeZone.Position
local password = "вставь имя игрока"
prompt.Triggered:Connect(function(player)
if player.Name == password then
local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
if hrp then
hrp.CFrame = CFrame.new(target)
end
else
warn("Доступ запрещён!")
end
end)local part = script.Parent
local destination = workspace.TeleEnd.Position
part.Touched:Connect(function(hit)
local hrp = hit.Parent:FindFirstChild("HumanoidRootPart")
if hrp then
wait(1)
hrp.CFrame = CFrame.new(destination)
end
end)