Advertisement
giorgichaduneli

ae

Jan 9th, 2025
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. --[[ WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk! ]]
  2. local activated = false
  3.  
  4. -- Function to simulate pressing the F key
  5. local function pressFKey()
  6. local inputService = game:GetService("VirtualInputManager")
  7. inputService:SendKeyEvent(true, Enum.KeyCode.F, false, game) -- Key down
  8. inputService:SendKeyEvent(false, Enum.KeyCode.F, false, game) -- Key up
  9. end
  10.  
  11. -- Function to toggle the automation
  12. local function toggle()
  13. activated = not activated
  14. game.StarterGui:SetCore("SendNotification", {
  15. Title = "Key Spam",
  16. Text = activated and "Enabled" or "Disabled",
  17. Duration = 5,
  18. })
  19.  
  20. if activated then
  21. spawn(function()
  22. while activated do
  23. pressFKey() -- Simulate pressing the F key
  24. task.wait() -- Natural delay based on Roblox's frame rate
  25. end
  26. end)
  27. end
  28. end
  29.  
  30. -- Detect key press to toggle the automation
  31. game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
  32. if not gameProcessed and input.KeyCode == Enum.KeyCode.X then
  33. toggle()
  34. end
  35. end)
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement