
KeylessUniversal

-- Teleport to another player script
local player = game.Players.LocalPlayer
local userInputService = game:GetService("UserInputService")
local teleportKey = Enum.KeyCode.T -- Key to trigger teleport (T key)
local targetPlayer -- Variable to store the player to teleport to
-- Function to teleport the player to the target player's position
local function teleportToPlayer(targetPlayer)
if targetPlayer and targetPlayer.Character then
local targetHumanoidRootPart = targetPlayer.Character:WaitForChild("HumanoidRootPart")
local teleportPosition = targetHumanoidRootPart.Position
player.Character:SetPrimaryPartCFrame(CFrame.new(teleportPosition))
end
end
-- Function to select a target player to teleport to
local function selectTargetPlayer()
-- Display a list of players in the game and allow selection (optional)
-- For now, we simply set the target player to the first player other than yourself
for _, otherPlayer in pairs(game.Players:GetPlayers()) do
if otherPlayer ~= player then
targetPlayer = otherPlayer
break
end
end
end
-- Detect when the player presses the teleport key (T)
userInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == teleportKey then
-- Select target player and teleport to them
selectTargetPlayer()
if targetPlayer then
teleportToPlayer(targetPlayer)
end
end
end
end)



pretty trash LMAO