ScriptHUB
You vs Peter
50 Views
5d atrás
Descrição
Nenhuma descrição fornecida.
Como Utilizar?
Script
1local UserInputService = game:GetService("UserInputService")
2local Players = game:GetService("Players")
3local player = Players.LocalPlayer
4
5-- Interface Principal
6local screenGui = Instance.new("ScreenGui", player.PlayerGui)
7screenGui.Name = "TeleportSystem"
8screenGui.ResetOnSpawn = false
9
10-- Frame para agrupar os botões de teleporte
11local mainFrame = Instance.new("Frame", screenGui)
12mainFrame.Size = UDim2.new(1, 0, 1, 0)
13mainFrame.BackgroundTransparency = 1
14
15-- Função para estilizar os botões
16local function styleButton(btn, text, pos, color)
17 btn.Size = UDim2.new(0, 110, 0, 35)
18 btn.Position = pos
19 btn.Text = text
20 btn.BackgroundColor3 = color
21 btn.TextColor3 = Color3.new(1, 1, 1)
22 btn.Font = Enum.Font.SourceSansBold
23 btn.TextSize = 18
24 Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 8)
25end
26
27-- Botões de Teleporte em Inglês
28local hardButton = Instance.new("TextButton", mainFrame)
29styleButton(hardButton, "HARD", UDim2.new(0.5, -180, 0.9, -50), Color3.fromRGB(170, 0, 0))
30
31local mediumButton = Instance.new("TextButton", mainFrame)
32styleButton(mediumButton, "MEDIUM", UDim2.new(0.5, -55, 0.9, -50), Color3.fromRGB(255, 170, 0))
33
34local easyButton = Instance.new("TextButton", mainFrame)
35styleButton(easyButton, "EASY", UDim2.new(0.5, 70, 0.9, -50), Color3.fromRGB(0, 170, 0))
36
37local backButton = Instance.new("TextButton", mainFrame)
38styleButton(backButton, "BACK", UDim2.new(0.5, -55, 0.8, -50), Color3.fromRGB(50, 50, 50))
39backButton.Visible = false
40
41-- Botão de Ocultar/Mostrar em Inglês
42local toggleButton = Instance.new("TextButton", screenGui)
43styleButton(toggleButton, "HIDE (P)", UDim2.new(0, 10, 0.9, -50), Color3.fromRGB(30, 30, 30))
44toggleButton.Size = UDim2.new(0, 110, 0, 35)
45
46-- Coordenadas (Mantidas as mesmas do último ajuste correto)
47local coordFacil = Vector3.new(385.73, 236.21, 17.32)
48local coordMedio = Vector3.new(405.88, 240.54, 71.70)
49local coordDificil = Vector3.new(466.07, 228.14, -54.96)
50local ultimaPosicao = nil
51
52local function toggleHUD()
53 mainFrame.Visible = not mainFrame.Visible
54 toggleButton.Text = mainFrame.Visible and "HIDE (P)" or "SHOW (P)"
55end
56
57local function teleport(destino)
58 local character = player.Character
59 if character and character:FindFirstChild("HumanoidRootPart") then
60 ultimaPosicao = character.HumanoidRootPart.CFrame
61 character.HumanoidRootPart.CFrame = CFrame.new(destino)
62 backButton.Visible = true
63 end
64end
65
66-- Lógica de Controle
67toggleButton.MouseButton1Click:Connect(toggleHUD)
68
69UserInputService.InputBegan:Connect(function(input, gameProcessed)
70 if gameProcessed then return end
71 if input.KeyCode == Enum.KeyCode.P then
72 toggleHUD()
73 end
74end)
75
76-- Conexões de Clique
77easyButton.MouseButton1Click:Connect(function() teleport(coordFacil) end)
78mediumButton.MouseButton1Click:Connect(function() teleport(coordMedio) end)
79hardButton.MouseButton1Click:Connect(function() teleport(coordDificil) end)
80
81backButton.MouseButton1Click:Connect(function()
82 local character = player.Character
83 if character and character:FindFirstChild("HumanoidRootPart") and ultimaPosicao then
84 character.HumanoidRootPart.CFrame = ultimaPosicao
85 backButton.Visible = false
86 end
87end)