Parallaxox

Chosen Player Teleport LS

Apr 8th, 2025 (edited)
603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.16 KB | None | 0 0
  1. --https://youtu.be/rvva4TSGunI
  2. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  3. local Players = game:GetService("Players")
  4.  
  5. local player = Players.LocalPlayer
  6. local playerGui = player:WaitForChild("PlayerGui")
  7.  
  8. -- Create GUI
  9. local screenGui = Instance.new("ScreenGui")
  10. screenGui.Name = "PickerGui"
  11. screenGui.Parent = playerGui
  12.  
  13. local textLabel = Instance.new("TextLabel")
  14. textLabel.Size = UDim2.new(0.5, 0, 0.1, 0)
  15. textLabel.Position = UDim2.new(0.25, 0, 0.05, 0)
  16. textLabel.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  17. textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  18. textLabel.Font = Enum.Font.SourceSansBold
  19. textLabel.TextScaled = true
  20. textLabel.Text = "Waiting for selection..."
  21. textLabel.Parent = screenGui
  22.  
  23. local chosenPlayerValue = ReplicatedStorage:FindFirstChild("ChosenPlayer")
  24.  
  25. -- Update GUI when value changes
  26. local function updateGui()
  27.     local displayText = "Waiting for selection..."
  28.     if chosenPlayerValue and chosenPlayerValue.Value ~= "Waiting for selection..." then
  29.         displayText = chosenPlayerValue.Value
  30.     end
  31.     textLabel.Text = displayText
  32. end
  33.  
  34. if chosenPlayerValue then
  35.     chosenPlayerValue.Changed:Connect(updateGui)
  36. end
  37.  
Advertisement
Add Comment
Please, Sign In to add comment