local Players = game:GetService("Players") local RunService = game:GetService("RunService") local lp = Players.LocalPlayer local SelectedPlayer = nil local EnableSelect = false local EnableRandomTP = false local Tab = _call58:Tab({ Title = "传送系统", Icon = "map" }) -- ===== 选人传送 ===== Tab:Section({ Title = "选人传送", Icon = "user" }) local PlayerDropdown local function RefreshPlayers() local list = {} for _, p in pairs(Players:GetPlayers()) do if p ~= lp then table.insert(list, p.Name) end end PlayerDropdown:SetValues(list) if #list > 0 then PlayerDropdown:SetValue(list[1]) SelectedPlayer = list[1] end end PlayerDropdown = Tab:Dropdown({ Title = "选择目标", Values = {}, Default = "", Callback = function(v) SelectedPlayer = v end }) RefreshPlayers() Tab:Toggle({ Title = "启用选人传送", Default = false, Callback = function(v) EnableSelect = v end }) -- ===== 全图传送 ===== Tab:Section({ Title = "全图传送", Icon = "globe" }) Tab:Button({ Title = "随机玩家头顶", Callback = function() local list = {} for _, p in pairs(Players:GetPlayers()) do if p ~= lp and p.Character and p.Character:FindFirstChild("HumanoidRootPart") then table.insert(list, p) end end if #list > 0 then local t = list[math.random(1, #list)] lp.Character.HumanoidRootPart.CFrame = t.Character.HumanoidRootPart.CFrame * CFrame.new(0, 12, 0) end end }) Tab:Toggle({ Title = "全图循环传送(2~3秒)", Default = false, Callback = function(v) EnableRandomTP = v end }) -- ===== 玩家刷新 ===== Players.PlayerAdded:Connect(function() task.wait(1) RefreshPlayers() end) Players.PlayerRemoving:Connect(function() task.wait(0.5) RefreshPlayers() end) -- ===== 主逻辑 ===== RunService.Heartbeat:Connect(function() if EnableSelect and SelectedPlayer then local target = Players:FindFirstChild(SelectedPlayer) if target and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then lp.Character.HumanoidRootPart.CFrame = target.Character.HumanoidRootPart.CFrame * CFrame.new(0, 12, 0) end end if EnableRandomTP then local list = {} for _, p in pairs(Players:GetPlayers()) do if p ~= lp and p.Character and p.Character:FindFirstChild("HumanoidRootPart") then table.insert(list, p) end end if #list > 0 then local t = list[math.random(1, #list)] lp.Character.HumanoidRootPart.CFrame = t.Character.HumanoidRootPart.CFrame * CFrame.new(0, 12, 0) end task.wait(math.random(2, 3)) end end)