Advertisement
MrArgy

kick recall for slap battles

Aug 25th, 2024
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.84 KB | None | 0 0
  1. loadstring(game:HttpGet("https://pastebin.com/raw/L3b1573b"))()
  2.  
  3. local gui = Instance.new("ScreenGui")
  4. gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  5.  
  6. gui.ResetOnSpawn = false
  7. gui.IgnoreGuiInset = true
  8. gui.Enabled = true
  9.  
  10. local container = Instance.new("Frame")
  11. container.Size = UDim2.new(0.3, 0, 0.2, 0)
  12. container.Position = UDim2.new(0.7, 0, 0, 0)
  13. container.BackgroundTransparency = 0.5
  14. container.BackgroundColor3 = Color3.fromRGB(28, 28, 28)
  15. container.BorderSizePixel = 0
  16. container.Parent = gui
  17.  
  18. local scriptTextBox = Instance.new("TextBox")
  19. scriptTextBox.Size = UDim2.new(1, 0, 0.75, 0)
  20. scriptTextBox.Position = UDim2.new(0, 0, 0, 0)
  21. scriptTextBox.Text = "..."
  22. scriptTextBox.TextWrapped = true
  23. scriptTextBox.TextXAlignment = Enum.TextXAlignment.Center
  24. scriptTextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  25. scriptTextBox.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  26. scriptTextBox.BackgroundTransparency = 0.5
  27. scriptTextBox.Font = Enum.Font.SourceSans
  28. scriptTextBox.TextSize = 20
  29. scriptTextBox.Parent = container
  30.  
  31. local executeButton = Instance.new("TextButton")
  32. executeButton.Size = UDim2.new(1, 0, 0.25, 0)
  33. executeButton.Position = UDim2.new(0, 0, 0.75, 0)
  34. executeButton.Text = "kick player"
  35. executeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  36. executeButton.BackgroundColor3 = Color3.fromRGB(37, 37, 37)
  37. executeButton.BackgroundTransparency = 0.5
  38. executeButton.Font = Enum.Font.SourceSansBold
  39. executeButton.TextSize = 20
  40. executeButton.Parent = container
  41.  
  42.  
  43. local function executeScript()
  44.     local targetAbbreviation = scriptTextBox.Text
  45.     local targetPlayer
  46.  
  47.     for _, v in pairs(game.Players:GetPlayers()) do
  48.         if string.sub(v.Name, 1, #targetAbbreviation):lower() == targetAbbreviation:lower() then
  49.             targetPlayer = v
  50.             break
  51.         end
  52.     end
  53.  
  54.     if targetPlayer then
  55.         local PlayerKickRecall = targetPlayer.Name
  56.         local OGL = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  57.        
  58.         for i, v in pairs(game.Workspace.Lobby.brazil:GetChildren()) do
  59.             v.CanTouch = false
  60.         end
  61.        
  62.         game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(-725, 310, -2)
  63.         task.wait(0.25)
  64.         game:GetService("ReplicatedStorage").Recall:InvokeServer(game:GetService("Players").LocalPlayer.Character.Recall)
  65.        
  66.         wait(2.7)
  67.         game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = game.Players[PlayerKickRecall].Character.HumanoidRootPart.CFrame
  68.         task.wait(1)
  69.         game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = OGL
  70.        
  71.         for i, v in pairs(game.Workspace.Lobby.brazil:GetChildren()) do
  72.             v.CanTouch = true
  73.         end
  74.     else
  75.         warn("This player doesn't exist.")
  76.     end
  77. end
  78.  
  79. executeButton.MouseButton1Click:Connect(executeScript)
  80.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement