Baconcoder

fling tp

Jun 29th, 2025
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. -- Create GUI
  2. local screenGui = Instance.new("ScreenGui")
  3. screenGui.Name = "TPFlingGui"
  4. screenGui.ResetOnSpawn = false
  5. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  6.  
  7. -- Main frame
  8. local frame = Instance.new("Frame")
  9. frame.Size = UDim2.new(0, 250, 0, 120)
  10. frame.Position = UDim2.new(0.5, -125, 0.5, -60)
  11. frame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  12. frame.BorderSizePixel = 0
  13. frame.Active = true
  14. frame.Draggable = true
  15. frame.Parent = screenGui
  16.  
  17. -- Title
  18. local title = Instance.new("TextLabel")
  19. title.Text = "TP + Fling GUI"
  20. title.Size = UDim2.new(1, 0, 0, 30)
  21. title.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  22. title.TextColor3 = Color3.new(1, 1, 1)
  23. title.Font = Enum.Font.GothamBold
  24. title.TextSize = 18
  25. title.Parent = frame
  26.  
  27. -- TextBox
  28. local playerBox = Instance.new("TextBox")
  29. playerBox.PlaceholderText = "Enter Player Name"
  30. playerBox.Size = UDim2.new(1, -20, 0, 30)
  31. playerBox.Position = UDim2.new(0, 10, 0, 40)
  32. playerBox.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  33. playerBox.TextColor3 = Color3.new(1, 1, 1)
  34. playerBox.Font = Enum.Font.Gotham
  35. playerBox.TextSize = 16
  36. playerBox.ClearTextOnFocus = false
  37. playerBox.Parent = frame
  38.  
  39. -- Button
  40. local tpButton = Instance.new("TextButton")
  41. tpButton.Text = "TP + Fling"
  42. tpButton.Size = UDim2.new(1, -20, 0, 30)
  43. tpButton.Position = UDim2.new(0, 10, 0, 80)
  44. tpButton.BackgroundColor3 = Color3.fromRGB(100, 50, 150)
  45. tpButton.TextColor3 = Color3.new(1, 1, 1)
  46. tpButton.Font = Enum.Font.GothamBold
  47. tpButton.TextSize = 16
  48. tpButton.Parent = frame
  49.  
  50. -- Teleport and Fling Function
  51. tpButton.MouseButton1Click:Connect(function()
  52. local targetName = playerBox.Text
  53. local localPlr = game.Players.LocalPlayer
  54. local character = localPlr.Character
  55. local hrp = character and character:FindFirstChild("HumanoidRootPart")
  56. local humanoid = character and character:FindFirstChildOfClass("Humanoid")
  57.  
  58. local targetPlayer = game.Players:FindFirstChild(targetName)
  59. if targetPlayer and targetPlayer.Character and targetPlayer.Character:FindFirstChild("HumanoidRootPart") then
  60. local targetHRP = targetPlayer.Character.HumanoidRootPart
  61.  
  62. if humanoid and hrp then
  63. -- Jump to enable fling motion
  64. humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
  65. wait(0.1)
  66.  
  67. -- TP to target
  68. hrp.CFrame = targetHRP.CFrame + Vector3.new(0, 2, 0)
  69.  
  70. -- Fling velocity
  71. local bodyVelocity = Instance.new("BodyVelocity")
  72. bodyVelocity.Velocity = Vector3.new(9999, 9999, 9999)
  73. bodyVelocity.MaxForce = Vector3.new(1e6, 1e6, 1e6)
  74. bodyVelocity.Parent = hrp
  75.  
  76. game.Debris:AddItem(bodyVelocity, 0.2)
  77. end
  78. end
  79. end)
  80.  
Advertisement
Add Comment
Please, Sign In to add comment