Prison Life
5.6k Views
39 Executions

Auto Attack

Prison Life
stav
stavPublished 10
1 year ago
Please login to perform these actions:

Auto Attack is a Prison Life script for Roblox, uploaded to ScriptBlox on Oct 10, 2025.

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Automatically attacks players around you within six studs

View Raw
--[[

    Auto Attack (Killaura)
    Kills the closest player towards you
    -- [ stav.lua ] --

]]

shared.Aura = true

local cloneref = cloneref or function(obj)
    return obj
end
local playersService = cloneref(game:GetService('Players'))
local replicatedStorage = cloneref(game:GetService('ReplicatedStorage'))
local lplr = playersService.LocalPlayer

local function getClosestPlayer()
    local closestdist, closestplr = math.huge, nil
    for i,v in playersService:GetPlayers() do
        if v == lplr then continue end

        pcall(function()
            local dist = lplr:DistanceFromCharacter(v.Character.PrimaryPart.Position)
            if dist < 6 and dist < closestdist then
                closestdist = dist
                closestplr = v
            end
        end)
    end

    return closestplr
end

task.spawn(function()
    repeat
        local plr = getClosestPlayer()
        if plr then
            replicatedStorage.meleeEvent:FireServer(plr)
        end


Comments

2
Log in to join the conversation. Login
LilJohn's profile picture
LilJohn1 year ago

doesn't work

1
squhz's profile picture
squhz10 months ago

@LilJohn is working.

1

Tags

More Prison Life scripts

See all
Prison Life
1.5M
8.6k
3 years ago
Key System
Prison Life
923.7k
2.1k
5 years ago
Key System
Prison Life
601.1k
2.9k
Bumped 1 year ago
Prison Life
962
1.7k
3 days ago
Prison Life
780
1.9k
3 days ago
Key System
Prison Life
10.4k
36.6k
Bumped 4 days ago
Prison Life
5.8k
22.8k
Bumped 4 days ago
Key System
Prison Life
545
1.9k
Approved 4 days ago
Key System