UnnoobcoolHelper

Touch Volleyball Teleport is fe

Mar 11th, 2025 (edited)
19
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. -- Create the GUI
  2. local ScreenGui = Instance.new("ScreenGui")
  3. local Frame = Instance.new("Frame")
  4. local TeleportButton = Instance.new("TextButton")
  5. local TopTextLabel = Instance.new("TextLabel")
  6. local BottomTextLabel = Instance.new("TextLabel")
  7.  
  8. -- Properties
  9. ScreenGui.Name = "BallTeleportGui"
  10. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  11.  
  12. Frame.Name = "Frame"
  13. Frame.Parent = ScreenGui
  14. Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  15. Frame.Size = UDim2.new(0, 250, 0, 150) -- Smaller size of the frame
  16. Frame.AnchorPoint = Vector2.new(0.5, 0.5)
  17. Frame.Position = UDim2.new(0.5, 0, 0.5, 0) -- Centered
  18.  
  19. Frame.Active = true
  20. Frame.Draggable = true
  21.  
  22. -- Create the Top TextLabel
  23. TopTextLabel.Name = "TopTextLabel"
  24. TopTextLabel.Parent = Frame
  25. TopTextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  26. TopTextLabel.BackgroundTransparency = 1 -- Make the background transparent
  27. TopTextLabel.Position = UDim2.new(0, 0, 0, 0) -- Positioned at the top of the Frame
  28. TopTextLabel.Size = UDim2.new(1, 0, 0.2, 0) -- Adjust size to fit at the top
  29. TopTextLabel.Font = Enum.Font.Cartoon
  30. TopTextLabel.Text = "Made with hate by Lennox"
  31. TopTextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  32. TopTextLabel.TextScaled = true
  33. TopTextLabel.TextStrokeTransparency = 0.8
  34.  
  35. -- Create the Teleport Button
  36. TeleportButton.Name = "TeleportButton"
  37. TeleportButton.Parent = Frame
  38. TeleportButton.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  39. TeleportButton.Size = UDim2.new(0.6, 0, 0.25, 0) -- Size of the button
  40. TeleportButton.AnchorPoint = Vector2.new(0.5, 0.5)
  41. TeleportButton.Position = UDim2.new(0.5, 0, 0.5, 0) -- Centered
  42. TeleportButton.Font = Enum.Font.Cartoon
  43. TeleportButton.Text = "Teleport Ball"
  44. TeleportButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  45. TeleportButton.TextScaled = true
  46.  
  47. -- Create the Bottom TextLabel
  48. BottomTextLabel.Name = "BottomTextLabel"
  49. BottomTextLabel.Parent = Frame
  50. BottomTextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  51. BottomTextLabel.BackgroundTransparency = 1 -- Make the background transparent
  52. BottomTextLabel.Position = UDim2.new(0, 0, 0.75, 0) -- Positioned at the bottom of the Frame
  53. BottomTextLabel.Size = UDim2.new(1, 0, 0.2, 0) -- Adjust size to fit at the bottom
  54. BottomTextLabel.Font = Enum.Font.Cartoon
  55. BottomTextLabel.Text = "Touch Volleyball"
  56. BottomTextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  57. BottomTextLabel.TextScaled = true
  58. BottomTextLabel.TextStrokeTransparency = 0.8
  59.  
  60. -- Function to teleport the ball
  61. local function teleportBall()
  62. local player = game.Players.LocalPlayer
  63. local character = player.Character
  64. local tennisCourt = game.Workspace:FindFirstChild("TennisCourt")
  65.  
  66. if tennisCourt then
  67. local ball = tennisCourt:FindFirstChild("SoccerBall")
  68.  
  69. if character and ball then
  70. local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
  71.  
  72. if humanoidRootPart then
  73. -- Teleport the ball slightly in front of the HumanoidRootPart
  74. local offset = humanoidRootPart.CFrame.LookVector * 5 -- Move the ball 5 studs in front of the player
  75. ball.CFrame = humanoidRootPart.CFrame + offset
  76. end
  77. end
  78. end
  79. end
  80.  
  81. -- Connect the button click to the teleport function
  82. TeleportButton.MouseButton1Click:Connect(teleportBall)
Comments
Add Comment
Please, Sign In to add comment