Advertisement
Hex4rr

horrible waypoint gui

Feb 14th, 2025
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local UserInputService = game:GetService("UserInputService")
  3. local LocalPlayer = Players.LocalPlayer
  4. local lastWaypoint = nil
  5.  
  6. -- Create GUI elements
  7. local screenGui = Instance.new("ScreenGui")
  8. screenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
  9.  
  10. local frame = Instance.new("Frame")
  11. frame.Size = UDim2.new(0, 200, 0, 150)
  12. frame.Position = UDim2.new(1, -210, 0.5, -75)
  13. frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  14. frame.Parent = screenGui
  15.  
  16. local positionLabel = Instance.new("TextLabel")
  17. positionLabel.Size = UDim2.new(1, 0, 0.2, 0)
  18. positionLabel.Position = UDim2.new(0, 0, 0.8, 0)
  19. positionLabel.Text = "Last Position: N/A"
  20. positionLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  21. positionLabel.BackgroundTransparency = 1
  22. positionLabel.Parent = frame
  23.  
  24. -- Set waypoint function
  25. local function setWaypoint()
  26. if LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
  27. lastWaypoint = LocalPlayer.Character.HumanoidRootPart.CFrame
  28. positionLabel.Text = "Last Position: " .. tostring(lastWaypoint.Position)
  29. end
  30. end
  31.  
  32. -- Teleport function
  33. local function teleportToWaypoint()
  34. if lastWaypoint and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
  35. LocalPlayer.Character.HumanoidRootPart.CFrame = lastWaypoint
  36. end
  37. end
  38.  
  39. -- Key bindings
  40. UserInputService.InputBegan:Connect(function(input, gameProcessed)
  41. if gameProcessed then return end
  42. if input.KeyCode == Enum.KeyCode.G then
  43. setWaypoint()
  44. elseif input.KeyCode == Enum.KeyCode.H then
  45. teleportToWaypoint()
  46. end
  47. end)
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement