Description

AutoHotkey F

Features

  • + AutoHotkey

Script

Add Xeno Scripts as a preferred source
--// Auto F with On/Off Button

local VIM = game:GetService("VirtualInputManager")

-- Make GUI
local gui = Instance.new("ScreenGui")
gui.Name = "AutoFGui"
gui.ResetOnSpawn = false
pcall(function()
    gui.Parent = game:GetService("CoreGui")
end)

local btn = Instance.new("TextButton")
btn.Size = UDim2.new(0, 120, 0, 40)
btn.Position = UDim2.new(0, 20, 0, 200)
btn.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
btn.TextColor3 = Color3.fromRGB(255, 255, 255)
btn.Font = Enum.Font.SourceSansBold
btn.TextSize = 18
btn.Text = "Auto F: OFF"
btn.Parent = gui

local enabled = false

-- Click to toggle
btn.MouseButton1Click:Connect(function()
    enabled = not enabled
    btn.Text = enabled and "Auto F: ON" or "Auto F: OFF"
end)

-- Make button draggable
local dragging = false
local dragStart, startPos

btn.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        dragging = true
        dragStart = input.Position
        startPos = btn.Position
    end
end)

btn.InputEnded:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        dragging = false
    end
end)

game:GetService("UserInputService").InputChanged:Connect(function(input)
    if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
        local delta = input.Position - dragStart
        btn.Position = UDim2.new(
            startPos.X.Scale,
            startPos.X.Offset + delta.X,
            startPos.Y.Scale,
            startPos.Y.Offset + delta.Y
        )
    end
end)

-- Main loop
task.spawn(function()
    while true do
        if enabled then
            VIM:SendKeyEvent(true, Enum.KeyCode.F, false, game)
            task.wait(0.02)
            VIM:SendKeyEvent(false, Enum.KeyCode.F, false, game)
            task.wait(0.15) -- change for faster/slower
        else
            task.wait(0.1)
        end
    end
end)
Script worked? 🚀 Boost it to #1 so others find it too.

Comments (1)

Log in to add a comment.

ymbodaf803

ymbodaf803

10 months ago

Eldritch hub discord?