Facebook
From try, 2 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 196
  1. -- Reference to the LocalPlayer
  2. local player = game.Players.LocalPlayer
  3.  
  4. -- Function to auto-kill a player
  5. local function autoKill(target)
  6.     local punchTool = player.Backpack:FindFirstChild("Punch")
  7.     if punchTool then
  8.         punchTool:Activate()
  9.     end
  10. end
  11.  
  12. -- Create GUI
  13. local gui = player.PlayerGui:WaitForChild("Gui") -- Replace "Gui" with the name of your GUI
  14.  
  15. -- Button for autokill
  16. local autokillBtn = gui:FindFirstChild("AutokillButton") -- Replace "AutokillButton" with the name of your button
  17.  
  18. -- Toggle button for autokill
  19. local toggleBtn = gui:FindFirstChild("ToggleAutokillButton") -- Replace "ToggleAutokillButton" with the name of your toggle button
  20. local autokillEnabled = false
  21.  
  22. -- Function to update autokill status
  23. local function updateAutokillStatus()
  24.     autokillEnabled = not autokillEnabled
  25.     toggleBtn.Text = autokillEnabled and "Autokill: ON" or "Autokill: OFF"
  26. end
  27.  
  28. -- Function to handle autokill button click
  29. autokillBtn.MouseButton1Click:Connect(function()
  30.     if autokillEnabled then
  31.