Advertisement
Nuggetthe1

J00pySc00p'sGui Fencing Script OP1!1!!

Oct 14th, 2024
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | Source Code | 0 0
  1. local Players = game:GetService("Players")
  2. local LocalPlayer = Players.LocalPlayer
  3. local teleporting = false -- Variable to control teleportation
  4.  
  5. -- Create the Screen GUI
  6. local screenGui = Instance.new("ScreenGui")
  7. screenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
  8.  
  9. -- Create the Frame (Rainbow Box)
  10. local frame = Instance.new("Frame")
  11. frame.Parent = screenGui
  12. frame.Size = UDim2.new(0.2, 0, 0.2, 0)
  13. frame.Position = UDim2.new(0.4, 0, 0.4, 0)
  14.  
  15. -- Create a Rainbow effect for the frame
  16. local function updateRainbow()
  17. local hue = tick() % 5 / 5
  18. frame.BackgroundColor3 = Color3.fromHSV(hue, 1, 1)
  19. end
  20.  
  21. -- Run rainbow effect
  22. game:GetService("RunService").RenderStepped:Connect(updateRainbow)
  23.  
  24. -- Create a TextBox for player input
  25. local playerInput = Instance.new("TextBox")
  26. playerInput.Parent = frame
  27. playerInput.Size = UDim2.new(0.9, 0, 0.3, 0)
  28. playerInput.Position = UDim2.new(0.05, 0, 0.1, 0)
  29. playerInput.PlaceholderText = "Enter Player Name"
  30. playerInput.TextScaled = true
  31.  
  32. -- Create a Button to teleport
  33. local teleportButton = Instance.new("TextButton")
  34. teleportButton.Parent = frame
  35. teleportButton.Size = UDim2.new(0.9, 0, 0.3, 0)
  36. teleportButton.Position = UDim2.new(0.05, 0, 0.6, 0)
  37. teleportButton.Text = "Cheeze Them 😂"
  38. teleportButton.TextScaled = true
  39.  
  40. -- Create a "Stop🧀" button to stop teleporting
  41. local stopButton = Instance.new("TextButton")
  42. stopButton.Parent = frame
  43. stopButton.Size = UDim2.new(0.9, 0, 0.3, 0)
  44. stopButton.Position = UDim2.new(0.05, 0, 0.9, 0)
  45. stopButton.Text = "Stop🧀"
  46. stopButton.TextScaled = true
  47.  
  48. -- Create a "Kill GUI" button to delete the GUI
  49. local killGuiButton = Instance.new("TextButton")
  50. killGuiButton.Parent = screenGui
  51. killGuiButton.Size = UDim2.new(0.1, 0, 0.05, 0)
  52. killGuiButton.Position = UDim2.new(0.9, -10, 0, 10)
  53. killGuiButton.Text = "Kill GUI"
  54. killGuiButton.TextScaled = true
  55.  
  56. -- Function to teleport behind a player
  57. local function teleportBehind(targetPlayer)
  58. local character = targetPlayer.Character
  59. if character and character:FindFirstChild("HumanoidRootPart") then
  60. local targetRoot = character.HumanoidRootPart
  61. local teleportPos = targetRoot.CFrame * CFrame.new(0, 0, 3) -- Teleport behind the player
  62. LocalPlayer.Character.HumanoidRootPart.CFrame = teleportPos
  63. end
  64. end
  65.  
  66. -- Button click logic for teleporting
  67. teleportButton.MouseButton1Click:Connect(function()
  68. local targetName = playerInput.Text:lower() -- Convert input to lowercase for case-insensitivity
  69. local targetPlayer = nil
  70.  
  71. -- Search for a player whose name contains the input
  72. for _, player in ipairs(Players:GetPlayers()) do
  73. if string.find(player.Name:lower(), targetName) then
  74. targetPlayer = player
  75. break
  76. end
  77. end
  78.  
  79. if targetPlayer then
  80. teleporting = true -- Enable teleporting
  81. -- Loop teleport until the target dies or teleporting is stopped
  82. while targetPlayer.Character and targetPlayer.Character:FindFirstChild("Humanoid")
  83. and targetPlayer.Character.Humanoid.Health > 0 and teleporting do
  84. teleportBehind(targetPlayer)
  85. wait(0.1) -- Adjust this value for how fast the teleport happens
  86. end
  87. else
  88. print("Player not found!")
  89. end
  90. end)
  91.  
  92. -- Stop button logic to stop teleporting
  93. stopButton.MouseButton1Click:Connect(function()
  94. teleporting = false -- Stop teleporting
  95. end)
  96.  
  97. -- Kill GUI button logic
  98. killGuiButton.MouseButton1Click:Connect(function()
  99. screenGui:Destroy() -- Remove the GUI
  100. end)
  101.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement