Advertisement
LolPenguinOwO

fdsfdsfdsfgdf

Jul 22nd, 2023
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. local KICK_MESSAGE = "Get destroyed kid - baro & dev of this script"
  2.  
  3. -- Create GUI
  4. local gui = Instance.new("ScreenGui")
  5. gui.Name = "Kick GUI"
  6.  
  7. local frame = Instance.new("Frame")
  8. frame.Size = UDim2.new(0, 200, 0, 100)
  9. frame.Position = UDim2.new(0.5, -100, 0.5, -50)
  10. frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  11. frame.BorderSizePixel = 0
  12. frame.Parent = gui
  13.  
  14. local label = Instance.new("TextLabel")
  15. label.Size = UDim2.new(1, 0, 0.5, 0)
  16. label.Position = UDim2.new(0, 0, 0, 0)
  17. label.BackgroundTransparency = 1
  18. label.Font = Enum.Font.SourceSans
  19. label.Text = "Kick a Player"
  20. label.TextColor3 = Color3.fromRGB(0, 0, 0)
  21. label.TextSize = 20
  22. label.Parent = frame
  23.  
  24. local textBox = Instance.new("TextBox")
  25. textBox.Size = UDim2.new(1, -20, 0.3, 0)
  26. textBox.Position = UDim2.new(0, 10, 0.5, -20)
  27. textBox.PlaceholderText = "Enter Player Name"
  28. textBox.Font = Enum.Font.SourceSans
  29. textBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  30. textBox.TextSize = 14
  31. textBox.Parent = frame
  32.  
  33. local kickButton = Instance.new("TextButton")
  34. kickButton.Size = UDim2.new(1, -20, 0.2, 0)
  35. kickButton.Position = UDim2.new(0, 10, 0.8, -10)
  36. kickButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  37. kickButton.BorderSizePixel = 0
  38. kickButton.Font = Enum.Font.SourceSans
  39. kickButton.Text = "Kick Player"
  40. kickButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  41. kickButton.TextSize = 16
  42. kickButton.Parent = frame
  43.  
  44. -- Kick Function
  45. local function KickPlayer(playerName)
  46. local player = game.Players:FindFirstChild(playerName)
  47. if player then
  48. player:Kick(KICK_MESSAGE)
  49. end
  50. end
  51.  
  52. -- Connect Kick Button to Kick Function
  53. kickButton.MouseButton1Click:Connect(function()
  54. local playerName = textBox.Text
  55. KickPlayer(playerName)
  56. end)
  57.  
  58. -- Show GUI
  59. gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement