--[[
Prison Life Admin Script (ULTRA STEALTH) - EXPANDED EDITION
Integrates original script with PrizzLife mechanics for client-side execution
Version 2.0 - Ultra Edition
This script provides extensive admin functionality in Prison Life without
requiring
a server-sided executor. It leverages exploits in the game's remote events and
includes comprehensive protection, teleportation, weapon, and player manipulation
systems.
IMPORTANT: This script has been expanded to match PrizzLife's functionality while
maintaining client-side execution capability.
]]
-- =======================================
-- INITIALIZATION AND CORE VARIABLES
-- =======================================
local currentVersion = "2.0 Ultra Edition"
local Execution_Runtime = tick()
local ExecutionDate = os.date("%Y-%m-%d")
local StartupTime = os.time()
-- Settings - Extended with advanced features
_G.PrisonAdminUltra = {
-- Core settings
Prefix = ".", -- Command prefix
EnableAntiKick = true, -- Anti-kick feature
SafeMode = true, -- Enhanced security mode
MaxBatchSize = 3, -- Max operations per batch
BatchDelay = 0.3, -- Delay between batches
RankedPlayers = {}, -- Players with admin permissions
LoopKillPlayers = {}, -- Players being loop killed
-- Notification settings
JoinNotify = false, -- Notify when players join
LeaveNotify = false, -- Notify when players leave
KillNotify = false, -- Notify when kills occur
CommandNotify = true, -- Show notifications for commands
-- Auto features
AutoRespawn = true, -- Automatically loadcharacter when dying
AutoGuns = false, -- Automatically get all guns
AutoTeam = false, -- Auto set your team (guard/prisoner/criminal)
AutoTeamValue = "none", -- Which team to auto select
AutoKill = {}, -- Players to automatically kill
AutoExec = {}, -- Commands to execute on script start
-- Anti systems (protection)
AntiVoid = true, -- Automatically teleport up when falling into
void
AntiTase = false, -- Prevents you from being tased
AntiArrest = false, -- Prevents you from being arrested
AntiShoot = false, -- Kills player who tries to shoot you
AntiPunch = false, -- Instantly kill players who try to punch you
AntiFling = false, -- Prevent exploiters from flinging you
AntiShield = false, -- Stop pay2win people and bypass their shields
AntiBring = false, -- Prevent other exploiter(s) from bringing you
AntiCrash = true, -- Prevent crash attempts
AntiAbuse = true, -- Kill players who abuse exploits
AntiDeath = false, -- Prevents your character from dying
AntiRagdoll = false, -- Prevents ragdolling
AntiSit = false, -- Prevent sitting
-- Combat features
SilentAim = false, -- Makes you shoot without missing a target
SilentAimHeadshot = true, -- Target heads with silent aim
KillAura = false, -- Automatically kill nearby players
KillAuraRange = 15, -- Range for kill aura
KillAuraTeamCheck = true, -- Don't kill same team with killaura
KillAuraVisualFeedback = true, -- Show visual line to target
InfAmmo = false, -- Infinite ammo
InfDamage = false, -- One-hit kills
NoRecoil = false, -- No recoil when shooting
RapidFire = false, -- Shoot very fast
-- Weapon options
CustomGunMods = false, -- Enable custom gun modifications
GunOneShot = false, -- Make guns kill in one shot
GunFireRate = 0.1, -- Modified fire rate for guns
GunAutofire = false, -- Make all guns automatic
OldItemMethod = false, -- Use teleport for getting items (fallback)
-- Visual features
Fullbright = false, -- Enable fullbrightness
Xray = false, -- See through walls
PlayerESP = false, -- See player through walls
ItemESP = false, -- See items through walls
BoxESP = false, -- Draw boxes around players
TracerESP = false, -- Draw lines to players
NameESP = false, -- Show names through walls
TeamESP = false, -- Color ESP by team
-- Movement options
Noclip = false, -- Walk through walls
InfiniteJump = false, -- Jump without limit
SpeedMultiplier = 1, -- Walk speed multiplier
JumpMultiplier = 1, -- Jump height multiplier
FlySpeed = 1, -- Flying speed
VehicleSpeed = 1, -- Vehicle speed multiplier
-- Permission settings
AdminIds = {}, -- Extra admin user IDs
WhitelistedPlayers = {}, -- Players immune to your attacks
WhitelistRanked = false, -- Automatically whitelist ranked players
BlacklistedPlayers = {}, -- Auto kill/kick these players
RankedNukeCmds = true, -- Allow ranked players to use nuke commands
RankedMultiCmd = true, -- Allow ranked players to use "all" and "team"
arguments
RankedOutput = true, -- Chat the output commands of ranked players
WhisperToRanked = true, -- Use whisper for outputing commands for ranked
players
-- Advanced settings
CustomGuiEnabled = true, -- Use the custom GUI
DebugMode = false, -- Show detailed debug information
VerboseMode = false, -- Show detailed logs
ExecuteCustomCommands = {}, -- Custom commands to add
RemoteSpooferEnabled = true, -- Spoof remote calls for more stealth
AntiRemoteFunctionLogger = true, -- Prevent remote function logging
AntiRequestFunctionLogger = true, -- Prevent request logging
AdminId = 0, -- Your admin ID (0 = only local admin)
ExecutionDelay = 0, -- Delay between command execution
-- Hidden settings (not shown in menu)
_internal = {
scriptLoaded = true,
startTime = os.time(),
executionCount = 0,
killCount = 0,
teleportCount = 0,
commandHistory = {},
errorLog = {},
playerData = {},
configVersion = 3,
executedPlayers = {},
targetPlayerCache = {},
localAdminEnabled = true,
positionHistory = {},
savedPositions = {},
killHistory = {},
bannedPlayers = {},
tempBannedPlayers = {},
autoKillPlayers = {},
trackingPlayers = {},
hookedFunctions = {}
}
}
-- Create a shorter reference to settings for cleaner code
local Settings = _G.PrisonAdminUltra
local COMMANDS = {} -- Will store all command functions
local API = {} -- Will be returned at end of script
-- Service references for better performance
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Rstorage = ReplicatedStorage -- PrizzLife naming convention
local LocalPlayer = Players.LocalPlayer
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local StarterGui = game:GetService("StarterGui")
local Lighting = game:GetService("Lighting")
local ContextActionService = game:GetService("ContextActionService")
local HttpService = game:GetService("HttpService")
local VirtualUser = game:GetService("VirtualUser")
local GuiService = game:GetService("GuiService")
local PhysicsService = game:GetService("PhysicsService")
local MarketplaceService = game:GetService("MarketplaceService")
local TeleportService = game:GetService("TeleportService")
local TextService = game:GetService("TextService")
local CoreGui = game:GetService("CoreGui")
local Teams = game:GetService("Teams")
local Chat = game:GetService("Chat")
-- Verify we're in Prison Life
if game.PlaceId ~= 155615604 and game.PlaceId ~= 4669040 then
warn("This script is designed for Prison Life only")
return
end
-- Create convenience variables
local mouse = LocalPlayer:GetMouse()
local camera = Workspace.CurrentCamera
-- =======================================
-- TELEPORTATION & LOCATION DATA
-- =======================================
-- Anti-detection for teleports (exact coordinates scrambled slightly)
local TeleportLocations = {
["yard"] = CFrame.new(779.87 + math.random(-0.2, 0.2), 96.001 + math.random(-
0.1, 0.1), 2458.93 + math.random(-0.2, 0.2)),
["cells"] = CFrame.new(916.61 + math.random(-0.2, 0.2), 99.99 + math.random(-
0.1, 0.1), 2458.93 + math.random(-0.2, 0.2)),
["cafeteria"] = CFrame.new(918.40 + math.random(-0.2, 0.2), 99.99 +
math.random(-0.1, 0.1), 2325.20 + math.random(-0.2, 0.2)),
["armory"] = CFrame.new(789.75 + math.random(-0.2, 0.2), 99.99 + math.random(-
0.1, 0.1), 2260.55 + math.random(-0.2, 0.2)),
["base"] = CFrame.new(-943.46 + math.random(-0.2, 0.2), 94.13 + math.random(-
0.1, 0.1), 2063.63 + math.random(-0.2, 0.2)),
["tower"] = CFrame.new(822.24 + math.random(-0.2, 0.2), 130.39 + math.random(-
0.1, 0.1), 2588.75 + math.random(-0.2, 0.2)),
["prison"] = CFrame.new(918.77 + math.random(-0.2, 0.2), 100 + math.random(-
0.1, 0.1), 2379.07 + math.random(-0.2, 0.2)),
["roof"] = CFrame.new(820.31 + math.random(-0.2, 0.2), 118.99 + math.random(-
0.1, 0.1), 2378.93 + math.random(-0.2, 0.2)),
["gate"] = CFrame.new(505.61 + math.random(-0.2, 0.2), 102.69 + math.random(-
0.1, 0.1), 2250.49 + math.random(-0.2, 0.2)),
["sewers"] = CFrame.new(917.69 + math.random(-0.2, 0.2), 78.3 + math.random(-
0.1, 0.1), 2292.54 + math.random(-0.2, 0.2)),
["parking"] = CFrame.new(591.81 + math.random(-0.2, 0.2), 98 + math.random(-
0.1, 0.1), 2340.79 + math.random(-0.2, 0.2)),
["crimbase"] = CFrame.new(-943.46 + math.random(-0.2, 0.2), 94.13 +
math.random(-0.1, 0.1), 2063.63 + math.random(-0.2, 0.2)),
["armoury"] = CFrame.new(789.75 + math.random(-0.2, 0.2), 99.99 + math.random(-
0.1, 0.1), 2260.55 + math.random(-0.2, 0.2)),
["cafe"] = CFrame.new(918.40 + math.random(-0.2, 0.2), 99.99 + math.random(-
0.1, 0.1), 2325.20 + math.random(-0.2, 0.2)),
["entrance"] = CFrame.new(698.04 + math.random(-0.2, 0.2), 99.39 +
math.random(-0.1, 0.1), 2252.18 + math.random(-0.2, 0.2)),
["kitchen"] = CFrame.new(906.24 + math.random(-0.2, 0.2), 99.99 + math.random(-
0.1, 0.1), 2237.73 + math.random(-0.2, 0.2)),
["guardroom"] = CFrame.new(836.58 + math.random(-0.2, 0.2), 99.99 +
math.random(-0.1, 0.1), 2284.97 + math.random(-0.2, 0.2)),
["security"] = CFrame.new(791.86 + math.random(-0.2, 0.2), 99.99 +
math.random(-0.1, 0.1), 2318.08 + math.random(-0.2, 0.2)),
["office"] = CFrame.new(937.74 + math.random(-0.2, 0.2), 99.99 + math.random(-
0.1, 0.1), 2236.99 + math.random(-0.2, 0.2)),
["secret"] = CFrame.new(680.39 + math.random(-0.2, 0.2), 112.19 + math.random(-
0.1, 0.1), 2331.33 + math.random(-0.2, 0.2)),
["secretroom"] = CFrame.new(680.39 + math.random(-0.2, 0.2), 112.19 +
math.random(-0.1, 0.1), 2331.33 + math.random(-0.2, 0.2)),
["underground"] = CFrame.new(916.79 + math.random(-0.2, 0.2), 78.3 +
math.random(-0.1, 0.1), 2288.77 + math.random(-0.2, 0.2)),
["visitor"] = CFrame.new(789.45 + math.random(-0.2, 0.2), 99.99 + math.random(-
0.1, 0.1), 2328.53 + math.random(-0.2, 0.2)),
["bridge"] = CFrame.new(621.89 + math.random(-0.2, 0.2), 113.82 + math.random(-
0.1, 0.1), 2410.68 + math.random(-0.2, 0.2)),
["cellblock"] = CFrame.new(917.91 + math.random(-0.2, 0.2), 99.99 +
math.random(-0.1, 0.1), 2445.21 + math.random(-0.2, 0.2)),
["showers"] = CFrame.new(919.23 + math.random(-0.2, 0.2), 99.99 + math.random(-
0.1, 0.1), 2416.02 + math.random(-0.2, 0.2)),
["maingate"] = CFrame.new(504.35 + math.random(-0.2, 0.2), 102.76 +
math.random(-0.1, 0.1), 2246.08 + math.random(-0.2, 0.2)),
["street"] = CFrame.new(360.91 + math.random(-0.2, 0.2), 72.54 + math.random(-
0.1, 0.1), 2335.59 + math.random(-0.2, 0.2)),
["swat"] = CFrame.new(831.07 + math.random(-0.2, 0.2), 99.99 + math.random(-
0.1, 0.1), 2264.78 + math.random(-0.2, 0.2)),
["helipad"] = CFrame.new(812.41 + math.random(-0.2, 0.2), 130.27 +
math.random(-0.1, 0.1), 2606.85 + math.random(-0.2, 0.2)),
["voidtele"] = CFrame.new(972.69 + math.random(-0.2, 0.2), -3.64 +
math.random(-0.1, 0.1), 2282.53 + math.random(-0.2, 0.2)),
["void"] = CFrame.new(972.69 + math.random(-0.2, 0.2), -100.64 + math.random(-
0.1, 0.1), 2282.53 + math.random(-0.2, 0.2)),
["yard2"] = CFrame.new(887.68 + math.random(-0.2, 0.2), 98.001 + math.random(-
0.1, 0.1), 2388.65 + math.random(-0.2, 0.2)),
["specialcell"] = CFrame.new(911.67 + math.random(-0.2, 0.2), 99.99 +
math.random(-0.1, 0.1), 2459.13 + math.random(-0.2, 0.2)),
["middle"] = CFrame.new(882.48 + math.random(-0.2, 0.2), 98.45 + math.random(-
0.1, 0.1), 2261.42 + math.random(-0.2, 0.2)),
["backgate"] = CFrame.new(967.62 + math.random(-0.2, 0.2), 98.8 + math.random(-
0.1, 0.1), 2172.24 + math.random(-0.2, 0.2)),
["frontgate"] = CFrame.new(505.61 + math.random(-0.2, 0.2), 102.69 +
math.random(-0.1, 0.1), 2250.49 + math.random(-0.2, 0.2)),
["entrance2"] = CFrame.new(781.56 + math.random(-0.2, 0.2), 99.99 +
math.random(-0.1, 0.1), 2252.93 + math.random(-0.2, 0.2)),
["hallway"] = CFrame.new(831.21 + math.random(-0.2, 0.2), 99.99 + math.random(-
0.1, 0.1), 2319.46 + math.random(-0.2, 0.2)),
["classroom"] = CFrame.new(832.08 + math.random(-0.2, 0.2), 100.39 +
math.random(-0.1, 0.1), 2350.64 + math.random(-0.2, 0.2)),
["staffroom"] = CFrame.new(881.79 + math.random(-0.2, 0.2), 99.99 +
math.random(-0.1, 0.1), 2239.76 + math.random(-0.2, 0.2)),
["secretgate"] = CFrame.new(666.8 + math.random(-0.2, 0.2), 97.76 +
math.random(-0.1, 0.1), 2587.67 + math.random(-0.2, 0.2)),
["hill"] = CFrame.new(879.56 + math.random(-0.2, 0.2), 126.47 + math.random(-
0.1, 0.1), 2586.71 + math.random(-0.2, 0.2)),
["fence"] = CFrame.new(819.16 + math.random(-0.2, 0.2), 97.75 + math.random(-
0.1, 0.1), 2567.60 + math.random(-0.2, 0.2)),
["tower2"] = CFrame.new(929.43 + math.random(-0.2, 0.2), 129.73 + math.random(-
0.1, 0.1), 2587.44 + math.random(-0.2, 0.2)),
["inneryard"] = CFrame.new(831.14 + math.random(-0.2, 0.2), 97.99 +
math.random(-0.1, 0.1), 2505.17 + math.random(-0.2, 0.2)),
["porch"] = CFrame.new(747.11 + math.random(-0.2, 0.2), 98.2 + math.random(-
0.1, 0.1), 2323.39 + math.random(-0.2, 0.2)),
["door"] = CFrame.new(750.47 + math.random(-0.2, 0.2), 99.99 + math.random(-
0.1, 0.1), 2297.12 + math.random(-0.2, 0.2)),
["workshop"] = CFrame.new(775.19 + math.random(-0.2, 0.2), 97.73 +
math.random(-0.1, 0.1), 2540.72 + math.random(-0.2, 0.2)),
["power"] = CFrame.new(704.55 + math.random(-0.2, 0.2), 97.83 + math.random(-
0.1, 0.1), 2467.41 + math.random(-0.2, 0.2)),
["powerstation"] = CFrame.new(704.55 + math.random(-0.2, 0.2), 97.83 +
math.random(-0.1, 0.1), 2467.41 + math.random(-0.2, 0.2)),
["carspawn"] = CFrame.new(683.25 + math.random(-0.2, 0.2), 101.28 +
math.random(-0.1, 0.1), 2366.11 + math.random(-0.2, 0.2)),
["carpark"] = CFrame.new(591.81 + math.random(-0.2, 0.2), 98 + math.random(-
0.1, 0.1), 2340.79 + math.random(-0.2, 0.2)),
["outside"] = CFrame.new(315.05 + math.random(-0.2, 0.2), 86.07 + math.random(-
0.1, 0.1), 2224.02 + math.random(-0.2, 0.2)),
["road"] = CFrame.new(376.31 + math.random(-0.2, 0.2), 72.07 + math.random(-
0.1, 0.1), 2254.06 + math.random(-0.2, 0.2)),
["forest"] = CFrame.new(374.94 + math.random(-0.2, 0.2), 77.1 + math.random(-
0.1, 0.1), 2427.41 + math.random(-0.2, 0.2)),
["mountain"] = CFrame.new(561.64 + math.random(-0.2, 0.2), 168.54 +
math.random(-0.1, 0.1), 2551.6 + math.random(-0.2, 0.2)),
["lake"] = CFrame.new(250.99 + math.random(-0.2, 0.2), 72.35 + math.random(-
0.1, 0.1), 2367.44 + math.random(-0.2, 0.2)),
["store"] = CFrame.new(-6.95 + math.random(-0.2, 0.2), 46.05 + math.random(-
0.1, 0.1), 1794.85 + math.random(-0.2, 0.2)),
["donut"] = CFrame.new(253.68 + math.random(-0.2, 0.2), 72.75 + math.random(-
0.1, 0.1), 2157.57 + math.random(-0.2, 0.2)),
["gas"] = CFrame.new(488.84 + math.random(-0.2, 0.2), 72.47 + math.random(-0.1,
0.1), 1602.51 + math.random(-0.2, 0.2)),
["gasstation"] = CFrame.new(488.84 + math.random(-0.2, 0.2), 72.47 +
math.random(-0.1, 0.1), 1602.51 + math.random(-0.2, 0.2)),
["bank"] = CFrame.new(803.21 + math.random(-0.2, 0.2), 71.79 + math.random(-
0.1, 0.1), 1601.75 + math.random(-0.2, 0.2)),
["jewelry"] = CFrame.new(170.9 + math.random(-0.2, 0.2), 73.06 + math.random(-
0.1, 0.1), 1422.29 + math.random(-0.2, 0.2)),
["jewelrystore"] = CFrame.new(170.9 + math.random(-0.2, 0.2), 73.06 +
math.random(-0.1, 0.1), 1422.29 + math.random(-0.2, 0.2)),
["museum"] = CFrame.new(1100.39 + math.random(-0.2, 0.2), 80.67 + math.random(-
0.1, 0.1), 1299.81 + math.random(-0.2, 0.2)),
["casino"] = CFrame.new(350.87 + math.random(-0.2, 0.2), 78.81 + math.random(-
0.1, 0.1), 1231.25 + math.random(-0.2, 0.2)),
["trainstation"] = CFrame.new(618.93 + math.random(-0.2, 0.2), 82.57 +
math.random(-0.1, 0.1), 1193.77 + math.random(-0.2, 0.2)),
["gunshop"] = CFrame.new(394.2 + math.random(-0.2, 0.2), 77.3 + math.random(-
0.1, 0.1), 1581.64 + math.random(-0.2, 0.2)),
["gun"] = CFrame.new(394.2 + math.random(-0.2, 0.2), 77.3 + math.random(-0.1,
0.1), 1581.64 + math.random(-0.2, 0.2)),
["gym"] = CFrame.new(709.72 + math.random(-0.2, 0.2), 99.99 + math.random(-0.1,
0.1), 2368.55 + math.random(-0.2, 0.2)),
["exercise"] = CFrame.new(756.63 + math.random(-0.2, 0.2), 97.75 +
math.random(-0.1, 0.1), 2327.2 + math.random(-0.2, 0.2)),
["weight"] = CFrame.new(756.98 + math.random(-0.2, 0.2), 97.75 + math.random(-
0.1, 0.1), 2334.52 + math.random(-0.2, 0.2)),
["bench"] = CFrame.new(756.98 + math.random(-0.2, 0.2), 97.75 + math.random(-
0.1, 0.1), 2334.52 + math.random(-0.2, 0.2)),
["basketballcourt"] = CFrame.new(784.25 + math.random(-0.2, 0.2), 97.75 +
math.random(-0.1, 0.1), 2432.55 + math.random(-0.2, 0.2)),
["basketball"] = CFrame.new(784.25 + math.random(-0.2, 0.2), 97.75 +
math.random(-0.1, 0.1), 2432.55 + math.random(-0.2, 0.2)),
["soccerfield"] = CFrame.new(779.34 + math.random(-0.2, 0.2), 97.75 +
math.random(-0.1, 0.1), 2376.8 + math.random(-0.2, 0.2)),
["soccer"] = CFrame.new(779.34 + math.random(-0.2, 0.2), 97.75 + math.random(-
0.1, 0.1), 2376.8 + math.random(-0.2, 0.2)),
["field"] = CFrame.new(779.34 + math.random(-0.2, 0.2), 97.75 + math.random(-
0.1, 0.1), 2376.8 + math.random(-0.2, 0.2)),
["ladder"] = CFrame.new(797.8 + math.random(-0.2, 0.2), 97.75 + math.random(-
0.1, 0.1), 2389.52 + math.random(-0.2, 0.2)),
["watchtower"] = CFrame.new(822.24 + math.random(-0.2, 0.2), 130.39 +
math.random(-0.1, 0.1), 2588.75 + math.random(-0.2, 0.2)),
["secondfloor"] = CFrame.new(915.95 + math.random(-0.2, 0.2), 115.06 +
math.random(-0.1, 0.1), 2458.73 + math.random(-0.2, 0.2))
}
-- Extended item locations (for advanced teleporting)
local ItemLocations = {
["m9"] = CFrame.new(821.5, 99.99, 2250.5),
["shotgun"] = CFrame.new(808.6, 99.99, 2250.4),
["ak47"] = CFrame.new(780.3, 99.99, 2250.4),
["hammer"] = CFrame.new(802.9, 99.99, 2250.4),
["knife"] = CFrame.new(802.9, 99.99, 2250.4),
["riot"] = CFrame.new(789.75, 99.99, 2260.55),
["shield"] = CFrame.new(789.75, 99.99, 2260.55),
["car"] = CFrame.new(597.75, 98.2, 2327.5),
["guns"] = CFrame.new(798.4, 99.99, 2251.3),
["keycard"] = CFrame.new(836.58, 99.99, 2284.97),
["breakfast"] = CFrame.new(906.24, 99.99, 2237.73),
["dinner"] = CFrame.new(919.36, 99.99, 2329.31),
["pizza"] = CFrame.new(918.97, 99.99, 2329.94),
["chicken"] = CFrame.new(906.95, 99.99, 2227.12),
["weights"] = CFrame.new(757.56, 97.75, 2331.95),
["bench"] = CFrame.new(757.56, 97.75, 2331.95),
["soccer"] = CFrame.new(778.72, 96.13, 2412.89),
["football"] = CFrame.new(778.72, 96.13, 2412.89),
["ball"] = CFrame.new(778.72, 96.13, 2412.89),
["baseball"] = CFrame.new(946.42, 98.8, 2339.27),
["broom"] = CFrame.new(906.13, 99.99, 2236.09),
["hammer"] = CFrame.new(789.37, 99.99, 2322.31),
["ak"] = CFrame.new(780.3, 99.99, 2250.4),
["rifle"] = CFrame.new(780.3, 99.99, 2250.4),
["remington"] = CFrame.new(808.6, 99.99, 2250.4),
["rem870"] = CFrame.new(808.6, 99.99, 2250.4),
["pistol"] = CFrame.new(821.5, 99.99, 2250.5),
["taser"] = CFrame.new(831.07, 99.99, 2264.78),
["handcuffs"] = CFrame.new(831.07, 99.99, 2264.78),
["pickaxe"] = CFrame.new(906.13, 99.99, 2236.09),
["hammer"] = CFrame.new(906.13, 99.99, 2236.09),
["shiv"] = CFrame.new(906.13, 99.99, 2236.09),
["lockpick"] = CFrame.new(915.95, 115.06, 2458.73),
["c4"] = CFrame.new(915.95, 115.06, 2458.73)
}
-- Vehicle spawn points for comprehensive teleporting
local VehicleSpawnPoints = {
["sedan"] = CFrame.new(650.4, 100.2, 2338.9),
["camaro"] = CFrame.new(612.3, 98.2, 2483.4),
["shuttle"] = CFrame.new(546.2, 98.2, 2329.4),
["police"] = CFrame.new(615.1, 98.2, 2510.6),
["swat"] = CFrame.new(510.2, 103.5, 2245.6),
["car1"] = CFrame.new(614.56, 98.2, 2512.75),
["car2"] = CFrame.new(623.13, 98.2, 2516.77),
["car3"] = CFrame.new(610.62, 98.2, 2470.49),
["car4"] = CFrame.new(617.95, 98.2, 2476.4),
["car5"] = CFrame.new(550.91, 98.2, 2362.38),
["police1"] = CFrame.new(614.56, 98.2, 2512.75),
["police2"] = CFrame.new(623.13, 98.2, 2516.77),
["helicopter"] = CFrame.new(812.41, 130.27, 2606.85),
["heli"] = CFrame.new(812.41, 130.27, 2606.85),
["chopper"] = CFrame.new(812.41, 130.27, 2606.85),
["lambo"] = CFrame.new(612.3, 98.2, 2483.4),
["sports"] = CFrame.new(612.3, 98.2, 2483.4),
["sportscar"] = CFrame.new(612.3, 98.2, 2483.4),
["suv"] = CFrame.new(650.4, 100.2, 2338.9),
["van"] = CFrame.new(546.2, 98.2, 2329.4),
["bus"] = CFrame.new(546.2, 98.2, 2329.4),
["swatvan"] = CFrame.new(510.2, 103.5, 2245.6),
["swattruck"] = CFrame.new(510.2, 103.5, 2245.6),
["truck"] = CFrame.new(547.81, 98.2, 2329.8),
["motorcycle"] = CFrame.new(628.31, 98.2, 2483.73),
["bike"] = CFrame.new(628.31, 98.2, 2483.73),
["atv"] = CFrame.new(628.31, 98.2, 2483.73),
["dirtbike"] = CFrame.new(628.31, 98.2, 2483.73)
}
-- =======================================
-- PERMISSION SYSTEM
-- =======================================
-- Extended permission system with multiple tiers
local PermissionTiers = {
["t1"] = {
["cmds"] = {
-- Movement & teleportation
["kill"] = true, ["loopkill"] = true, ["unloopkill"] = true, ["speed"]
= true, ["tp"] = true,
["teleport"] = true, ["cmds"] = true, ["listcommands"] = true, ["yard"]
= true, ["cells"] = true,
["cafeteria"] = true, ["armory"] = true, ["armoury"] = true, ["base"] =
true, ["crimbase"] = true,
["cafe"] = true, ["tower"] = true, ["prison"] = true, ["roof"] = true,
["gate"] = true, ["sewers"] = true,
["parking"] = true, ["inmate"] = true, ["prisoner"] = true, ["guard"] =
true, ["criminal"] = true,
["crim"] = true, ["m9"] = true, ["shotgun"] = true, ["ak47"] = true,
["riot"] = true, ["gun"] = true, ["guns"] = true,
-- Added from PrizzLife - Basic movement & utility
["fling"] = true, ["fly"] = true, ["noclip"] = true, ["xray"] = true,
["esp"] = true, ["spectate"] = true,
["jumppower"] = true, ["jp"] = true, ["fullbright"] = true, ["fb"] =
true, ["brightness"] = true,
["goto"] = true, ["to"] = true, ["help"] = true, ["h"] = true,
["bring"] = true, ["re"] = true, ["respawn"] = true,
["refresh"] = true, ["jail"] = true, ["arrest"] = true, ["free"] =
true, ["antitase"] = true, ["antiarrest"] = true,
["keycard"] = true, ["removehatsviz"] = true, ["removeaccessoriesviz"]
= true, ["doors"] = true,
["opendoors"] = true, ["closedoors"] = true, ["head"] = true, ["punch"]
= true, ["view"] = true, ["unview"] = true,
-- Additional single-player targeted commands
["hkill"] = true, ["hidekill"] = true, ["voidkill"] = true,
["arrestkill"] = true, ["akill"] = true,
["skydive"] = true, ["sky"] = true, ["tase"] = true, ["handcuff"] =
true, ["cuff"] = true, ["uncuff"] = true,
["walkspeed"] = true, ["ws"] = true, ["jump"] = true, ["gravity"] =
true, ["grav"] = true, ["invisibility"] = true,
["invisible"] = true, ["invis"] = true, ["visible"] = true, ["vis"] =
true, ["shield"] = true, ["shield"] = true,
["freeze"] = true, ["unfreeze"] = true, ["trip"] = true, ["kick"] =
true, ["pm"] = true, ["msg"] = true,
["message"] = true, ["whisper"] = true, ["god"] = true, ["ungod"] =
true, ["forcefield"] = true, ["ff"] = true,
["heal"] = true, ["health"] = true, ["damage"] = true, ["hurt"] = true,
["dress"] = true, ["undress"] = true,
["naked"] = true, ["blind"] = true, ["blind"] = true, ["unblind"] =
true, ["nightvision"] = true, ["nv"] = true,
["thermal"] = true, ["ir"] = true, ["infrared"] = true, ["night"] =
true, ["day"] = true, ["sunset"] = true,
["sunrise"] = true, ["time"] = true, ["clearwalls"] = true,
["restwalls"] = true, ["removebarriers"] = true,
["punch"] = true, ["superpunch"] = true, ["megapunch"] = true,
["oneshot"] = true, ["onepunch"] = true,
-- Basic admin utility
["rejoin"] = true, ["rj"] = true, ["serverhop"] = true, ["shop"] =
true, ["savepos"] = true, ["loadpos"] = true,
["pos"] = true, ["position"] = true, ["tpto"] = true, ["ctp"] = true,
["clicktp"] = true, ["info"] = true,
["find"] = true, ["track"] = true, ["untrack"] = true, ["copy"] = true,
["paste"] = true, ["cut"] = true,
["delete"] = true, ["del"] = true, ["undo"] = true, ["redo"] = true,
["hide"] = true, ["show"] = true,
["exit"] = true, ["quit"] = true, ["settings"] = true, ["options"] =
true, ["config"] = true, ["prefix"] = true,
["setprefix"] = true, ["changeprefix"] = true, ["clear"] = true,
["cls"] = true, ["version"] = true, ["ver"] = true,
["update"] = true, ["check"] = true, ["upgrades"] = true, ["credits"] =
true, ["authors"] = true,
["discord"] = true, ["website"] = true, ["site"] = true, ["web"] =
true, ["forum"] = true
},
["all"] = false,
["desc"] = "Tier 1: Basic admin - Non-disruptive commands and single-player
targeting"
},
["t2"] = {
["cmds"] = {
-- Include all T1 commands
["kill"] = true, ["loopkill"] = true, ["unloopkill"] = true, ["speed"]
= true, ["tp"] = true,
["teleport"] = true, ["kick"] = true, ["jail"] = true, ["free"] = true,
["team"] = true, ["cmds"] = true,
["listcommands"] = true, ["yard"] = true, ["cells"] = true,
["cafeteria"] = true, ["armory"] = true,
["armoury"] = true, ["base"] = true, ["crimbase"] = true, ["cafe"] =
true, ["tower"] = true,
["prison"] = true, ["roof"] = true, ["gate"] = true, ["sewers"] = true,
["parking"] = true,
["inmate"] = true, ["prisoner"] = true, ["guard"] = true, ["criminal"]
= true, ["crim"] = true,
["gun"] = true, ["guns"] = true, ["riot"] = true, ["m9"] = true,
["shotgun"] = true, ["ak47"] = true,
["meleekill"] = true, ["mkill"] = true, ["meleeaura"] = true,
["tkillaura"] = true, ["autoguns"] = true,
["antitase"] = true, ["antiarrest"] = true, ["antishoot"] = true,
["antipunch"] = true, ["fullbright"] = true,
["antivoid"] = true, ["antifling"] = true, ["antishield"] = true,
["antibring"] = true,
["fling"] = true, ["fly"] = true, ["noclip"] = true, ["esp"] = true,
["xray"] = true, ["spectate"] = true,
["killaura"] = true, ["tase"] = true, ["shield"] = true, ["freeze"] =
true, ["unfreeze"] = true,
["explode"] = true, ["loopexplode"] = true, ["jumppower"] = true,
["jp"] = true, ["goto"] = true,
["to"] = true, ["help"] = true, ["h"] = true, ["bring"] = true, ["re"]
= true, ["respawn"] = true,
["refresh"] = true, ["arrest"] = true, ["keycard"] = true, ["taser"] =
true, ["doors"] = true,
["opendoors"] = true, ["closedoors"] = true, ["invisibility"] = true,
["invis"] = true, ["visible"] = true,
["vis"] = true, ["godmode"] = true, ["god"] = true, ["ff"] = true,
["forcefield"] = true, ["headbring"] = true,
["head"] = true, ["punch"] = true, ["spampunch"] = true, ["view"] =
true, ["unview"] = true, ["skydive"] = true,
["sky"] = true, ["gravity"] = true, ["grav"] = true, ["savepos"] =
true, ["loadpos"] = true, ["void"] = true,
["removehatsviz"] = true, ["removeaccessoriesviz"] = true,
["removefaces"] = true,
["hkill"] = true, ["hidekill"] = true, ["voidkill"] = true,
["arrestkill"] = true, ["akill"] = true,
["skydive"] = true, ["sky"] = true, ["tase"] = true, ["handcuff"] =
true, ["cuff"] = true, ["uncuff"] = true,
["walkspeed"] = true, ["ws"] = true, ["jump"] = true, ["gravity"] =
true, ["grav"] = true, ["invisibility"] = true,
["invisible"] = true, ["invis"] = true, ["visible"] = true, ["vis"] =
true, ["shield"] = true, ["shield"] = true,
["freeze"] = true, ["unfreeze"] = true, ["trip"] = true, ["kick"] =
true, ["pm"] = true, ["msg"] = true,
["message"] = true, ["whisper"] = true, ["god"] = true, ["ungod"] =
true, ["forcefield"] = true, ["ff"] = true,
["heal"] = true, ["health"] = true, ["damage"] = true, ["hurt"] = true,
["dress"] = true, ["undress"] = true,
["naked"] = true, ["blind"] = true, ["blind"] = true, ["unblind"] =
true, ["nightvision"] = true, ["nv"] = true,
["thermal"] = true, ["ir"] = true, ["infrared"] = true, ["night"] =
true, ["day"] = true, ["sunset"] = true,
["sunrise"] = true, ["time"] = true, ["clearwalls"] = true,
["restwalls"] = true, ["removebarriers"] = true,
["punch"] = true, ["superpunch"] = true, ["megapunch"] = true,
["oneshot"] = true, ["onepunch"] = true,
["rejoin"] = true, ["rj"] = true, ["serverhop"] = true, ["shop"] =
true, ["savepos"] = true, ["loadpos"] = true,
["pos"] = true, ["position"] = true, ["tpto"] = true, ["ctp"] = true,
["clicktp"] = true, ["info"] = true,
["find"] = true, ["track"] = true, ["untrack"] = true, ["copy"] = true,
["paste"] = true, ["cut"] = true,
["delete"] = true, ["del"] = true, ["undo"] = true, ["redo"] = true,
["hide"] = true, ["show"] = true,
["exit"] = true, ["quit"] = true, ["settings"] = true, ["options"] =
true, ["config"] = true, ["prefix"] = true,
["setprefix"] = true, ["changeprefix"] = true, ["clear"] = true,
["cls"] = true, ["version"] = true, ["ver"] = true,
["update"] = true, ["check"] = true, ["upgrades"] = true, ["credits"] =
true, ["authors"] = true,
["discord"] = true, ["website"] = true, ["site"] = true, ["web"] =
true, ["forum"] = true,
-- Additional multi-player capabilities
["teleportall"] = true, ["tpall"] = true, ["bringall"] = true,
["joinlogs"] = true, ["exitlogs"] = true,
["killogs"] = true, ["clicktp"] = true, ["ctp"] = true, ["clickkill"] =
true, ["ck"] = true,
["clickarrest"] = true, ["ca"] = true, ["clicktase"] = true, ["ct"] =
true, ["antilag"] = true,
["clearmap"] = true, ["crash"] = true, ["car"] = true, ["vehicle"] =
true, ["helicopter"] = true,
["heli"] = true, ["noragdoll"] = true, ["gravity"] = true, ["grav"] =
true, ["time"] = true,
["day"] = true, ["night"] = true, ["admin"] = true, ["unadmin"] = true,
["rank"] = true, ["unrank"] = true,
["whitelist"] = true, ["unwhitelist"] = true, ["blacklist"] = true,
["unblacklist"] = true, ["voidall"] = true,
["prison"] = true, ["teleportenemies"] = true, ["tpenemies"] = true,
["bringenemies"] = true,
["killenemies"] = true, ["loopkillteam"] = true, ["unloopkillteam"] =
true
},
["all"] = true,
["desc"] = "Tier 2: Full admin - All basic commands plus multi-player
targeting"
},
["t3"] = {
["cmds"] = {
-- Include all T1 & T2 commands (implied but not listed for brevity)
-- Advanced admin commands
["crash"] = true, ["crashserver"] = true, ["lagserver"] = true,
["breakserver"] = true, ["shutdown"] = true,
["nuke"] = true, ["nuke"] = true, ["nukemap"] = true, ["killall"] =
true, ["freezeall"] = true,
["unfreezeall"] = true, ["kickall"] = true, ["banall"] = true,
["explodeall"] = true, ["flingall"] = true,
["taseall"] = true, ["arrestall"] = true, ["unarrestall"] = true,
["godall"] = true, ["ungodall"] = true,
["tripall"] = true, ["crashall"] = true, ["spamall"] = true,
["voidall"] = true, ["blindall"] = true,
["unblindall"] = true, ["invisall"] = true, ["visall"] = true,
["healall"] = true, ["killallguards"] = true,
["killallinmates"] = true, ["killallcriminals"] = true, ["loopkillall"]
= true, ["unloopkillall"] = true,
["loopexplodeall"] = true, ["unloopexplodeall"] = true,
["looparrestall"] = true, ["unlooparrestall"] = true,
["looptaseall"] = true, ["unlooptaseall"] = true, ["loopflingall"] =
true, ["unloopflingall"] = true,
["loopcrashall"] = true, ["unloopcrashall"] = true, ["createteam"] =
true, ["deleteteam"] = true,
["teamcolor"] = true, ["teamsadd"] = true, ["teamremove"] = true,
["spawnvehicle"] = true, ["spawncar"] = true,
["spawnweapon"] = true, ["giveall"] = true, ["giveallguards"] = true,
["giveallcriminals"] = true,
["giveallprisoners"] = true, ["setscriptdata"] = true,
["getscriptdata"] = true, ["clearscriptdata"] = true,
["replicatestorage"] = true, ["serverstorage"] = true,
["setglobaldata"] = true, ["getglobaldata"] = true,
["clearglobaldata"] = true, ["serverban"] = true, ["serverunban"] =
true, ["serverbanlist"] = true,
["serverbanallbut"] = true, ["serverbanteam"] = true,
["serverlockdown"] = true, ["serverlockdownoff"] = true,
["awardadminteam"] = true, ["antiadminabuse"] = true, ["serveresp"] =
true, ["makeplayerlaggy"] = true,
["fixlaggyplayer"] = true, ["massexplode"] = true, ["silentaim"] =
true, ["silentaimoff"] = true,
["superadmin"] = true, ["admin"] = true, ["btools"] = true,
["explorer"] = true, ["dex"] = true,
["remotespy"] = true
},
["all"] = true,
["desc"] = "Tier 3: Super admin - Mass commands and server manipulation"
},
["owner"] = {
["cmds"] = {
-- Include all commands (implied but not listed for brevity)
-- Reserved for the owner - critical commands
["banish"] = true, ["permaban"] = true, ["unban"] = true,
["lockserver"] = true, ["unlockserver"] = true,
["shutdown"] = true, ["banall"] = true, ["troll"] = true, ["infectall"]
= true, ["godmode"] = true,
["antigod"] = true, ["forcereset"] = true, ["resetall"] = true,
["superpowers"] = true, ["script"] = true,
["dex"] = true, ["removeanticheat"] = true, ["btools"] = true,
["terminate"] = true, ["forcecrash"] = true,
["serverdestroy"] = true, ["clearalldata"] = true, ["removealldata"] =
true, ["destroyanticheat"] = true,
["overrideanticheat"] = true, ["togglegamescripts"] = true,
["toggleallscripts"] = true,
["injectserverscript"] = true, ["executeserverside"] = true,
["getserversecrets"] = true,
["readservermemory"] = true, ["writeservermemory"] = true,
["executeonserver"] = true,
["serverscriptservice"] = true, ["replaceserverscript"] = true,
["backdoorserver"] = true,
["rootpermissions"] = true, ["rootserver"] = true, ["serverowner"] =
true, ["createbackdoor"] = true,
["createserverkey"] = true, ["allgameaccess"] = true,
["completegameaccess"] = true,
["admineveryone"] = true, ["adminteam"] = true, ["unadmineveryone"] =
true, ["masterkey"] = true,
["accessserver"] = true, ["serveraccess"] = true, ["givepermissions"] =
true, ["takepermissions"] = true,
["deleteserver"] = true, ["killserver"] = true, ["damagestatus"] =
true, ["pingserver"] = true,
["getplayerprivatedata"] = true, ["destroyadmin"] = true,
["neutralizeadmin"] = true,
["createpermanentkey"] = true, ["injectpermanentscript"] = true,
["backuppermissions"] = true,
["restorepermissions"] = true, ["nullifyadmin"] = true,
["destroyantiadmin"] = true,
["hackserver"] = true, ["serverhack"] = true, ["injectrootkit"] = true,
["rootkitinstall"] = true,
["rootkituninstall"] = true, ["installadminpackage"] = true,
["uninstalladminpackage"] = true,
["accessserverbackend"] = true, ["accessadminbackend"] = true,
["accessbackendfunction"] = true,
["unlockbackend"] = true, ["lockbackend"] = true,
["createserveraccess"] = true,
["deleteserveraccess"] = true, ["createbackendchannel"] = true,
["deletebackendchannel"] = true
},
["all"] = true,
["desc"] = "Owner: Absolute control - Everything, including server control"
}
}
-- Alias mapping for commands (so multiple command strings can trigger same
function)
local CommandAliases = {
["teleport"] = "tp",
["cmds"] = "listcommands",
["commands"] = "listcommands",
["help"] = "listcommands",
["cafe"] = "cafeteria",
["armoury"] = "armory",
["criminal"] = "crim",
["mkill"] = "meleekill",
["akill"] = "arrestkill",
["goto"] = "tp",
["bring"] = "tp",
["shop"] = "store",
["explode"] = "kaboom",
["boom"] = "kaboom",
["invis"] = "invisible",
["vis"] = "visible",
["ctp"] = "clicktp",
["lagserver"] = "crash",
["reset"] = "respawn",
["ws"] = "speed",
["jp"] = "jumppower",
["hkill"] = "hidekill",
["h"] = "help",
["g"] = "gun",
["k"] = "kill",
["lk"] = "loopkill",
["sg"] = "shotgun",
["p"] = "prisoner",
["i"] = "inmate",
["c"] = "crim",
["cr"] = "crim",
["gd"] = "guard",
["clearall"] = "clear",
["clearcmds"] = "clear",
["fix"] = "respawn",
["die"] = "respawn",
["r"] = "respawn",
["re"] = "respawn",
["refreshcharacter"] = "respawn",
["refresh"] = "respawn",
["heli"] = "helicopter",
["tpall"] = "teleportall",
["ka"] = "killaura",
["ff"] = "forcefield",
["godmode"] = "god",
["grav"] = "gravity",
["serverhop"] = "shop",
["cls"] = "clear",
["ver"] = "version",
["info"] = "playerinfo",
["rj"] = "rejoin",
["cars"] = "car",
["rank"] = "admin",
["unrank"] = "unadmin",
["btools"] = "buildtools",
["explorer"] = "dex",
["setprefix"] = "prefix",
["changeprefix"] = "prefix",
["inf"] = "infinite",
["invisible"] = "invis",
["visible"] = "vis",
["cuff"] = "handcuff",
["uncuff"] = "unhandcuff",
["killenemies"] = "killteam",
["remotespy"] = "rspy",
["walkspeed"] = "speed",
["jump"] = "jumppower",
["message"] = "msg",
["whisper"] = "pm",
["private"] = "pm",
["pistol"] = "m9",
["shotty"] = "shotgun",
["snipe"] = "sniperrifle",
["gun"] = "weapons",
["weapons"] = "guns",
["rifle"] = "ak47",
["items"] = "guns",
["gear"] = "guns",
["kill"] = "meleekill",
["tele"] = "teleport",
["warp"] = "teleport",
["godmode"] = "god",
["invincible"] = "god",
["heal"] = "health",
["revive"] = "heal",
["mods"] = "weapons",
["meleekill"] = "mkill",
["invis"] = "invisible",
["vis"] = "visible",
["vanish"] = "invisible",
["appear"] = "visible",
["hide"] = "invisible",
["show"] = "visible",
["goback"] = "return",
["savecf"] = "savepos",
["loadcf"] = "loadpos",
["tpto"] = "goto",
["tpme"] = "bring",
["summon"] = "bring",
["fetch"] = "bring",
["stuck"] = "respawn",
["glitch"] = "respawn",
["force"] = "power",
["quicksand"] = "forcefield",
["shield"] = "forcefield",
["protect"] = "forcefield",
["defend"] = "forcefield",
["trip"] = "fall",
["stumble"] = "fall",
["injure"] = "damage",
["hurt"] = "damage",
["pain"] = "damage",
["punch"] = "hit",
["slap"] = "hit",
["strike"] = "hit",
["remove"] = "delete",
["destroy"] = "delete",
["erase"] = "delete",
["skyfall"] = "skydive",
["fallfromsky"] = "skydive",
["giveaccess"] = "admin",
["authorize"] = "admin",
["removeaccess"] = "unadmin",
["deauthorize"] = "unadmin",
["handcuff"] = "arrest",
["detain"] = "arrest",
["catch"] = "arrest",
["free"] = "release",
["uncuff"] = "release",
["liberate"] = "release",
["unarrest"] = "release",
["kick"] = "boot",
["remove"] = "boot",
["eject"] = "boot",
["showall"] = "unhideall",
["tele"] = "tp"
}
-- =======================================
-- UTILITY FUNCTIONS & CORE MECHANICS
-- =======================================
-- Notification system (PrizzLife style)
local function Notif(title, text, duration)
duration = duration or 3
if Settings.CommandNotify then
pcall(function()
game.StarterGui:SetCore("SendNotification", {
Title = title or "Notification",
Text = text or "",
Duration = duration
})
end)
end
if Settings.VerboseMode then
print("[" .. title .. "] " .. text)
end
-- Keep track of execution count
Settings._internal.executionCount = Settings._internal.executionCount + 1
-- Store in command history
table.insert(Settings._internal.commandHistory, {
title = title,
text = text,
time = os.time()
})
-- Keep history at reasonable size
if #Settings._internal.commandHistory > 50 then
table.remove(Settings._internal.commandHistory, 1)
end
end
-- Send notification in chat with stealth
local function sendNotification(message, color)
color = color or Color3.fromRGB(255, 255, 0)
pcall(function()
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
Text = "[ADMIN] " .. message,
Color = color,
Font = Enum.Font.SourceSansBold
})
end)
if Settings.VerboseMode then
print("[ADMIN] " .. message)
end
end
-- Send message with stealth (whisper)
local function sendWhisper(player, message)
if not player then return end
pcall(function()
if Settings.WhisperToRanked and
ReplicatedStorage:FindFirstChild("DefaultChatSystemChatEvents") then
ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer("/w " ..
player.Name .. " " .. message, "All")
else
ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(message,
"All")
end
end)
if player == LocalPlayer then
sendNotification(message)
end
end
-- Enhanced Find player function (combines both scripts' player finders)
local function findPlayer(arg, speaker)
if not arg then return speaker end
speaker = speaker or LocalPlayer
-- Handle special cases
if typeof(arg) == "string" then
arg = arg:lower()
if arg == "me" then
return speaker
elseif arg == "all" then
return "all"
elseif arg == "others" then
return "others"
elseif arg == "random" then
local playerList = Players:GetPlayers()
return playerList[math.random(1, #playerList)]
elseif arg == "nearest" or arg == "closest" then
local nearest, dist = nil, math.huge
for _, player in pairs(Players:GetPlayers()) do
if player ~= speaker and
speaker.Character and
speaker.Character:FindFirstChild("HumanoidRootPart") and
player.Character and
player.Character:FindFirstChild("HumanoidRootPart") then
local magnitude = (speaker.Character.HumanoidRootPart.Position
- player.Character.HumanoidRootPart.Position).magnitude
if magnitude < dist then
dist = magnitude
nearest = player
end
end
end
return nearest
elseif arg == "farthest" then
local farthest, dist = nil, 0
for _, player in pairs(Players:GetPlayers()) do
if player ~= speaker and
speaker.Character and
speaker.Character:FindFirstChild("HumanoidRootPart") and
player.Character and
player.Character:FindFirstChild("HumanoidRootPart") then
local magnitude = (speaker.Character.HumanoidRootPart.Position
- player.Character.HumanoidRootPart.Position).magnitude
if magnitude > dist then
dist = magnitude
farthest = player
end
end
end
return farthest
elseif arg == "team" then
local sameTeam = {}
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and player ~= speaker then
table.insert(sameTeam, player)
end
end
if #sameTeam > 0 then
return "team", sameTeam
else
return nil
end
elseif arg == "inmates" or arg == "prisoners" then
local teams = {}
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor.Name == "Bright orange" then
table.insert(teams, player)
end
end
return "inmates", teams
elseif arg == "guards" then
local teams = {}
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor.Name == "Bright blue" then
table.insert(teams, player)
end
end
return "guards", teams
elseif arg == "criminals" or arg == "crims" then
local teams = {}
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor.Name == "Really red" then
table.insert(teams, player)
end
end
return "criminals", teams
elseif arg == "enemies" or arg == "enemy" then
local enemies = {}
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor ~= myTeam then
table.insert(enemies, player)
end
end
if #enemies > 0 then
return "enemies", enemies
else
return nil
end
elseif arg == "whitelist" or arg == "whitelisted" then
local whitelist = {}
for name, _ in pairs(Settings.WhitelistedPlayers) do
local player = Players:FindFirstChild(name)
if player then
table.insert(whitelist, player)
end
end
if #whitelist > 0 then
return "whitelist", whitelist
else
return nil
end
elseif arg == "blacklist" or arg == "blacklisted" then
local blacklist = {}
for name, _ in pairs(Settings.BlacklistedPlayers) do
local player = Players:FindFirstChild(name)
if player then
table.insert(blacklist, player)
end
end
if #blacklist > 0 then
return "blacklist", blacklist
else
return nil
end
elseif arg == "ranked" then
local ranked = {}
for name, _ in pairs(Settings.RankedPlayers) do
local player = Players:FindFirstChild(name)
if player then
table.insert(ranked, player)
end
end
if #ranked > 0 then
return "ranked", ranked
else
return nil
end
else
-- Check exact name match
for _, player in pairs(Players:GetPlayers()) do
if player.Name:lower() == arg then
return player
end
end
-- Check display name match
for _, player in pairs(Players:GetPlayers()) do
if player.DisplayName:lower() == arg then
return player
end
end
-- Check partial name match
for _, player in pairs(Players:GetPlayers()) do
if player.Name:lower():sub(1, #arg) == arg then
return player
end
end
-- Check partial display name match
for _, player in pairs(Players:GetPlayers()) do
if player.DisplayName:lower():sub(1, #arg) == arg then
return player
end
end
-- Check if name contains string
for _, player in pairs(Players:GetPlayers()) do
if player.Name:lower():find(arg, 1, true) then
return player
end
end
-- Check if display name contains string
for _, player in pairs(Players:GetPlayers()) do
if player.DisplayName:lower():find(arg, 1, true) then
return player
end
end
end
end
return nil
end
-- Function to check if a player has specific admin permission
local function hasPermission(player, command)
if player == LocalPlayer then
return true -- Local player (script executor) always has permission
end
if Settings.RankedPlayers[player.Name] then
local tier = Settings.RankedPlayers[player.Name]
if tier and PermissionTiers[tier] then
if PermissionTiers[tier]["cmds"][command:lower()] then
return true
end
end
end
return false
end
-- Function to check if a player can use "all" or "team" targets
local function canUseMultiTarget(player)
if player == LocalPlayer then
return true -- Local player can always use multi-targeting
end
if Settings.RankedMultiCmd and Settings.RankedPlayers[player.Name] then
local tier = Settings.RankedPlayers[player.Name]
if tier and PermissionTiers[tier] then
return PermissionTiers[tier]["all"]
end
end
return false
end
-- Verify the arguments (player + target) are valid
local function verifyArgs(player, target, command)
if not player or not target then return false end
-- Always allow local player to run commands on self
if player == LocalPlayer and target == LocalPlayer then
return true
end
-- Check if the player has permission to run this command
if not hasPermission(player, command) then
return false
end
-- Check multi-target permissions
if target == "all" or target == "team" or target == "others" then
if not canUseMultiTarget(player) then
return false
end
end
-- Check if target is whitelisted (protected)
if typeof(target) == "Instance" and target:IsA("Player") then
if Settings.WhitelistedPlayers[target.Name] and player ~= LocalPlayer then
return false
end
end
return true
}
-- Implement proper stealth hooking for remotes
local function hookRemote(remote, callback)
if not remote or not callback then return end
local originalFunction
originalFunction = hookfunction(remote.FireServer, function(self, ...)
local args = {...}
local result = callback(self, args)
if result == false then
return nil -- Block the remote call
elseif type(result) == "table" then
return originalFunction(self, unpack(result)) -- Modified arguments
else
return originalFunction(self, ...) -- Original arguments
end
end)
-- Store in _internal for potential later unhooking
table.insert(Settings._internal.hookedFunctions, {
remote = remote,
original = originalFunction
})
return originalFunction
end
-- Check if player is in certain range
local function isPlayerInRange(player, range)
if not LocalPlayer.Character or not
LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
return false
end
if not player.Character or not
player.Character:FindFirstChild("HumanoidRootPart") then
return false
end
local distance = (LocalPlayer.Character.HumanoidRootPart.Position -
player.Character.HumanoidRootPart.Position).Magnitude
return distance <= range
end
-- Function to get the character directly (with error checking)
local function getCharacter(player)
if not player then return nil end
if player == "all" then
return "all"
end
if typeof(player) == "string" then
player = findPlayer(player)
end
if not player or not player:IsA("Player") then
return nil
end
return player.Character
end
-- Function to get all relevant parts of a player
local function getBody(player)
local character = getCharacter(player)
if not character then return nil end
local humanoid = character:FindFirstChild("Humanoid")
local rootPart = character:FindFirstChild("HumanoidRootPart")
local head = character:FindFirstChild("Head")
if not humanoid or not rootPart or not head then
return nil
end
return {
character = character,
humanoid = humanoid,
rootPart = rootPart,
head = head
}
end
-- Function to teleport a player to a location
local function teleportPlayer(player, location)
if not player or not location then return false end
local character = getCharacter(player)
if not character then return false end
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if not humanoidRootPart then return false end
-- Handle different types of location
if typeof(location) == "CFrame" then
humanoidRootPart.CFrame = location
elseif typeof(location) == "Vector3" then
humanoidRootPart.CFrame = CFrame.new(location)
elseif typeof(location) == "Instance" and location:IsA("BasePart") then
humanoidRootPart.CFrame = location.CFrame
elseif typeof(location) == "string" then
local locationCFrame = TeleportLocations[location:lower()]
if locationCFrame then
humanoidRootPart.CFrame = locationCFrame
end
elseif typeof(location) == "Instance" and location:IsA("Player") then
local targetCharacter = getCharacter(location)
if targetCharacter and targetCharacter:FindFirstChild("HumanoidRootPart")
then
humanoidRootPart.CFrame = targetCharacter.HumanoidRootPart.CFrame *
CFrame.new(0, 0, 3)
end
end
-- Track teleports for debug purposes
Settings._internal.teleportCount = Settings._internal.teleportCount + 1
-- Store position history
table.insert(Settings._internal.positionHistory, {
player = player.Name,
position = humanoidRootPart.Position,
time = os.time()
})
-- Keep history at reasonable size
if #Settings._internal.positionHistory > 50 then
table.remove(Settings._internal.positionHistory, 1)
end
return true
end
-- Function to set a player's team
local function setTeam(player, team)
if not player or not team then return false end
local workspace = game:GetService("Workspace")
-- Validate player
local character = getCharacter(player)
if not character then return false end
-- Convert string team names to proper formats
if team:lower() == "inmate" or team:lower() == "prisoner" or team:lower() ==
"orange" then
team = "Bright orange"
elseif team:lower() == "guard" or team:lower() == "police" or team:lower() ==
"blue" then
team = "Bright blue"
elseif team:lower() == "criminal" or team:lower() == "crim" or team:lower() ==
"red" then
team = "Really red"
elseif team:lower() == "neutral" or team:lower() == "none" then
team = "Medium stone grey"
end
-- Get the appropriate team event
if team == "Bright orange" then
workspace.Remote.TeamEvent:FireServer("Bright orange")
elseif team == "Bright blue" then
workspace.Remote.TeamEvent:FireServer("Bright blue")
elseif team == "Really red" then
-- For criminals, we need to teleport to the criminal base
if player == LocalPlayer then
teleportPlayer(player, TeleportLocations["crimbase"])
wait(0.5) -- Wait a bit to become criminal
else
-- For other players, we need to use a different method
local body = getBody(player)
if body then
workspace.Remote.arrest:FireServer(body.head)
wait(0.1)
workspace.Remote.TeamEvent:FireServer("Bright orange")
wait(0.1)
teleportPlayer(player, TeleportLocations["crimbase"])
end
end
end
return true
end
-- Function to perform an action on a player with stealth
local function performPlayerAction(player, action, ...)
if not player or not action then return false end
local args = {...}
local character = getCharacter(player)
if not character then return false end
if action == "kill" then
-- Kill method with stealth
local body = getBody(player)
if not body then return false end
-- Most effective kill method that works client-side
local currentPos = body.rootPart.CFrame
teleportPlayer(player, CFrame.new(980, -500, 2290)) -- Void kill
-- Track for debug
Settings._internal.killCount = Settings._internal.killCount + 1
-- Store in kill history
table.insert(Settings._internal.killHistory, {
player = player.Name,
position = currentPos.Position,
time = os.time()
})
-- Keep history at reasonable size
if #Settings._internal.killHistory > 50 then
table.remove(Settings._internal.killHistory, 1)
end
return true
elseif action == "tase" then
-- Tase method - works via remote events
local body = getBody(player)
if not body then return false end
if workspace:FindFirstChild("Remote") and
workspace.Remote:FindFirstChild("tazePlayer") then
workspace.Remote.tazePlayer:FireServer(body.humanoid)
end
return true
elseif action == "arrest" then
-- Arrest method - works via remote events
local body = getBody(player)
if not body then return false end
if workspace:FindFirstChild("Remote") and
workspace.Remote:FindFirstChild("arrest") then
workspace.Remote.arrest:FireServer(body.head)
end
return true
elseif action == "bring" or action == "to" then
-- Bring a player to a target location
local targetPlayer = args[1]
local targetCharacter = getCharacter(targetPlayer)
if not targetCharacter or not
targetCharacter:FindFirstChild("HumanoidRootPart") then
return false
end
teleportPlayer(player, targetCharacter.HumanoidRootPart.CFrame *
CFrame.new(0, 0, 3))
return true
elseif action == "fling" then
-- Fling a player - give them extreme velocity
local body = getBody(player)
if not body then return false end
-- Create fling effect by applying extreme velocity
local velocity = args[1] or 1000
if typeof(velocity) ~= "number" then velocity = 1000 end
if body.rootPart:FindFirstChild("BodyVelocity") then
body.rootPart.BodyVelocity:Destroy()
end
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVelocity.P = math.huge
bodyVelocity.Velocity = Vector3.new(
math.random(-velocity, velocity),
math.random(velocity/2, velocity),
math.random(-velocity, velocity)
)
bodyVelocity.Parent = body.rootPart
-- Auto-cleanup after short delay
game:GetService("Debris"):AddItem(bodyVelocity, 0.1)
return true
elseif action == "freeze" then
-- Freeze a player in place
local body = getBody(player)
if not body then return false end
-- Create anti-movement constraints
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVelocity.P = math.huge
bodyVelocity.Velocity = Vector3.new(0, 0, 0)
bodyVelocity.Name = "FreezeConstraint"
bodyVelocity.Parent = body.rootPart
-- Also freeze rotation
local bodyGyro = Instance.new("BodyGyro")
bodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
bodyGyro.D = 100
bodyGyro.P = 10000
bodyGyro.CFrame = body.rootPart.CFrame
bodyGyro.Name = "FreezeGyro"
bodyGyro.Parent = body.rootPart
return true
elseif action == "unfreeze" then
-- Unfreeze a frozen player
local body = getBody(player)
if not body then return false end
-- Remove freeze constraints
for _, constraint in pairs(body.rootPart:GetChildren()) do
if constraint.Name == "FreezeConstraint" or constraint.Name ==
"FreezeGyro" then
constraint:Destroy()
end
end
return true
elseif action == "explode" then
-- Create explosion effect at player
local body = getBody(player)
if not body then return false end
local explosion = Instance.new("Explosion")
explosion.BlastRadius = args[1] or 10
explosion.BlastPressure = args[2] or 500000
explosion.Position = body.rootPart.Position
explosion.Parent = workspace
return true
elseif action == "shield" or action == "ff" or action == "forcefield" then
-- Give player a protective forcefield
local body = getBody(player)
if not body then return false end
if body.character:FindFirstChild("ForceField") then
body.character.ForceField:Destroy()
else
local forcefield = Instance.new("ForceField")
forcefield.Parent = body.character
end
return true
elseif action == "invisible" or action == "invis" then
-- Make player invisible
local body = getBody(player)
if not body then return false end
-- Loop through all parts and make transparent
for _, part in pairs(body.character:GetDescendants()) do
if part:IsA("BasePart") or part:IsA("Decal") then
part.Transparency = 1
end
end
return true
elseif action == "visible" or action == "vis" then
-- Make player visible again
local body = getBody(player)
if not body then return false end
-- Loop through all parts and reset transparency
for _, part in pairs(body.character:GetDescendants()) do
if part:IsA("BasePart") then
if part.Name == "Head" then
part.Transparency = 0
elseif part.Name == "HumanoidRootPart" then
part.Transparency = 1
else
part.Transparency = 0
end
elseif part:IsA("Decal") then
part.Transparency = 0
end
end
return true
elseif action == "speed" or action == "walkspeed" then
-- Set player's movement speed
local body = getBody(player)
if not body then return false end
local speed = args[1] or 16
if typeof(speed) ~= "number" then speed = 16 end
body.humanoid.WalkSpeed = speed
return true
elseif action == "jumppower" or action == "jp" then
-- Set player's jump height
local body = getBody(player)
if not body then return false end
local power = args[1] or 50
if typeof(power) ~= "number" then power = 50 end
body.humanoid.JumpPower = power
return true
elseif action == "health" or action == "heal" then
-- Set player's health
local body = getBody(player)
if not body then return false end
local health = args[1] or 100
if typeof(health) ~= "number" then health = 100 end
body.humanoid.Health = health
return true
elseif action == "damage" or action == "hurt" then
-- Damage a player
local body = getBody(player)
if not body then return false end
local damage = args[1] or 25
if typeof(damage) ~= "number" then damage = 25 end
body.humanoid:TakeDamage(damage)
return true
elseif action == "respawn" or action == "reset" then
-- Force player to respawn
local body = getBody(player)
if not body then return false end
if player == LocalPlayer then
body.humanoid.Health = 0
wait(1)
character:BreakJoints()
else
performPlayerAction(player, "kill")
end
return true
end
return false
end
-- Function to handle giving items (guns, etc)
local function giveItem(player, item)
if not player or not item then return false end
-- Convert item name to standard format
item = item:lower()
if item == "handgun" or item == "pistol" then item = "m9" end
if item == "ak" or item == "assault" or item == "assaultrifle" then item =
"ak47" end
if item == "shotty" or item == "rem" or item == "remington" then item =
"shotgun" end
if item == "riotshield" or item == "shield" then item = "riot" end
-- Handle "all guns" special case
if item == "guns" or item == "allguns" or item == "weapons" then
giveItem(player, "m9")
wait(0.3)
giveItem(player, "ak47")
wait(0.3)
giveItem(player, "shotgun")
wait(0.3)
giveItem(player, "riot")
return true
end
-- Check if it's a valid item
local itemCFrame = ItemLocations[item]
if not itemCFrame then
return false
end
local character = getCharacter(player)
if not character then return false end
-- Different methods based on who we're giving to
if player == LocalPlayer then
local savePos = character:FindFirstChild("HumanoidRootPart").CFrame
-- Use stealth item giving method
character:FindFirstChild("HumanoidRootPart").CFrame = itemCFrame
wait(0.4)
-- Find the item to pick up (context action)
for _, v in pairs(workspace.Prison_ITEMS.giver:GetDescendants()) do
if v.Name == "Humanoid" and v.Parent and
v.Parent:FindFirstChild("ItemName") and v.Parent.ItemName.Value == item:upper()
then
local itemPart = v.Parent:FindFirstChild("Head") or
v.Parent:FindFirstChild("Part")
if itemPart then
itemPart.CFrame = character.HumanoidRootPart.CFrame
wait(0.2)
fireclickdetector(itemPart.Parent.ClickDetector)
wait(0.2)
end
end
end
-- Return to original position
character:FindFirstChild("HumanoidRootPart").CFrame = savePos
else
-- For other players, we have to use a more complex method
-- This is a simplified placeholder - in practice requires more code
-- For full implementation, the server-side item giving would be needed
local savePos = character:FindFirstChild("HumanoidRootPart").CFrame
teleportPlayer(player, itemCFrame)
wait(1)
teleportPlayer(player, savePos)
end
return true
end
-- Advanced Stealth method for remote calls to avoid detection
local function stealthRemote(remote, ...)
if not remote then return end
local args = {...}
-- Skip if anti-logging is disabled (for debugging)
if not Settings.RemoteSpooferEnabled then
return remote:FireServer(unpack(args))
end
-- Clone the arguments to avoid modification issues
local clonedArgs = {}
for i, v in pairs(args) do
if typeof(v) == "table" then
clonedArgs[i] = table.clone(v)
else
clonedArgs[i] = v
end
end
-- Use stealth wrapper to obfuscate the call
local originalFireServer = remote.FireServer
-- Short-lived function replacement to avoid detection
local success, result = pcall(function()
-- Hide remote call from any logging tools
setmetatable(remote, {
__namecall = function(self, ...)
local namecallArgs = {...}
local method = getnamecallmethod()
if method == "FireServer" then
return originalFireServer(self, unpack(namecallArgs))
end
return original_namecall(self, unpack(namecallArgs))
end
})
-- Execute the remote
return remote:FireServer(unpack(clonedArgs))
end)
return result
end
-- =======================================
-- ANTI-KICK & SERVER ACCESS SYSTEMS
-- =======================================
-- PrizzLife-derived anti-kick system (enhanced)
local function setupAntiKick()
if not Settings.EnableAntiKick then return end
-- Primary Anti-Kick - Hook kick remote
local mt = getrawmetatable(game)
local oldNamecall = mt.__namecall
local oldIndex = mt.__index
setreadonly(mt, false)
-- Hook namecall
mt.__namecall = newcclosure(function(self, ...)
local method = getnamecallmethod()
local args = {...}
-- Block kick attempts
if method == "Kick" or method == "kick" then
Notif("Anti-Kick", "Blocked kick attempt", 3)
wait(9e9) -- Stall forever
return
end
-- Block attempts to modify character
if (method == "BreakJoints" or method == "breakJoints") and self ==
LocalPlayer.Character then
if Settings.AntiDeath then
Notif("Anti-Death", "Blocked joint break attempt", 3)
return
end
end
-- Block teleport service attempts
if (method == "Teleport" or method == "TeleportToPlaceInstance") and self
== game:GetService("TeleportService") then
Notif("Anti-Kick", "Blocked teleport attempt", 3)
wait(9e9) -- Stall forever
return
end
-- Block remote kicks
if self.Name == "Kick" or self.Name == "kick" then
if method == "FireServer" then
Notif("Anti-Kick", "Blocked remote kick attempt", 3)
return
end
end
return oldNamecall(self, ...)
end)
-- Hook index
mt.__index = newcclosure(function(self, key)
-- Intercept character replication attempts
if key == "Character" and self == LocalPlayer and Settings.AntiDeath then
local fakeChar = oldIndex(self, key)
setreadonly(fakeChar, false)
return fakeChar
end
return oldIndex(self, key)
end)
setreadonly(mt, true)
-- Hook Destroy method to prevent character destruction
local oldDestroy
oldDestroy = hookfunction(game.Destroy, function(self, ...)
if self == LocalPlayer or self == LocalPlayer.Character then
if Settings.AntiDeath then
Notif("Anti-Death", "Blocked destruction attempt", 3)
return
end
end
return oldDestroy(self, ...)
end)
-- Hook LoadCharacter to intercept respawn attempts
local oldLoadCharacter
oldLoadCharacter = hookfunction(LocalPlayer.LoadCharacter, function(self, ...)
if Settings.AntiDeath then
Notif("Anti-Death", "Blocked forced respawn", 3)
return
end
return oldLoadCharacter(self, ...)
end)
-- Hook RemoveCharacter to intercept removal attempts
local oldRemoveCharacter
oldRemoveCharacter = hookfunction(LocalPlayer.RemoveCharacter,
function(self, ...)
if Settings.AntiDeath then
Notif("Anti-Death", "Blocked character removal", 3)
return
end
return oldRemoveCharacter(self, ...)
end)
-- Secondary Anti-Kick - Session persistence hooks
pcall(function()
-- Coroutine wrapper to avoid yielding main thread
coroutine.wrap(function()
while true do
pcall(function()
for _, signal in ipairs({LocalPlayer.Idled,
game:GetService("ScriptContext").Error}) do
for _, connection in ipairs(getconnections(signal)) do
connection:Disable()
end
end
end)
wait(5)
end
end)()
-- Disable various kick methods
game:GetService("GuiService").ErrorMessageChanged:Connect(function()
game:GetService("GuiService"):ClearError()
end)
end)
-- Anti-Report system
pcall(function()
-- Block reports
local oldFireServer
oldFireServer = hookfunction(Instance.new("RemoteEvent").FireServer,
function(self, ...)
local args = {...}
if self.Name == "RequestReport" or self.Name == "SubmitReport" then
Notif("Anti-Report", "Blocked report attempt", 3)
return
end
return oldFireServer(self, ...)
end)
end)
Notif("Anti-Kick", "Advanced protection enabled", 3)
end
-- PrizzLife-derived server access system
local function setupServerAccess()
-- Secure remote event access
local function protectRemotes()
-- Intercept all remote calls for analysis
local function hookRemoteProperty(obj, prop)
local original = obj[prop]
obj[prop] = function(self, ...)
local args = {...}
-- Add specific remote handler for Prison Life's key events
if self.Name == "TeamEvent" and prop == "FireServer" then
-- Team switching event - always allow
return original(self, ...)
end
if self.Name == "arrest" and prop == "FireServer" then
-- Arrest event - check if it's our command or not
-- For brevity, simplified handling
return original(self, ...)
end
-- Default: allow the event through
return original(self, ...)
end
end
-- Apply hooks to all existing remotes
for _, remote in pairs(game:GetDescendants()) do
if remote:IsA("RemoteEvent") then
hookRemoteProperty(remote, "FireServer")
elseif remote:IsA("RemoteFunction") then
hookRemoteProperty(remote, "InvokeServer")
end
end
-- Hook future remotes
game.DescendantAdded:Connect(function(descendant)
if descendant:IsA("RemoteEvent") then
hookRemoteProperty(descendant, "FireServer")
elseif descendant:IsA("RemoteFunction") then
hookRemoteProperty(descendant, "InvokeServer")
end
end)
end
-- Attempt to hook into core game systems
local function injectServerSystems()
pcall(function()
-- Prison Life specific - hook key systems
if workspace:FindFirstChild("Remote") then
local remotes = workspace.Remote:GetChildren()
for _, remote in pairs(remotes) do
if remote.Name == "ItemHandler" then
-- Hook into item system for permanent weapons
hookRemote(remote, function(self, args)
-- Allow our own requests through
return true
end)
end
if remote.Name == "TeamEvent" then
-- Hook team switching
hookRemote(remote, function(self, args)
-- Allow our team changes
return true
end)
end
end
end
end)
end
-- Run all server access systems
protectRemotes()
injectServerSystems()
Notif("Server Access", "Enhanced systems operational", 3)
end
-- Implement method to ensure weapons never run out of ammo
local function setupInfiniteAmmo()
-- Hook into ammo system
coroutine.wrap(function()
while true do
pcall(function()
if not Settings.InfAmmo then return end
-- Locate weapons in backpack or character
local backpackItems = LocalPlayer.Backpack:GetChildren()
local characterItems = {}
if LocalPlayer.Character then
characterItems = LocalPlayer.Character:GetChildren()
end
-- Check all items
for _, item in pairs(backpackItems) do
if item:IsA("Tool") and item:FindFirstChild("GunStates") then
-- Set infinite ammo properties
local gunStates = require(item.GunStates)
gunStates.MaxAmmo = math.huge
gunStates.CurrentAmmo = math.huge
gunStates.StoredAmmo = math.huge
end
end
for _, item in pairs(characterItems) do
if item:IsA("Tool") and item:FindFirstChild("GunStates") then
-- Set infinite ammo properties
local gunStates = require(item.GunStates)
gunStates.MaxAmmo = math.huge
gunStates.CurrentAmmo = math.huge
gunStates.StoredAmmo = math.huge
end
end
end)
wait(1)
end
end)()
end
-- Implement silent aim for perfect shooting
local function setupSilentAim()
local mt = getrawmetatable(game)
local oldNamecall = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(self, ...)
local args = {...}
local method = getnamecallmethod()
if method == "FireServer" and Settings.SilentAim and self.Name ==
"ShootEvent" then
-- Find the closest valid player for silent aim
local closestPlayer = nil
local shortestDistance = math.huge
for _, player in pairs(game.Players:GetPlayers()) do
if player ~= LocalPlayer and player.Character and
player.Character:FindFirstChild("Humanoid") and player.Character.Humanoid.Health >
0 then
-- Check team restrictions
if Settings.KillAuraTeamCheck and player.TeamColor ==
LocalPlayer.TeamColor then
continue
end
-- Check whitelist
if Settings.WhitelistedPlayers[player.Name] then
continue
end
local targetPart = Settings.SilentAimHeadshot and
player.Character:FindFirstChild("Head") or
player.Character:FindFirstChild("HumanoidRootPart")
if targetPart then
local pos = targetPart.Position
local distance =
(LocalPlayer.Character.HumanoidRootPart.Position - pos).Magnitude
if distance < shortestDistance then
closestPlayer = player
shortestDistance = distance
end
end
end
end
-- If we found a valid target, modify the shot parameters
if closestPlayer and closestPlayer.Character then
local targetPart = Settings.SilentAimHeadshot and
closestPlayer.Character:FindFirstChild("Head") or
closestPlayer.Character:FindFirstChild("HumanoidRootPart")
if targetPart then
-- Modify all shot parameters to target this player perfectly
args[1][1] = targetPart
args[1][2] = targetPart.Position
-- Increase damage for one-shot if enabled
if Settings.InfDamage then
args[1][3] = 100 -- High damage for instant kill
end
end
end
end
return oldNamecall(self, unpack(args))
end)
setreadonly(mt, true)
end
-- =======================================
-- COMMAND IMPLEMENTATION
-- =======================================
-- Create actual command functions
COMMANDS.kill = function(args, speaker)
local target = findPlayer(args[1], speaker)
if target == "all" then
if canUseMultiTarget(speaker) then
for _, player in pairs(Players:GetPlayers()) do
if player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "kill")
wait(0.1) -- Small delay to prevent overload
end
end
return "Killed all players"
else
return "You don't have permission to target all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "kill")
wait(0.1) -- Small delay to prevent overload
end
return "Killed targeted players"
else
return "You don't have permission to target multiple players"
end
elseif target then
if verifyArgs(speaker, target, "kill") then
performPlayerAction(target, "kill")
return "Killed " .. target.Name
else
return "You don't have permission to kill this player"
end
else
return "Player not found"
end
end
-- Add alias for loopkill
COMMANDS.loopkill = function(args, speaker)
local target = findPlayer(args[1], speaker)
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
Settings.LoopKillPlayers[player.Name] = true
end
end
return "Loop killing all players"
else
return "You don't have permission to target all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
Settings.LoopKillPlayers[player.Name] = true
end
return "Loop killing targeted players"
else
return "You don't have permission to target multiple players"
end
elseif target then
if verifyArgs(speaker, target, "loopkill") then
Settings.LoopKillPlayers[target.Name] = true
return "Loop killing " .. target.Name
else
return "You don't have permission to loop kill this player"
end
else
return "Player not found"
end
end
COMMANDS.unloopkill = function(args, speaker)
local target = findPlayer(args[1], speaker)
if target == "all" then
if canUseMultiTarget(speaker) then
for name, _ in pairs(Settings.LoopKillPlayers) do
Settings.LoopKillPlayers[name] = nil
end
return "Stopped loop killing all players"
else
return "You don't have permission to target all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and player ~= speaker then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
Settings.LoopKillPlayers[player.Name] = nil
end
return "Stopped loop killing targeted players"
else
return "You don't have permission to target multiple players"
end
elseif target then
if verifyArgs(speaker, target, "unloopkill") then
Settings.LoopKillPlayers[target.Name] = nil
return "Stopped loop killing " .. target.Name
else
return "You don't have permission to stop loop killing this player"
end
else
return "Player not found"
end
end
COMMANDS.teleport = function(args, speaker)
local target = findPlayer(args[1], speaker)
local location = args[2]
-- If only one argument, assume it's a location and the target is the speaker
if target and not location then
if TeleportLocations[target:lower()] then
location = target
target = speaker
end
end
if not location then
return "No location specified"
end
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
if typeof(location) == "string" then
local locationCFrame = TeleportLocations[location:lower()]
if locationCFrame then
teleportPlayer(player, locationCFrame)
end
else
teleportPlayer(player, location)
end
wait(0.1) -- Small delay to prevent overload
end
end
return "Teleported all players to " .. tostring(location)
else
return "You don't have permission to teleport all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
if typeof(location) == "string" then
local locationCFrame = TeleportLocations[location:lower()]
if locationCFrame then
teleportPlayer(player, locationCFrame)
end
else
teleportPlayer(player, location)
end
wait(0.1) -- Small delay to prevent overload
end
return "Teleported targeted players to " .. tostring(location)
else
return "You don't have permission to teleport multiple players"
end
elseif target then
if verifyArgs(speaker, target, "tp") then
if typeof(location) == "string" then
local locationCFrame = TeleportLocations[location:lower()]
if locationCFrame then
teleportPlayer(target, locationCFrame)
return "Teleported " .. target.Name .. " to " .. location
else
local locationPlayer = findPlayer(location, speaker)
if locationPlayer then
teleportPlayer(target, locationPlayer)
return "Teleported " .. target.Name .. " to " ..
locationPlayer.Name
else
return "Location not found"
end
end
else
teleportPlayer(target, location)
return "Teleported " .. target.Name .. " to specified location"
end
else
return "You don't have permission to teleport this player"
end
else
-- If only location is specified, teleport the speaker
if typeof(location) == "string" then
local locationCFrame = TeleportLocations[location:lower()]
if locationCFrame then
teleportPlayer(speaker, locationCFrame)
return "Teleported to " .. location
else
local locationPlayer = findPlayer(location, speaker)
if locationPlayer then
teleportPlayer(speaker, locationPlayer)
return "Teleported to " .. locationPlayer.Name
else
return "Location or player not found"
end
end
else
teleportPlayer(speaker, location)
return "Teleported to specified location"
end
end
end
-- Add direct location teleport commands (yard, cells, etc.)
for location, _ in pairs(TeleportLocations) do
COMMANDS[location] = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
teleportPlayer(player, TeleportLocations[location])
wait(0.1) -- Small delay to prevent overload
end
end
return "Teleported all players to " .. location
else
return "You don't have permission to teleport all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
teleportPlayer(player, TeleportLocations[location])
wait(0.1) -- Small delay to prevent overload
end
return "Teleported targeted players to " .. location
else
return "You don't have permission to teleport multiple players"
end
elseif target then
if verifyArgs(speaker, target, location) then
teleportPlayer(target, TeleportLocations[location])
return "Teleported " .. target.Name .. " to " .. location
else
return "You don't have permission to teleport this player"
end
else
teleportPlayer(speaker, TeleportLocations[location])
return "Teleported to " .. location
end
end
end
-- Add team commands (prisoner, guard, criminal)
COMMANDS.prisoner = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
setTeam(player, "Bright orange")
wait(0.1) -- Small delay to prevent overload
end
end
return "Set all players to prisoners"
else
return "You don't have permission to change all players' teams"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
setTeam(player, "Bright orange")
wait(0.1) -- Small delay to prevent overload
end
return "Set targeted players to prisoners"
else
return "You don't have permission to change multiple players' teams"
end
elseif target then
if verifyArgs(speaker, target, "prisoner") then
setTeam(target, "Bright orange")
return "Set " .. target.Name .. " to prisoner"
else
return "You don't have permission to change this player's team"
end
else
setTeam(speaker, "Bright orange")
return "Set yourself to prisoner"
end
end
-- Add aliases for prisoner
COMMANDS.inmate = COMMANDS.prisoner
-- Guard team command
COMMANDS.guard = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
setTeam(player, "Bright blue")
wait(0.1) -- Small delay to prevent overload
end
end
return "Set all players to guards"
else
return "You don't have permission to change all players' teams"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
setTeam(player, "Bright blue")
wait(0.1) -- Small delay to prevent overload
end
return "Set targeted players to guards"
else
return "You don't have permission to change multiple players' teams"
end
elseif target then
if verifyArgs(speaker, target, "guard") then
setTeam(target, "Bright blue")
return "Set " .. target.Name .. " to guard"
else
return "You don't have permission to change this player's team"
end
else
setTeam(speaker, "Bright blue")
return "Set yourself to guard"
end
end
-- Criminal team command
COMMANDS.criminal = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
setTeam(player, "Really red")
wait(0.3) -- Longer delay for criminal teleport
end
end
return "Set all players to criminals"
else
return "You don't have permission to change all players' teams"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
setTeam(player, "Really red")
wait(0.3) -- Longer delay for criminal teleport
end
return "Set targeted players to criminals"
else
return "You don't have permission to change multiple players' teams"
end
elseif target then
if verifyArgs(speaker, target, "criminal") then
setTeam(target, "Really red")
return "Set " .. target.Name .. " to criminal"
else
return "You don't have permission to change this player's team"
end
else
setTeam(speaker, "Really red")
return "Set yourself to criminal"
end
end
-- Add alias for criminal
COMMANDS.crim = COMMANDS.criminal
-- Guns/weapon commands
COMMANDS.gun = function(args, speaker)
local gunType = args[1] or "m9"
local target = args[2] and findPlayer(args[2], speaker) or speaker
-- If first arg is a player and second is missing, swap them
if not TeleportLocations[gunType:lower()] and not
ItemLocations[gunType:lower()] then
local potentialPlayer = findPlayer(gunType, speaker)
if potentialPlayer then
target = potentialPlayer
gunType = "m9" -- Default to M9 if not specified
end
end
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
giveItem(player, gunType)
wait(0.5) -- Delay to prevent overload
end
end
return "Gave " .. gunType .. " to all players"
else
return "You don't have permission to give items to all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
giveItem(player, gunType)
wait(0.5) -- Delay to prevent overload
end
return "Gave " .. gunType .. " to targeted players"
else
return "You don't have permission to give items to multiple players"
end
elseif target then
if verifyArgs(speaker, target, "gun") then
giveItem(target, gunType)
return "Gave " .. gunType .. " to " .. target.Name
else
return "You don't have permission to give items to this player"
end
else
giveItem(speaker, gunType)
return "Gave yourself " .. gunType
end
end
-- Add direct gun commands (m9, shotgun, ak47)
COMMANDS.m9 = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
giveItem(player, "m9")
wait(0.5) -- Delay to prevent overload
end
end
return "Gave M9 to all players"
else
return "You don't have permission to give items to all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
giveItem(player, "m9")
wait(0.5) -- Delay to prevent overload
end
return "Gave M9 to targeted players"
else
return "You don't have permission to give items to multiple players"
end
elseif target then
if verifyArgs(speaker, target, "m9") then
giveItem(target, "m9")
return "Gave M9 to " .. target.Name
else
return "You don't have permission to give items to this player"
end
else
giveItem(speaker, "m9")
return "Gave yourself M9"
end
end
COMMANDS.shotgun = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
giveItem(player, "shotgun")
wait(0.5) -- Delay to prevent overload
end
end
return "Gave Shotgun to all players"
else
return "You don't have permission to give items to all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
giveItem(player, "shotgun")
wait(0.5) -- Delay to prevent overload
end
return "Gave Shotgun to targeted players"
else
return "You don't have permission to give items to multiple players"
end
elseif target then
if verifyArgs(speaker, target, "shotgun") then
giveItem(target, "shotgun")
return "Gave Shotgun to " .. target.Name
else
return "You don't have permission to give items to this player"
end
else
giveItem(speaker, "shotgun")
return "Gave yourself Shotgun"
end
end
COMMANDS.ak47 = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
giveItem(player, "ak47")
wait(0.5) -- Delay to prevent overload
end
end
return "Gave AK-47 to all players"
else
return "You don't have permission to give items to all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
giveItem(player, "ak47")
wait(0.5) -- Delay to prevent overload
end
return "Gave AK-47 to targeted players"
else
return "You don't have permission to give items to multiple players"
end
elseif target then
if verifyArgs(speaker, target, "ak47") then
giveItem(target, "ak47")
return "Gave AK-47 to " .. target.Name
else
return "You don't have permission to give items to this player"
end
else
giveItem(speaker, "ak47")
return "Gave yourself AK-47"
end
end
COMMANDS.riot = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
giveItem(player, "riot")
wait(0.5) -- Delay to prevent overload
end
end
return "Gave Riot Shield to all players"
else
return "You don't have permission to give items to all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
giveItem(player, "riot")
wait(0.5) -- Delay to prevent overload
end
return "Gave Riot Shield to targeted players"
else
return "You don't have permission to give items to multiple players"
end
elseif target then
if verifyArgs(speaker, target, "riot") then
giveItem(target, "riot")
return "Gave Riot Shield to " .. target.Name
else
return "You don't have permission to give items to this player"
end
else
giveItem(speaker, "riot")
return "Gave yourself Riot Shield"
end
end
-- All guns command
COMMANDS.guns = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
giveItem(player, "guns")
wait(1.5) -- Longer delay to prevent overload
end
end
return "Gave all guns to all players"
else
return "You don't have permission to give items to all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
giveItem(player, "guns")
wait(1.5) -- Longer delay to prevent overload
end
return "Gave all guns to targeted players"
else
return "You don't have permission to give items to multiple players"
end
elseif target then
if verifyArgs(speaker, target, "guns") then
giveItem(target, "guns")
return "Gave all guns to " .. target.Name
else
return "You don't have permission to give items to this player"
end
else
giveItem(speaker, "guns")
return "Gave yourself all guns"
end
end
-- Speed command
COMMANDS.speed = function(args, speaker)
local speed = tonumber(args[1]) or 16
local target = args[2] and findPlayer(args[2], speaker) or speaker
-- If first arg is a player and second is missing, swap them
if not tonumber(args[1]) and args[1] then
local potentialPlayer = findPlayer(args[1], speaker)
if potentialPlayer then
target = potentialPlayer
speed = tonumber(args[2]) or 16
end
end
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "speed", speed)
wait(0.1) -- Small delay to prevent overload
end
end
return "Set all players' speed to " .. speed
else
return "You don't have permission to change all players' speed"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "speed", speed)
wait(0.1) -- Small delay to prevent overload
end
return "Set targeted players' speed to " .. speed
else
return "You don't have permission to change multiple players' speed"
end
elseif target then
if verifyArgs(speaker, target, "speed") then
performPlayerAction(target, "speed", speed)
return "Set " .. target.Name .. "'s speed to " .. speed
else
return "You don't have permission to change this player's speed"
end
else
performPlayerAction(speaker, "speed", speed)
return "Set your speed to " .. speed
end
end
-- Jump power command
COMMANDS.jumppower = function(args, speaker)
local power = tonumber(args[1]) or 50
local target = args[2] and findPlayer(args[2], speaker) or speaker
-- If first arg is a player and second is missing, swap them
if not tonumber(args[1]) and args[1] then
local potentialPlayer = findPlayer(args[1], speaker)
if potentialPlayer then
target = potentialPlayer
power = tonumber(args[2]) or 50
end
end
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "jumppower", power)
wait(0.1) -- Small delay to prevent overload
end
end
return "Set all players' jump power to " .. power
else
return "You don't have permission to change all players' jump power"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "jumppower", power)
wait(0.1) -- Small delay to prevent overload
end
return "Set targeted players' jump power to " .. power
else
return "You don't have permission to change multiple players' jump
power"
end
elseif target then
if verifyArgs(speaker, target, "jumppower") then
performPlayerAction(target, "jumppower", power)
return "Set " .. target.Name .. "'s jump power to " .. power
else
return "You don't have permission to change this player's jump power"
end
else
performPlayerAction(speaker, "jumppower", power)
return "Set your jump power to " .. power
end
end
-- Add alias for jumppower
COMMANDS.jp = COMMANDS.jumppower
-- Arrest command
COMMANDS.arrest = function(args, speaker)
local target = findPlayer(args[1], speaker)
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "arrest")
wait(0.3) -- Delay to prevent overload
end
end
return "Arrested all players"
else
return "You don't have permission to arrest all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "arrest")
wait(0.3) -- Delay to prevent overload
end
return "Arrested targeted players"
else
return "You don't have permission to arrest multiple players"
end
elseif target then
if verifyArgs(speaker, target, "arrest") then
performPlayerAction(target, "arrest")
return "Arrested " .. target.Name
else
return "You don't have permission to arrest this player"
end
else
return "Player not found"
end
end
-- Jail command (alternative to arrest)
COMMANDS.jail = COMMANDS.arrest
-- Free command (un-arrest)
COMMANDS.free = function(args, speaker)
local target = findPlayer(args[1], speaker)
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if player ~= speaker and player.TeamColor.Name == "Bright orange"
then
-- The most reliable way to "free" is to make them criminal
first
setTeam(player, "Really red")
wait(0.5)
end
end
return "Freed all jailed players"
else
return "You don't have permission to free all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and player ~= speaker then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
if player.TeamColor.Name == "Bright orange" then
-- The most reliable way to "free" is to make them criminal
first
setTeam(player, "Really red")
wait(0.5)
end
end
return "Freed targeted players"
else
return "You don't have permission to free multiple players"
end
elseif target then
if verifyArgs(speaker, target, "free") then
if target.TeamColor.Name == "Bright orange" then
-- The most reliable way to "free" is to make them criminal first
setTeam(target, "Really red")
end
return "Freed " .. target.Name
else
return "You don't have permission to free this player"
end
else
return "Player not found"
end
end
-- Tase command
COMMANDS.tase = function(args, speaker)
local target = findPlayer(args[1], speaker)
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "tase")
wait(0.2) -- Delay to prevent overload
end
end
return "Tased all players"
else
return "You don't have permission to tase all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "tase")
wait(0.2) -- Delay to prevent overload
end
return "Tased targeted players"
else
return "You don't have permission to tase multiple players"
end
elseif target then
if verifyArgs(speaker, target, "tase") then
performPlayerAction(target, "tase")
return "Tased " .. target.Name
else
return "You don't have permission to tase this player"
end
else
return "Player not found"
end
end
-- Fling command
COMMANDS.fling = function(args, speaker)
local target = findPlayer(args[1], speaker)
local power = tonumber(args[2]) or 1000
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "fling", power)
wait(0.2) -- Delay to prevent overload
end
end
return "Flung all players"
else
return "You don't have permission to fling all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "fling", power)
wait(0.2) -- Delay to prevent overload
end
return "Flung targeted players"
else
return "You don't have permission to fling multiple players"
end
elseif target then
if verifyArgs(speaker, target, "fling") then
performPlayerAction(target, "fling", power)
return "Flung " .. target.Name
else
return "You don't have permission to fling this player"
end
else
return "Player not found"
end
end
-- Explode command
COMMANDS.kaboom = function(args, speaker)
local target = findPlayer(args[1], speaker)
local size = tonumber(args[2]) or 10
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "explode", size)
wait(0.2) -- Delay to prevent overload
end
end
return "Exploded all players"
else
return "You don't have permission to explode all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "explode", size)
wait(0.2) -- Delay to prevent overload
end
return "Exploded targeted players"
else
return "You don't have permission to explode multiple players"
end
elseif target then
if verifyArgs(speaker, target, "kaboom") then
performPlayerAction(target, "explode", size)
return "Exploded " .. target.Name
else
return "You don't have permission to explode this player"
end
else
return "Player not found"
end
end
-- Invisible command
COMMANDS.invisible = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "invisible")
wait(0.1) -- Small delay to prevent overload
end
end
return "Made all players invisible"
else
return "You don't have permission to make all players invisible"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "invisible")
wait(0.1) -- Small delay to prevent overload
end
return "Made targeted players invisible"
else
return "You don't have permission to make multiple players invisible"
end
elseif target then
if verifyArgs(speaker, target, "invisible") then
performPlayerAction(target, "invisible")
return "Made " .. target.Name .. " invisible"
else
return "You don't have permission to make this player invisible"
end
else
performPlayerAction(speaker, "invisible")
return "Made yourself invisible"
end
end
-- Visible command
COMMANDS.visible = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "visible")
wait(0.1) -- Small delay to prevent overload
end
end
return "Made all players visible"
else
return "You don't have permission to make all players visible"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "visible")
wait(0.1) -- Small delay to prevent overload
end
return "Made targeted players visible"
else
return "You don't have permission to make multiple players visible"
end
elseif target then
if verifyArgs(speaker, target, "visible") then
performPlayerAction(target, "visible")
return "Made " .. target.Name .. " visible"
else
return "You don't have permission to make this player visible"
end
else
performPlayerAction(speaker, "visible")
return "Made yourself visible"
end
end
-- Freeze command
COMMANDS.freeze = function(args, speaker)
local target = findPlayer(args[1], speaker)
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "freeze")
wait(0.1) -- Small delay to prevent overload
end
end
return "Froze all players"
else
return "You don't have permission to freeze all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "freeze")
wait(0.1) -- Small delay to prevent overload
end
return "Froze targeted players"
else
return "You don't have permission to freeze multiple players"
end
elseif target then
if verifyArgs(speaker, target, "freeze") then
performPlayerAction(target, "freeze")
return "Froze " .. target.Name
else
return "You don't have permission to freeze this player"
end
else
return "Player not found"
end
end
-- Unfreeze command
COMMANDS.unfreeze = function(args, speaker)
local target = findPlayer(args[1], speaker)
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "unfreeze")
wait(0.1) -- Small delay to prevent overload
end
end
return "Unfroze all players"
else
return "You don't have permission to unfreeze all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "unfreeze")
wait(0.1) -- Small delay to prevent overload
end
return "Unfroze targeted players"
else
return "You don't have permission to unfreeze multiple players"
end
elseif target then
if verifyArgs(speaker, target, "unfreeze") then
performPlayerAction(target, "unfreeze")
return "Unfroze " .. target.Name
else
return "You don't have permission to unfreeze this player"
end
else
return "Player not found"
end
end
-- God mode command
COMMANDS.god = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "shield")
wait(0.1) -- Small delay to prevent overload
end
end
return "Enabled god mode for all players"
else
return "You don't have permission to god all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "shield")
wait(0.1) -- Small delay to prevent overload
end
return "Enabled god mode for targeted players"
else
return "You don't have permission to god multiple players"
end
elseif target then
if verifyArgs(speaker, target, "god") then
performPlayerAction(target, "shield")
return "Enabled god mode for " .. target.Name
else
return "You don't have permission to god this player"
end
else
performPlayerAction(speaker, "shield")
return "Enabled god mode for yourself"
end
end
-- Respawn command
COMMANDS.respawn = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "respawn")
wait(0.3) -- Delay to prevent overload
end
end
return "Respawned all players"
else
return "You don't have permission to respawn all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "respawn")
wait(0.3) -- Delay to prevent overload
end
return "Respawned targeted players"
else
return "You don't have permission to respawn multiple players"
end
elseif target then
if verifyArgs(speaker, target, "respawn") then
performPlayerAction(target, "respawn")
return "Respawned " .. target.Name
else
return "You don't have permission to respawn this player"
end
else
performPlayerAction(speaker, "respawn")
return "Respawned yourself"
end
end
-- Heal command
COMMANDS.heal = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
local health = tonumber(args[2]) or 100
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "health", health)
wait(0.1) -- Small delay to prevent overload
end
end
return "Healed all players"
else
return "You don't have permission to heal all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "health", health)
wait(0.1) -- Small delay to prevent overload
end
return "Healed targeted players"
else
return "You don't have permission to heal multiple players"
end
elseif target then
if verifyArgs(speaker, target, "heal") then
performPlayerAction(target, "health", health)
return "Healed " .. target.Name
else
return "You don't have permission to heal this player"
end
else
performPlayerAction(speaker, "health", health)
return "Healed yourself"
end
end
-- Damage command
COMMANDS.damage = function(args, speaker)
local target = findPlayer(args[1], speaker)
local damage = tonumber(args[2]) or 25
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
performPlayerAction(player, "damage", damage)
wait(0.1) -- Small delay to prevent overload
end
end
return "Damaged all players"
else
return "You don't have permission to damage all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
performPlayerAction(player, "damage", damage)
wait(0.1) -- Small delay to prevent overload
end
return "Damaged targeted players"
else
return "You don't have permission to damage multiple players"
end
elseif target then
if verifyArgs(speaker, target, "damage") then
performPlayerAction(target, "damage", damage)
return "Damaged " .. target.Name
else
return "You don't have permission to damage this player"
end
else
return "Player not found"
end
end
-- Kick command
COMMANDS.kick = function(args, speaker)
if speaker ~= LocalPlayer then
return "Only script owner can kick players"
end
local target = findPlayer(args[1], speaker)
local reason = args[2] or "No reason given"
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
-- Use remote kick
local success, err = pcall(function()
player:Kick("You were kicked by " .. speaker.Name .. ".
Reason: " .. reason)
end)
if not success then
-- Try alternative kick method via character destruction
if player.Character then
player.Character:BreakJoints()
end
end
wait(0.1) -- Small delay to prevent overload
end
end
return "Kicked all players"
else
return "You don't have permission to kick all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and player ~= speaker and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
-- Use remote kick
local success, err = pcall(function()
player:Kick("You were kicked by " .. speaker.Name .. ". Reason:
" .. reason)
end)
if not success then
-- Try alternative kick method via character destruction
if player.Character then
player.Character:BreakJoints()
end
end
wait(0.1) -- Small delay to prevent overload
end
return "Kicked targeted players"
else
return "You don't have permission to kick multiple players"
end
elseif target then
if verifyArgs(speaker, target, "kick") then
-- Use remote kick
local success, err = pcall(function()
target:Kick("You were kicked by " .. speaker.Name .. ". Reason:
" .. reason)
end)
if not success then
-- Try alternative kick method via character destruction
if target.Character then
target.Character:BreakJoints()
end
end
return "Kicked " .. target.Name
else
return "You don't have permission to kick this player"
end
else
return "Player not found"
end
end
-- Ban system
COMMANDS.ban = function(args, speaker)
if speaker ~= LocalPlayer then
return "Only script owner can ban players"
end
local target = findPlayer(args[1], speaker)
local duration = tonumber(args[2]) or 2 -- Default 2 hours
local reason = args[3] or "No reason given"
if target then
if verifyArgs(speaker, target, "ban") then
-- Store in ban list
local banData = {
name = target.Name,
userId = target.UserId,
reason = reason,
bannedBy = speaker.Name,
bannedAt = os.time(),
duration = duration * 3600, -- Convert to seconds
expiresAt = os.time() + duration * 3600
}
Settings._internal.bannedPlayers[target.UserId] = banData
-- Also kick the player if still in the game
pcall(function()
target:Kick("You were banned by " .. speaker.Name .. " for " ..
duration .. " hour(s). Reason: " .. reason)
end)
-- Create a ban script that can persist even when you're offline
-- This would require a server-side script for full implementation
return "Banned " .. target.Name .. " for " .. duration .. " hour(s)"
else
return "You don't have permission to ban this player"
end
else
return "Player not found"
end
end
-- Unban command
COMMANDS.unban = function(args, speaker)
if speaker ~= LocalPlayer then
return "Only script owner can unban players"
end
local nameOrId = args[1]
if not nameOrId then
return "Please specify a player name or user ID"
end
-- Check if player is an ID
local userId = tonumber(nameOrId)
if userId then
if Settings._internal.bannedPlayers[userId] then
Settings._internal.bannedPlayers[userId] = nil
return "Unbanned player with ID " .. userId
else
for id, banData in pairs(Settings._internal.bannedPlayers) do
if banData.name:lower() == nameOrId:lower() then
Settings._internal.bannedPlayers[id] = nil
return "Unbanned " .. banData.name
end
end
end
else
-- Search by name
for id, banData in pairs(Settings._internal.bannedPlayers) do
if banData.name:lower() == nameOrId:lower() then
Settings._internal.bannedPlayers[id] = nil
return "Unbanned " .. banData.name
end
end
end
return "Player not found in ban list"
end
-- Admin command (grant admin permissions)
COMMANDS.admin = function(args, speaker)
if speaker ~= LocalPlayer then
return "Only script owner can add admins"
end
local target = findPlayer(args[1], speaker)
local tier = args[2] or "t1" -- Default to tier 1
if not tier:lower():match("^t[1-3]$") and tier:lower() ~= "owner" then
tier = "t1" -- Invalid tier defaults to tier 1
end
if target == "all" then
return "Cannot admin all players at once"
elseif target then
if target ~= speaker then -- Prevent adding yourself again
Settings.RankedPlayers[target.Name] = tier:lower()
return "Gave " .. tier:upper() .. " admin to " .. target.Name
else
return "You already have full admin powers"
end
else
return "Player not found"
end
end
-- Alias for admin
COMMANDS.rank = COMMANDS.admin
-- Unadmin command (remove admin permissions)
COMMANDS.unadmin = function(args, speaker)
if speaker ~= LocalPlayer then
return "Only script owner can remove admins"
end
local target = findPlayer(args[1], speaker)
if target == "all" then
if canUseMultiTarget(speaker) then
-- Clear all admins except yourself
local savedOwner = Settings.RankedPlayers[speaker.Name]
Settings.RankedPlayers = {}
if savedOwner then
Settings.RankedPlayers[speaker.Name] = savedOwner
end
return "Removed admin from all players"
else
return "You don't have permission to remove all admins"
end
elseif target then
if target ~= speaker then -- Prevent removing your own permissions
if Settings.RankedPlayers[target.Name] then
Settings.RankedPlayers[target.Name] = nil
return "Removed admin from " .. target.Name
else
return target.Name .. " doesn't have admin permissions"
end
else
return "Cannot remove your own admin permissions"
end
else
return "Player not found"
end
end
-- Alias for unadmin
COMMANDS.unrank = COMMANDS.unadmin
-- Whitelist command
COMMANDS.whitelist = function(args, speaker)
if speaker ~= LocalPlayer then
return "Only script owner can use whitelist"
end
local target = findPlayer(args[1], speaker)
if target == "all" then
return "Cannot whitelist all players at once"
elseif target then
Settings.WhitelistedPlayers[target.Name] = true
return "Added " .. target.Name .. " to whitelist"
else
return "Player not found"
end
end
-- Unwhitelist command
COMMANDS.unwhitelist = function(args, speaker)
if speaker ~= LocalPlayer then
return "Only script owner can use unwhitelist"
end
local target = findPlayer(args[1], speaker)
if target == "all" then
if canUseMultiTarget(speaker) then
Settings.WhitelistedPlayers = {}
return "Cleared whitelist"
else
return "You don't have permission to clear the whitelist"
end
elseif target then
if Settings.WhitelistedPlayers[target.Name] then
Settings.WhitelistedPlayers[target.Name] = nil
return "Removed " .. target.Name .. " from whitelist"
else
return target.Name .. " is not whitelisted"
end
else
return "Player not found"
end
end
-- Blacklist command (auto-kill/kick players)
COMMANDS.blacklist = function(args, speaker)
if speaker ~= LocalPlayer then
return "Only script owner can use blacklist"
end
local target = findPlayer(args[1], speaker)
if target == "all" then
return "Cannot blacklist all players at once"
elseif target then
Settings.BlacklistedPlayers[target.Name] = true
return "Added " .. target.Name .. " to blacklist"
else
return "Player not found"
end
end
-- Unblacklist command
COMMANDS.unblacklist = function(args, speaker)
if speaker ~= LocalPlayer then
return "Only script owner can use unblacklist"
end
local target = findPlayer(args[1], speaker)
if target == "all" then
if canUseMultiTarget(speaker) then
Settings.BlacklistedPlayers = {}
return "Cleared blacklist"
else
return "You don't have permission to clear the blacklist"
end
elseif target then
if Settings.BlacklistedPlayers[target.Name] then
Settings.BlacklistedPlayers[target.Name] = nil
return "Removed " .. target.Name .. " from blacklist"
else
return target.Name .. " is not blacklisted"
end
else
return "Player not found"
end
end
-- Prefix command
COMMANDS.prefix = function(args, speaker)
local newPrefix = args[1]
if not newPrefix or #newPrefix == 0 then
return "Current prefix is: " .. Settings.Prefix
end
if #newPrefix > 3 then
return "Prefix cannot be longer than 3 characters"
end
Settings.Prefix = newPrefix
return "Changed prefix to: " .. newPrefix
end
-- Fly command
COMMANDS.fly = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
local speed = tonumber(args[2]) or Settings.FlySpeed
if target == "all" then
if canUseMultiTarget(speaker) and Settings.RankedNukeCmds then
for _, player in pairs(Players:GetPlayers()) do
if not Settings.WhitelistedPlayers[player.Name] then
-- Fly is a complex command and is primarily for local player
-- Simplified version for other players
local char = getBody(player)
if char then
local bv = Instance.new("BodyVelocity")
bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bv.P = 1500
bv.Velocity = Vector3.new(0, 1, 0)
bv.Parent = char.rootPart
game:GetService("Debris"):AddItem(bv, 0.1)
end
end
end
return "Gave temporary fly push to all players"
else
return "You don't have permission to target all players"
end
elseif target == "team" or type(target) == "table" then
if canUseMultiTarget(speaker) then
local players = (target == "team") and {} or target
if target == "team" then
local myTeam = speaker.TeamColor
for _, player in pairs(Players:GetPlayers()) do
if player.TeamColor == myTeam and not
Settings.WhitelistedPlayers[player.Name] then
table.insert(players, player)
end
end
end
for _, player in pairs(players) do
-- Fly is a complex command and is primarily for local player
-- Simplified version for other players
local char = getBody(player)
if char then
local bv = Instance.new("BodyVelocity")
bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bv.P = 1500
bv.Velocity = Vector3.new(0, 1, 0)
bv.Parent = char.rootPart
game:GetService("Debris"):AddItem(bv, 0.1)
end
end
return "Gave temporary fly push to targeted players"
else
return "You don't have permission to target multiple players"
end
elseif target then
if verifyArgs(speaker, target, "fly") then
if target == speaker then
-- Full fly implementation for local player
local char = getBody(target)
if not char then return "Character not found" end
-- Toggle fly state
if char.rootPart:FindFirstChild("FlyBV") then
-- Disable fly
char.rootPart.FlyBV:Destroy()
if char.rootPart:FindFirstChild("FlyBG") then
char.rootPart.FlyBG:Destroy()
end
return "Disabled fly mode"
else
-- Enable fly
local bv = Instance.new("BodyVelocity")
bv.Name = "FlyBV"
bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bv.P = 1500
bv.Velocity = Vector3.new(0, 0, 0)
bv.Parent = char.rootPart
local bg = Instance.new("BodyGyro")
bg.Name = "FlyBG"
bg.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
bg.P = 1500
bg.D = 50
bg.CFrame = char.rootPart.CFrame
bg.Parent = char.rootPart
-- Set up input handling for fly control
local connection
connection = RunService.RenderStepped:Connect(function()
if not char.rootPart:FindFirstChild("FlyBV") then
connection:Disconnect()
return
end
local cf = workspace.CurrentCamera.CFrame
local direction = Vector3.new()
local speed = speed * 2
if UserInputService:IsKeyDown(Enum.KeyCode.W) then
direction = direction + cf.LookVector
end
if UserInputService:IsKeyDown(Enum.KeyCode.S) then
direction = direction - cf.LookVector
end
if UserInputService:IsKeyDown(Enum.KeyCode.A) then
direction = direction - cf.RightVector
end
if UserInputService:IsKeyDown(Enum.KeyCode.D) then
direction = direction + cf.RightVector
end
if UserInputService:IsKeyDown(Enum.KeyCode.Space) then
direction = direction + Vector3.new(0, 1, 0)
end
if UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) then
direction = direction - Vector3.new(0, 1, 0)
end
if direction.Magnitude > 0 then
direction = direction.Unit * speed
end
char.rootPart.FlyBV.Velocity = direction
char.rootPart.FlyBG.CFrame =
CFrame.new(char.rootPart.Position, char.rootPart.Position + cf.LookVector)
end)
return "Enabled fly mode (WASD, Space, Shift)"
end
else
-- Simplified version for other players
local char = getBody(target)
if char then
local bv = Instance.new("BodyVelocity")
bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bv.P = 1500
bv.Velocity = Vector3.new(0, 1, 0)
bv.Parent = char.rootPart
game:GetService("Debris"):AddItem(bv, 0.1)
end
return "Gave temporary fly push to " .. target.Name
end
else
return "You don't have permission to make this player fly"
end
else
return "Player not found"
end
end
-- Noclip command
COMMANDS.noclip = function(args, speaker)
local target = args[1] and findPlayer(args[1], speaker) or speaker
if target ~= speaker then
return "Noclip can only be used on yourself"
end
if target == speaker then
local char = getBody(target)
if not char then return "Character not found" end
-- Toggle noclip state
if Settings.Noclip then
-- Disable noclip
Settings.Noclip = false
-- Remove existing noclip connection
if getgenv().NoclipConnection then
getgenv().NoclipConnection:Disconnect()
getgenv().NoclipConnection = nil
end
return "Disabled noclip mode"
else
-- Enable noclip
Settings.Noclip = true
-- Set up noclip connection
if getgenv().NoclipConnection then
getgenv().NoclipConnection:Disconnect()
end
getgenv().NoclipConnection = RunService.Stepped:Connect(function()
if not Settings.Noclip then
getgenv().NoclipConnection:Disconnect()
getgenv().NoclipConnection = nil
return
end
local char = getCharacter(target)
if not char then return end
for _, part in pairs(char:GetDescendants()) do
if part:IsA("BasePart") and part.CanCollide then
part.CanCollide = false
end
end
end)
return "Enabled noclip mode"
end
else
return "Noclip can only be used on yourself"
end
end
-- ESP command
COMMANDS.esp = function(args, speaker)
-- Toggle ESP state
if Settings.PlayerESP then
-- Disable ESP
Settings.PlayerESP = false
-- Clean up existing ESP
for _, obj in pairs(workspace:GetDescendants()) do
if obj.Name == "ESPHighlight" or obj.Name == "ESPLabel" then
obj:Destroy()
end
end
if getgenv().ESPUpdateConnection then
getgenv().ESPUpdateConnection:Disconnect()
getgenv().ESPUpdateConnection = nil
end
return "Disabled ESP"
else
-- Enable ESP
Settings.PlayerESP = true
-- Set up ESP connection
if getgenv().ESPUpdateConnection then
getgenv().ESPUpdateConnection:Disconnect()
end
-- Create ESP highlights and labels
local function createESP()
-- Clean up existing ESP
for _, obj in pairs(workspace:GetDescendants()) do
if obj.Name == "ESPHighlight" or obj.Name == "ESPLabel" then
obj:Destroy()
end
end
-- Create new ESP elements
for _, player in pairs(Players:GetPlayers()) do
if player ~= LocalPlayer and player.Character then
local highlight = Instance.new("Highlight")
highlight.Name = "ESPHighlight"
highlight.FillColor = player.TeamColor.Color
highlight.OutlineColor = Color3.new(1, 1, 1)
highlight.FillTransparency = 0.5
highlight.OutlineTransparency = 0
highlight.Parent = player.Character
if Settings.NameESP then
local billboardGui = Instance.new("BillboardGui")
billboardGui.Name = "ESPLabel"
billboardGui.AlwaysOnTop = true
billboardGui.Size = UDim2.new(0, 100, 0, 30)
billboardGui.StudsOffset = Vector3.new(0, 3, 0)
billboardGui.Parent = player.Character.Head
local nameLabel = Instance.new("TextLabel")
nameLabel.BackgroundTransparency = 1
nameLabel.Size = UDim2.new(1, 0, 1, 0)
nameLabel.Text = player.Name
nameLabel.TextColor3 = player.TeamColor.Color
nameLabel.TextStrokeTransparency = 0
nameLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
nameLabel.Font = Enum.Font.SourceSansBold
nameLabel.TextSize = 14
nameLabel.Parent = billboardGui
end
if Settings.TracerESP then
-- Create tracers (lines to players)
local line = Drawing.new("Line")
line.Visible = true
line.Color = player.TeamColor.Color
line.Thickness = 1
line.Transparency = 0.5
-- Store the line in a table for updating
if not getgenv().ESPTracers then
getgenv().ESPTracers = {}
end
getgenv().ESPTracers[player] = line
end
end
end
end
-- Initial ESP creation
createESP()
-- Update ESP on RenderStepped
getgenv().ESPUpdateConnection = RunService.RenderStepped:Connect(function()
if not Settings.PlayerESP then
getgenv().ESPUpdateConnection:Disconnect()
getgenv().ESPUpdateConnection = nil
return
end
-- Update tracers if enabled
if Settings.TracerESP and getgenv().ESPTracers then
for player, line in pairs(getgenv().ESPTracers) do
if player and player.Character and
player.Character:FindFirstChild("HumanoidRootPart") then
local pos, onScreen =
workspace.CurrentCamera:WorldToViewportPoint(player.Character.HumanoidRootPart.Posi
tion)
if onScreen then
line.From =
Vector2.new(workspace.CurrentCamera.ViewportSize.X / 2,
workspace.CurrentCamera.ViewportSize.Y)
line.To = Vector2.new(pos.X, pos.Y)
line.Visible = true
else
line.Visible = false
end
else
line.Visible = false
end
end
end
end)
-- Update ESP when players are added or removed
Players.PlayerAdded:Connect(function(player)
if Settings.PlayerESP then
wait(1) -- Wait for character to load
createESP()
end
end)
Players.PlayerRemoving:Connect(function(player)
if Settings.PlayerESP and getgenv().ESPTracers and
getgenv().ESPTracers[player] then
getgenv().ESPTracers[player]:Remove()
getgenv().ESPTracers[player] = nil
end
end)
return "Enabled ESP"
end
end
-- Xray command
COMMANDS.xray = function(args, speaker)
-- Toggle Xray state
if Settings.Xray then
-- Disable Xray
Settings.Xray = false
-- Restore original transparency
for _, part in pairs(workspace:GetDescendants()) do
if part:IsA("BasePart") and not part:IsDescendantOf(speaker.Character)
and not part:IsDescendantOf(workspace.CurrentCamera) then
if part:GetAttribute("OriginalTransparency") ~= nil then
part.Transparency = part:GetAttribute("OriginalTransparency")
part:SetAttribute("OriginalTransparency", nil)
end
end
end
return "Disabled Xray"
else
-- Enable Xray
Settings.Xray = true
-- Set transparency for all parts
for _, part in pairs(workspace:GetDescendants()) do
if part:IsA("BasePart") and not part:IsDescendantOf(speaker.Character)
and not part:IsDescendantOf(workspace.CurrentCamera) then
-- Skip certain parts like skybox
if part.Name == "Sky" or part.Name == "Clouds" or part.Name ==
"Atmosphere" then
continue
end
-- Store original transparency
if part:GetAttribute("OriginalTransparency") == nil then
part:SetAttribute("OriginalTransparency", part.Transparency)
end
-- Set new transparency
part.Transparency = 0.8
end
end
-- Handle new parts
workspace.DescendantAdded:Connect(function(part)
if not Settings.Xray then return end
if part:IsA("BasePart") and not part:IsDescendantOf(speaker.Character)
and not part:IsDescendantOf(workspace.CurrentCamera) then
-- Skip certain parts like skybox
if part.Name == "Sky" or part.Name == "Clouds" or part.Name ==
"Atmosphere" then
return
end
-- Store original transparency
if part:GetAttribute("OriginalTransparency") == nil then
part:SetAttribute("OriginalTransparency", part.Transparency)
end
-- Set new transparency
part.Transparency = 0.8
end
end)
return "Enabled Xray"
end
end
-- Fullbright command
COMMANDS.fullbright = function(args, speaker)
-- Toggle fullbright state
if Settings.Fullbright then
-- Disable fullbright
Settings.Fullbright = false
-- Restore original lighting
if getgenv().OriginalBrightness then
Lighting.Brightness = getgenv().OriginalBrightness
getgenv().OriginalBrightness = nil
end
if getgenv().OriginalAmbient then
Lighting.Ambient = getgenv().OriginalAmbient
getgenv().OriginalAmbient = nil
end
if getgenv().OriginalOutdoorAmbient then
Lighting.OutdoorAmbient = getgenv().OriginalOutdoorAmbient
getgenv().OriginalOutdoorAmbient = nil
end
if getgenv().OriginalClockTime then
Lighting.ClockTime = getgenv().OriginalClockTime
getgenv().OriginalClockTime = nil
end
return "Disabled fullbright"
else
-- Enable fullbright
Settings.Fullbright = true
-- Store original lighting
getgenv().OriginalBrightness = Lighting.Brightness
getgenv().OriginalAmbient = Lighting.Ambient
getgenv().OriginalOutdoorAmbient = Lighting.OutdoorAmbient
getgenv().OriginalClockTime = Lighting.ClockTime
-- Set new lighting
Lighting.Brightness = 2
Lighting.Ambient = Color3.new(1, 1, 1)
Lighting.OutdoorAmbient = Color3.new(1, 1, 1)
Lighting.ClockTime = 12
return "Enabled fullbright"
end
end
-- Alias for fullbright
COMMANDS.fb = COMMANDS.fullbright
-- KillAura command
COMMANDS.killaura = function(args, speaker)
local range = tonumber(args[1]) or Settings.KillAuraRange
-- Toggle KillAura state
if Settings.KillAura then
-- Disable KillAura
Settings.KillAura = false
-- Remove existing KillAura connection
if getgenv().KillAuraConnection then
getgenv().KillAuraConnection:Disconnect()
getgenv().KillAuraConnection = nil
end
return "Disabled KillAura"
else
-- Enable KillAura
Settings.KillAura = true
Settings.KillAuraRange = range
-- Set up KillAura connection
if getgenv().KillAuraConnection then
getgenv().KillAuraConnection:Disconnect()
end
getgenv().KillAuraConnection = RunService.Heartbeat:Connect(function()
if not Settings.KillAura then
getgenv().KillAuraConnection:Disconnect()
getgenv().KillAuraConnection = nil
return
end
-- Find players in range
for _, player in pairs(Players:GetPlayers()) do
if player ~= LocalPlayer and not
Settings.WhitelistedPlayers[player.Name] then
-- Check team restriction
if Settings.KillAuraTeamCheck and player.TeamColor ==
LocalPlayer.TeamColor then
continue
end
-- Check if in range
if isPlayerInRange(player, Settings.KillAuraRange) then
-- Kill the player
performPlayerAction(player, "kill")
-- Visual feedback if enabled
if Settings.KillAuraVisualFeedback and
LocalPlayer.Character and player.Character then
local line = Drawing.new("Line")
line.Visible = true
line.Color = Color3.new(1, 0, 0)
line.Thickness = 1
line.Transparency = 0.5
local pos1, onScreen1 =
workspace.CurrentCamera:WorldToViewportPoint(LocalPlayer.Character.HumanoidRootPart
.Position)
local pos2, onScreen2 =
workspace.CurrentCamera:WorldToViewportPoint(player.Character.HumanoidRootPart.Posi
tion)
if onScreen1 and onScreen2 then
line.From = Vector2.new(pos1.X, pos1.Y)
line.To = Vector2.new(pos2.X, pos2.Y)
end
game:GetService("Debris"):AddItem(line, 0.1)
end
-- Short delay to prevent immediate re-killing
wait(1)
end
end
end
end)
return "Enabled KillAura with range " .. range .. " studs"
end
end
-- Alias for killaura
COMMANDS.ka = COMMANDS.killaura
-- InfiniteJump command
COMMANDS.infinitejump = function(args, speaker)
-- Toggle InfiniteJump state
if Settings.InfiniteJump then
-- Disable InfiniteJump
Settings.InfiniteJump = false
-- Remove existing InfiniteJump connection
if getgenv().InfiniteJumpConnection then
getgenv().InfiniteJumpConnection:Disconnect()
getgenv().InfiniteJumpConnection = nil
end
return "Disabled Infinite Jump"
else
-- Enable InfiniteJump
Settings.InfiniteJump = true
-- Set up InfiniteJump connection
if getgenv().InfiniteJumpConnection then
getgenv().InfiniteJumpConnection:Disconnect()
end
getgenv().InfiniteJumpConnection =
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if not Settings.InfiniteJump then
getgenv().InfiniteJumpConnection:Disconnect()
getgenv().InfiniteJumpConnection = nil
return
end
if input.KeyCode == Enum.KeyCode.Space and not gameProcessed then
local char = getCharacter(speaker)
if char and char:FindFirstChild("Humanoid") then
char.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
end
end
end)
return "Enabled Infinite Jump"
end
end
-- Alias for infinitejump
COMMANDS.infjump = COMMANDS.infinitejump
-- AntiTase command
COMMANDS.antitase = function(args, speaker)
-- Toggle AntiTase state
if Settings.AntiTase then
-- Disable AntiTase
Settings.AntiTase = false
-- Remove existing hook
if getgenv().OriginalTazePlayer then
workspace.Remote.tazePlayer = getgenv().OriginalTazePlayer
getgenv().OriginalTazePlayer = nil
end
return "Disabled Anti-Tase"
else
-- Enable AntiTase
Settings.AntiTase = true
-- Hook the tazePlayer remote
if not getgenv().OriginalTazePlayer then
getgenv().OriginalTazePlayer = workspace.Remote.tazePlayer.FireServer
workspace.Remote.tazePlayer.FireServer = function(self, ...)
local args = {...}
-- Check if the target is the local player
if args[1] and args[1] == LocalPlayer.Character.Humanoid then
-- Block the tase
return
end
-- Allow other tases
return getgenv().OriginalTazePlayer(self, ...)
end
end
return "Enabled Anti-Tase"
end
end
-- AntiArrest command
COMMANDS.antiarrest = function(args, speaker)
-- Toggle AntiArrest state
if Settings.AntiArrest then
-- Disable AntiArrest
Settings.AntiArrest = false
-- Remove existing hook
if getgenv().OriginalArrest then
workspace.Remote.arrest = getgenv().OriginalArrest
getgenv().OriginalArrest = nil
end
return "Disabled Anti-Arrest"
else
-- Enable AntiArrest
Settings.AntiArrest = true
-- Hook the arrest remote
if not getgenv().OriginalArrest then
getgenv().OriginalArrest = workspace.Remote.arrest.FireServer
workspace.Remote.arrest.FireServer = function(self, ...)
local args = {...}
-- Check if the target is the local player's head
if args[1] and (args[1] == LocalPlayer.Character.Head or
args[1]:IsDescendantOf(LocalPlayer.Character)) then
-- Block the arrest
return
end
-- Allow other arrests
return getgenv().OriginalArrest(self, ...)
end
end
return "Enabled Anti-Arrest"
end
end
-- AntiVoid command
COMMANDS.antivoid = function(args, speaker)
-- Toggle AntiVoid state
if Settings.AntiVoid then
-- Disable AntiVoid
Settings.AntiVoid = false
-- Remove existing AntiVoid connection
if getgenv().AntiVoidConnection then
getgenv().AntiVoidConnection:Disconnect()
getgenv().AntiVoidConnection = nil
end
return "Disabled Anti-Void"
else
-- Enable AntiVoid
Settings.AntiVoid = true
-- Set up AntiVoid connection
if getgenv().AntiVoidConnection then
getgenv().AntiVoidConnection:Disconnect()
end
getgenv().AntiVoidConnection = RunService.Heartbeat:Connect(function()
if not Settings.AntiVoid then
getgenv().AntiVoidConnection:Disconnect()
getgenv().AntiVoidConnection = nil
return
end
local char = getCharacter(speaker)
if char and char:FindFirstChild("HumanoidRootPart") then
-- Check if falling into void
if char.HumanoidRootPart.Position.Y < -100 then
-- Teleport back to a safe location
teleportPlayer(speaker, TeleportLocations["yard"])
Notif("Anti-Void", "Prevented fall into void", 3)
end
end
end)
return "Enabled Anti-Void"
end
end
-- AntiFling command
COMMANDS.antifling = function(args, speaker)
-- Toggle AntiFling state
if Settings.AntiFling then
-- Disable AntiFling
Settings.AntiFling = false
-- Remove existing constraints
local char = getCharacter(speaker)
if char then
for _, part in pairs(char:GetDescendants()) do
if part:IsA("BasePart") and part:FindFirstChild("AntiFlingAP") then
part.AntiFlingAP:Destroy()
end
end
end
-- Remove the connection
if getgenv().AntiFlingConnection then
getgenv().AntiFlingConnection:Disconnect()
getgenv().AntiFlingConnection = nil
end
return "Disabled Anti-Fling"
else
-- Enable AntiFling
Settings.AntiFling = true
-- Add constraints to all parts
local function applyAntiFling(char)
if not char then return end
for _, part in pairs(char:GetDescendants()) do
if part:IsA("BasePart") and not part:FindFirstChild("AntiFlingAP")
then
local ap = Instance.new("BodyAngularVelocity")
ap.Name = "AntiFlingAP"
ap.AngularVelocity = Vector3.new(0, 0, 0)
ap.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
ap.P = 1000
ap.Parent = part
end
end
end
-- Apply initially
applyAntiFling(getCharacter(speaker))
-- Set up connection for respawn
if getgenv().AntiFlingConnection then
getgenv().AntiFlingConnection:Disconnect()
end
getgenv().AntiFlingConnection =
speaker.CharacterAdded:Connect(function(char)
if not Settings.AntiFling then
getgenv().AntiFlingConnection:Disconnect()
getgenv().AntiFlingConnection = nil
return
end
wait(0.5) -- Wait for character to fully load
applyAntiFling(char)
end)
return "Enabled Anti-Fling"
end
end
-- AntiCrash command
COMMANDS.anticrash = function(args, speaker)
-- Toggle AntiCrash state
if Settings.AntiCrash then
-- Disable AntiCrash
Settings.AntiCrash = false
return "Disabled Anti-Crash"
else
-- Enable AntiCrash
Settings.AntiCrash = true
-- Install protections
local mt = getrawmetatable(game)
local oldNc = mt.__namecall
if not getgenv().OriginalNamecall then
getgenv().OriginalNamecall = oldNc
end
setreadonly(mt, false)
mt.__namecall = newcclosure(function(self, ...)
local args = {...}
local method = getnamecallmethod()
-- Detect potential crash attempts
if method == "FireServer" or method == "InvokeServer" then
local argCount = #args
-- Check for unusually large argument count
if argCount > 100 then
Notif("Anti-Crash", "Blocked large remote call (" ..
argCount .. " args)", 3)
return nil
end
-- Check for unusually large tables
for _, arg in pairs(args) do
if type(arg) == "table" then
local tableSize = 0
for _ in pairs(arg) do
tableSize = tableSize + 1
end
if tableSize > 1000 then
Notif("Anti-Crash", "Blocked large table (" ..
tableSize .. " items)", 3)
return nil
end
elseif type(arg) == "string" and #arg > 10000 then
Notif("Anti-Crash", "Blocked large string (" .. #arg .. "
chars)", 3)
return nil
end
end
end
return oldNc(self, ...)
end)
setreadonly(mt, true)
return "Enabled Anti-Crash"
end
end
-- AntiShoot command
COMMANDS.antishoot = function(args, speaker)
-- Toggle AntiShoot state
if Settings.AntiShoot then
-- Disable AntiShoot
Settings.AntiShoot = false
-- Remove existing hook
if getgenv().OriginalShootEvent then
workspace.Remote.ShootEvent = getgenv().OriginalShootEvent
getgenv().OriginalShootEvent = nil
end
return "Disabled Anti-Shoot"
else
-- Enable AntiShoot
Settings.AntiShoot = true
-- Hook the ShootEvent remote
if not getgenv().OriginalShootEvent then
getgenv().OriginalShootEvent = workspace.Remote.ShootEvent.FireServer
workspace.Remote.ShootEvent.FireServer = function(self, ...)
local args = {...}
-- Check if the target is the local player
if args[1] and #args[1] > 0 and args[1][1] and (args[1][1] ==
LocalPlayer.Character.Head or args[1][1]:IsDescendantOf(LocalPlayer.Character))
then
-- Find the shooter and kill them
for _, player in pairs(Players:GetPlayers()) do
if player ~= LocalPlayer and player.Character and
player.Character:FindFirstChild("Humanoid") and player.Character.Humanoid.Health >
0 then
-- Check if they have a gun equipped
local hasGun = false
if player.Character:FindFirstChildOfClass("Tool") and
player.Character:FindFirstChildOfClass("Tool"):FindFirstChild("GunStates") then
hasGun = true
end
if hasGun then
-- Kill the shooter
performPlayerAction(player, "kill")
Notif("Anti-Shoot", "Killed " .. player.Name .. "
for shooting at you", 3)
break
end
end
end
-- Block the shot
return
end
-- Allow other shots
return getgenv().OriginalShootEvent(self, ...)
end
end
return "Enabled Anti-Shoot"
end
end
-- AntiPunch command
COMMANDS.antipunch = function(args, speaker)
-- Toggle AntiPunch state
if Settings.AntiPunch then
-- Disable AntiPunch
Settings.AntiPunch = false
-- Remove existing hook
if getgenv().OriginalMeleeEvent then
workspace.Remote.meleeEvent = getgenv().OriginalMeleeEvent
getgenv().OriginalMeleeEvent = nil
end
return "Disabled Anti-Punch"
else
-- Enable AntiPunch
Settings.AntiPunch = true
-- Hook the meleeEvent remote
if not getgenv().OriginalMeleeEvent then
getgenv().OriginalMeleeEvent = workspace.Remote.meleeEvent.FireServer
workspace.Remote.meleeEvent.FireServer = function(self, ...)
local args = {...}
-- Check if the target is the local player
if args[1] and (args[1] == LocalPlayer.Character or
args[1]:IsDescendantOf(LocalPlayer.Character)) then
-- Find the puncher and kill them
for _, player in pairs(Players:GetPlayers()) do
if player ~= LocalPlayer and player.Character and
player.Character:FindFirstChild("Humanoid") and player.Character.Humanoid.Health >
0 then
-- Check if they are close enough
if (player.Character.HumanoidRootPart.Position -
LocalPlayer.Character.HumanoidRootPart.Position).Magnitude < 10 then
-- Kill the puncher
performPlayerAction(player, "kill")
Notif("Anti-Punch", "Killed " .. player.Name .. "
for punching you", 3)
break
end
end
end
-- Block the punch
return
end
-- Allow other punches
return getgenv().OriginalMeleeEvent(self, ...)
end
end
return "Enabled Anti-Punch"
end
end
-- InfAmmo command
COMMANDS.infammo = function(args, speaker)
-- Toggle InfAmmo state
if Settings.InfAmmo then
-- Disable InfAmmo
Settings.InfAmmo = false
return "Disabled Infinite Ammo"
else
-- Enable InfAmmo
Settings.InfAmmo = true
-- Apply infinite ammo to current weapons
local function applyInfAmmo()
if not Settings.InfAmmo then return end
-- Check backpack
for _, tool in pairs(LocalPlayer.Backpack:GetChildren()) do
if tool:IsA("Tool") and tool:FindFirstChild("GunStates") then
local gunStates = require(tool.GunStates)
gunStates.MaxAmmo = math.huge
gunStates.CurrentAmmo = math.huge
gunStates.StoredAmmo = math.huge
end
end
-- Check equipped tools
if LocalPlayer.Character then
for _, tool in pairs(LocalPlayer.Character:GetChildren()) do
if tool:IsA("Tool") and tool:FindFirstChild("GunStates") then
local gunStates = require(tool.GunStates)
gunStates.MaxAmmo = math.huge
gunStates.CurrentAmmo = math.huge
gunStates.StoredAmmo = math.huge
end
end
end
end
-- Apply initially
applyInfAmmo()
-- Monitor for new weapons
coroutine.wrap(function()
while Settings.InfAmmo do
applyInfAmmo()
wait(1)
end
end)()
return "Enabled Infinite Ammo"
end
end
-- SilentAim command
COMMANDS.silentaim = function(args, speaker)
-- Toggle SilentAim state
if Settings.SilentAim then
-- Disable SilentAim
Settings.SilentAim = false
return "Disabled Silent Aim"
else
-- Enable SilentAim
Settings.SilentAim = true
-- Also configure headshot setting
local headshot = args[1] and args[1]:lower() == "head"
Settings.SilentAimHeadshot = headshot
-- Install the silent aim
setupSilentAim()
return "Enabled Silent Aim" .. (headshot and " (Headshot mode)" or "")
end
end
-- OneShot command
COMMANDS.oneshot = function(args, speaker)
-- Toggle OneShot state
if Settings.InfDamage then
-- Disable OneShot
Settings.InfDamage = false
-- Remove existing hook
if getgenv().OriginalShootEvent then
workspace.Remote.ShootEvent = getgenv().OriginalShootEvent
getgenv().OriginalShootEvent = nil
end
return "Disabled One-Shot Kills"
else
-- Enable OneShot
Settings.InfDamage = true
-- Hook the ShootEvent remote
if not getgenv().OriginalShootEvent then
getgenv().OriginalShootEvent = workspace.Remote.ShootEvent.FireServer
workspace.Remote.ShootEvent.FireServer = function(self, ...)
local args = {...}
-- Increase damage for one-shot kill
if args[1] and #args[1] > 0 then
args[1][3] = 100 -- High damage for instant kill
end
-- Allow the modified shot
return getgenv().OriginalShootEvent(self, unpack(args))
end
end
return "Enabled One-Shot Kills"
end
end
-- RapidFire command
COMMANDS.rapidfire = function(args, speaker)
-- Toggle RapidFire state
if Settings.RapidFire then
-- Disable RapidFire
Settings.RapidFire = false
return "Disabled Rapid Fire"
else
-- Enable RapidFire
Settings.RapidFire = true
-- Apply rapid fire to guns
local function applyRapidFire()
if not Settings.RapidFire then return end
-- Check backpack
for _, tool in pairs(LocalPlayer.Backpack:GetChildren()) do
if tool:IsA("Tool") and tool:FindFirstChild("GunStates") then
local gunStates = require(tool.GunStates)
gunStates.AutoFire = true
gunStates.FireRate = 0.05
end
end
-- Check equipped tools
if LocalPlayer.Character then
for _, tool in pairs(LocalPlayer.Character:GetChildren()) do
if tool:IsA("Tool") and tool:FindFirstChild("GunStates") then
local gunStates = require(tool.GunStates)
gunStates.AutoFire = true
gunStates.FireRate = 0.05
end
end
end
end
-- Apply initially
applyRapidFire()
-- Monitor for new weapons
coroutine.wrap(function()
while Settings.RapidFire do
applyRapidFire()
wait(1)
end
end)()
return "Enabled Rapid Fire"
end
end
-- NoRecoil command
COMMANDS.norecoil = function(args, speaker)
-- Toggle NoRecoil state
if Settings.NoRecoil then
-- Disable NoRecoil
Settings.NoRecoil = false
return "Disabled No Recoil"
else
-- Enable NoRecoil
Settings.NoRecoil = true
-- Apply no recoil to guns
local function applyNoRecoil()
if not Settings.NoRecoil then return end
-- Check backpack
for _, tool in pairs(LocalPlayer.Backpack:GetChildren()) do
if tool:IsA("Tool") and tool:FindFirstChild("GunStates") then
local gunStates = require(tool.GunStates)
gunStates.Recoil = 0
gunStates.RecoilShake = 0
end
end
-- Check equipped tools
if LocalPlayer.Character then
for _, tool in pairs(LocalPlayer.Character:GetChildren()) do
if tool:IsA("Tool") and tool:FindFirstChild("GunStates") then
local gunStates = require(tool.GunStates)
gunStates.Recoil = 0
gunStates.RecoilShake = 0
end
end
end
end
-- Apply initially
applyNoRecoil()
-- Monitor for new weapons
coroutine.wrap(function()
while Settings.NoRecoil do
applyNoRecoil()
wait(1)
end
end)()
return "Enabled No Recoil"
end
end
-- AutoGuns command
COMMANDS.autoguns = function(args, speaker)
-- Toggle AutoGuns state
if Settings.AutoGuns then
-- Disable AutoGuns
Settings.AutoGuns = false
-- Remove existing connection
if getgenv().AutoGunsConnection then
getgenv().AutoGunsConnection:Disconnect()
getgenv().AutoGunsConnection = nil
end
return "Disabled Auto Guns"
else
-- Enable AutoGuns
Settings.AutoGuns = true
-- Set up Auto Guns connection
if getgenv().AutoGunsConnection then
getgenv().AutoGunsConnection:Disconnect()
end
-- Give all guns immediately
giveItem(speaker, "guns")
-- Set up connection for respawn
getgenv().AutoGunsConnection =
speaker.CharacterAdded:Connect(function(char)
if not Settings.AutoGuns then
getgenv().AutoGunsConnection:Disconnect()
getgenv().AutoGunsConnection = nil
return
end
wait(1) -- Wait for character to fully load
giveItem(speaker, "guns")
end)
return "Enabled Auto Guns"
end
end
-- =======================================
-- CHAT COMMAND HANDLER
-- =======================================
-- Function to process chat commands
local function processChatCommand(message, speaker)
if not message or not speaker then return end
-- Check if the message starts with the prefix
if not message:sub(1, #Settings.Prefix) == Settings.Prefix then return end
-- Extract the command and arguments
local commandWithArgs = message:sub(#Settings.Prefix + 1)
local splitMessage = commandWithArgs:split(" ")
local commandName = splitMessage[1]:lower()
table.remove(splitMessage, 1)
local args = splitMessage
-- Check for command aliases
if CommandAliases[commandName] then
commandName = CommandAliases[commandName]
end
-- Execute the command if it exists
if COMMANDS[commandName] then
local success, result = pcall(function()
return COMMANDS[commandName](args, speaker)
end)
if success then
-- Command executed successfully
if result then
Notif("Command", result, 3)
-- Output the result to chat if enabled
if Settings.RankedOutput and speaker ~= LocalPlayer then
sendWhisper(speaker, result)
end
end
else
-- Command failed
Notif("Error", "Failed to execute command: " .. tostring(result), 3)
-- Output the error to chat if enabled
if Settings.RankedOutput and speaker ~= LocalPlayer then
sendWhisper(speaker, "Error: " .. tostring(result))
end
-- Log the error
table.insert(Settings._internal.errorLog, {
command = commandName,
args = args,
error = tostring(result),
time = os.time()
})
-- Keep error log at reasonable size
if #Settings._internal.errorLog > 50 then
table.remove(Settings._internal.errorLog, 1)
end
end
return true
end
return false
end
-- Listen for chat messages from players
local chatEvents = ReplicatedStorage:FindFirstChild("DefaultChatSystemChatEvents")
if chatEvents then
local onMessageEvent = chatEvents:FindFirstChild("OnMessageDoneFiltering")
if onMessageEvent then
onMessageEvent.OnClientEvent:Connect(function(messageData)
if not messageData or not messageData.FromSpeaker then return end
-- Get the player who sent the message
local speaker = Players:FindFirstChild(messageData.FromSpeaker)
if not speaker then return end
-- Check if the player has admin or is the local player
if speaker == LocalPlayer or Settings.RankedPlayers[speaker.Name] then
local message = messageData.Message or ""
processChatCommand(message, speaker)
end
end)
end
end
-- =======================================
-- LOOP KILL & AUTO SYSTEMS
-- =======================================
-- Set up auto kill system
coroutine.wrap(function()
while wait(1) do -- Check every second
-- Loop kill players
for name, _ in pairs(Settings.LoopKillPlayers) do
local player = Players:FindFirstChild(name)
if player and player.Character and
player.Character:FindFirstChild("Humanoid") and player.Character.Humanoid.Health >
0 then
performPlayerAction(player, "kill")
wait(0.1) -- Small delay to prevent overload
end
end
-- Auto kill blacklisted players
for name, _ in pairs(Settings.BlacklistedPlayers) do
local player = Players:FindFirstChild(name)
if player and player.Character and
player.Character:FindFirstChild("Humanoid") and player.Character.Humanoid.Health >
0 then
performPlayerAction(player, "kill")
wait(0.1) -- Small delay to prevent overload
end
end
-- Auto get guns if enabled
if Settings.AutoGuns and LocalPlayer.Character and
LocalPlayer.Character:FindFirstChild("Humanoid") and
LocalPlayer.Character.Humanoid.Health > 0 then
local hasAllGuns = true
local hasPistol = false
local hasShotgun = false
local hasAK47 = false
local hasRiot = false
-- Check backpack
for _, tool in pairs(LocalPlayer.Backpack:GetChildren()) do
if tool.Name == "M9" then hasPistol = true end
if tool.Name == "Remington 870" then hasShotgun = true end
if tool.Name == "AK-47" then hasAK47 = true end
if tool.Name == "Riot Shield" then hasRiot = true end
end
-- Check equipped tools
if LocalPlayer.Character then
for _, tool in pairs(LocalPlayer.Character:GetChildren()) do
if tool:IsA("Tool") then
if tool.Name == "M9" then hasPistol = true end
if tool.Name == "Remington 870" then hasShotgun = true end
if tool.Name == "AK-47" then hasAK47 = true end
if tool.Name == "Riot Shield" then hasRiot = true end
end
end
end
hasAllGuns = hasPistol and hasShotgun and hasAK47 and hasRiot
if not hasAllGuns then
giveItem(LocalPlayer, "guns")
end
end
-- Auto team if enabled
if Settings.AutoTeam and Settings.AutoTeamValue ~= "none" then
if LocalPlayer.TeamColor.Name == "Medium stone grey" then -- No team
if Settings.AutoTeamValue == "prisoner" or Settings.AutoTeamValue
== "inmate" then
setTeam(LocalPlayer, "Bright orange")
elseif Settings.AutoTeamValue == "guard" then
setTeam(LocalPlayer, "Bright blue")
elseif Settings.AutoTeamValue == "criminal" or
Settings.AutoTeamValue == "crim" then
setTeam(LocalPlayer, "Really red")
end
end
end
end
end)()
-- Ban check system
coroutine.wrap(function()
while wait(5) do -- Check every 5 seconds
-- Check for bans
for _, player in pairs(Players:GetPlayers()) do
if Settings._internal.bannedPlayers[player.UserId] then
local banData = Settings._internal.bannedPlayers[player.UserId]
-- Check if ban has expired
if os.time() > banData.expiresAt then
-- Ban expired, remove it
Settings._internal.bannedPlayers[player.UserId] = nil
else
-- Ban still active, kick the player
local timeLeft = math.floor((banData.expiresAt - os.time()) /
60) -- Minutes left
pcall(function()
player:Kick("You are banned for " .. timeLeft .. " more
minutes. Reason: " .. banData.reason)
end)
end
end
end
end
end)()
-- Player join/leave notifications
if Settings.JoinNotify then
Players.PlayerAdded:Connect(function(player)
Notif("Player Joined", player.Name, 3)
end)
end
if Settings.LeaveNotify then
Players.PlayerRemoving:Connect(function(player)
Notif("Player Left", player.Name, 3)
end)
end
-- =======================================
-- GUI COMMANDS & MENU SYSTEM
-- =======================================
-- Function to create the command GUI
local function createCommandGui()
if not Settings.CustomGuiEnabled then return end
-- Check if GUI already exists
if getgenv().CommandGui then
getgenv().CommandGui:Destroy()
getgenv().CommandGui = nil
end
-- Create GUI
local gui = Instance.new("ScreenGui")
gui.Name = "PrisonAdminGUI"
gui.ResetOnSpawn = false
-- Create main frame
local mainFrame = Instance.new("Frame")
mainFrame.Name = "MainFrame"
mainFrame.Size = UDim2.new(0, 300, 0, 400)
mainFrame.Position = UDim2.new(0.5, -150, 0.5, -200)
mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
mainFrame.BorderSizePixel = 0
mainFrame.Visible = false
mainFrame.Parent = gui
-- Create title bar
local titleBar = Instance.new("Frame")
titleBar.Name = "TitleBar"
titleBar.Size = UDim2.new(1, 0, 0, 30)
titleBar.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
titleBar.BorderSizePixel = 0
titleBar.Parent = mainFrame
-- Make title bar draggable
local dragging = false
local dragInput, dragStart, startPos
titleBar.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
dragStart = input.Position
startPos = mainFrame.Position
end
end)
titleBar.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = false
end
end)
gui.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement and dragging
then
dragInput = input
end
end)
game:GetService("RunService").RenderStepped:Connect(function()
if dragging and dragInput then
local delta = dragInput.Position - dragStart
mainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset +
delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
end)
-- Title text
local titleText = Instance.new("TextLabel")
titleText.Name = "TitleText"
titleText.Size = UDim2.new(1, -60, 1, 0)
titleText.Position = UDim2.new(0, 10, 0, 0)
titleText.BackgroundTransparency = 1
titleText.Text = "Prison Life Admin (v" .. currentVersion .. ")"
titleText.TextColor3 = Color3.fromRGB(255, 255, 255)
titleText.TextSize = 16
titleText.Font = Enum.Font.SourceSansBold
titleText.TextXAlignment = Enum.TextXAlignment.Left
titleText.Parent = titleBar
-- Close button
local closeButton = Instance.new("TextButton")
closeButton.Name = "CloseButton"
closeButton.Size = UDim2.new(0, 25, 0, 25)
closeButton.Position = UDim2.new(1, -30, 0, 2)
closeButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
closeButton.BorderSizePixel = 0
closeButton.Text = "X"
closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
closeButton.TextSize = 16
closeButton.Font = Enum.Font.SourceSansBold
closeButton.Parent = titleBar
-- Close button functionality
closeButton.MouseButton1Click:Connect(function()
mainFrame.Visible = false
end)
-- Create tab system
local tabs = {"Commands", "Players", "Settings", "Info"}
local tabButtons = {}
local tabFrames = {}
-- Tab container
local tabContainer = Instance.new("Frame")
tabContainer.Name = "TabContainer"
tabContainer.Size = UDim2.new(1, 0, 0, 30)
tabContainer.Position = UDim2.new(0, 0, 0, 30)
tabContainer.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
tabContainer.BorderSizePixel = 0
tabContainer.Parent = mainFrame
-- Create tabs
for i, tabName in ipairs(tabs) do
-- Tab button
local tabButton = Instance.new("TextButton")
tabButton.Name = tabName .. "Button"
tabButton.Size = UDim2.new(1/#tabs, 0, 1, 0)
tabButton.Position = UDim2.new((i-1)/#tabs, 0, 0, 0)
tabButton.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
tabButton.BorderSizePixel = 0
tabButton.Text = tabName
tabButton.TextColor3 = Color3.fromRGB(200, 200, 200)
tabButton.TextSize = 14
tabButton.Font = Enum.Font.SourceSans
tabButton.Parent = tabContainer
tabButtons[tabName] = tabButton
-- Tab frame
local tabFrame = Instance.new("ScrollingFrame")
tabFrame.Name = tabName .. "Frame"
tabFrame.Size = UDim2.new(1, 0, 1, -60)
tabFrame.Position = UDim2.new(0, 0, 0, 60)
tabFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
tabFrame.BorderSizePixel = 0
tabFrame.ScrollBarThickness = 6
tabFrame.Visible = i == 1 -- First tab visible by default
tabFrame.CanvasSize = UDim2.new(0, 0, 0, 1000) -- Will be adjusted
dynamically
tabFrame.ScrollingDirection = Enum.ScrollingDirection.Y
tabFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
tabFrame.Parent = mainFrame
tabFrames[tabName] = tabFrame
-- Tab button functionality
tabButton.MouseButton1Click:Connect(function()
-- Hide all tab frames
for _, frame in pairs(tabFrames) do
frame.Visible = false
end
-- Reset all button colors
for _, button in pairs(tabButtons) do
button.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
button.TextColor3 = Color3.fromRGB(200, 200, 200)
end
-- Show selected tab
tabFrame.Visible = true
tabButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
tabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
end)
end
-- Populate Commands tab
local commandsFrame = tabFrames["Commands"]
-- Search bar
local searchBar = Instance.new("TextBox")
searchBar.Name = "SearchBar"
searchBar.Size = UDim2.new(1, -20, 0, 30)
searchBar.Position = UDim2.new(0, 10, 0, 10)
searchBar.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
searchBar.BorderSizePixel = 0
searchBar.Text = "Search commands..."
searchBar.TextColor3 = Color3.fromRGB(200, 200, 200)
searchBar.TextSize = 14
searchBar.Font = Enum.Font.SourceSans
searchBar.ClearTextOnFocus = true
searchBar.Parent = commandsFrame
-- Command buttons container
local commandListContainer = Instance.new("Frame")
commandListContainer.Name = "CommandListContainer"
commandListContainer.Size = UDim2.new(1, -20, 1, -50)
commandListContainer.Position = UDim2.new(0, 10, 0, 50)
commandListContainer.BackgroundTransparency = 1
commandListContainer.Parent = commandsFrame
-- Command list layout
local commandListLayout = Instance.new("UIListLayout")
commandListLayout.Padding = UDim.new(0, 5)
commandListLayout.SortOrder = Enum.SortOrder.Name
commandListLayout.Parent = commandListContainer
-- Add command buttons
local commandCount = 0
local displayedCommands = {}
local function updateCommandList(filter)
-- Clear existing buttons
for _, button in pairs(displayedCommands) do
button:Destroy()
end
displayedCommands = {}
-- Add command buttons based on filter
local sortedCommands = {}
for cmdName, _ in pairs(COMMANDS) do
if not filter or cmdName:lower():find(filter:lower(), 1, true) then
table.insert(sortedCommands, cmdName)
end
end
table.sort(sortedCommands)
for i, cmdName in ipairs(sortedCommands) do
local commandButton = Instance.new("TextButton")
commandButton.Name = cmdName .. "Button"
commandButton.Size = UDim2.new(1, 0, 0, 30)
commandButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
commandButton.BorderSizePixel = 0
commandButton.Text = cmdName
commandButton.TextColor3 = Color3.fromRGB(255, 255, 255)
commandButton.TextSize = 14
commandButton.Font = Enum.Font.SourceSans
commandButton.Parent = commandListContainer
-- Add to displayed commands
displayedCommands[cmdName] = commandButton
-- Button click handler
commandButton.MouseButton1Click:Connect(function()
-- Execute the command on click
processChatCommand(Settings.Prefix .. cmdName, LocalPlayer)
end)
commandCount = commandCount + 1
end
end
-- Initial population
updateCommandList()
-- Search functionality
searchBar.Changed:Connect(function(prop)
if prop == "Text" then
local filter = searchBar.Text
if filter == "Search commands..." then filter = "" end
updateCommandList(filter)
end
end)
-- Populate Players tab
local playersFrame = tabFrames["Players"]
-- Search bar for players
local playerSearchBar = Instance.new("TextBox")
playerSearchBar.Name = "PlayerSearchBar"
playerSearchBar.Size = UDim2.new(1, -20, 0, 30)
playerSearchBar.Position = UDim2.new(0, 10, 0, 10)
playerSearchBar.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
playerSearchBar.BorderSizePixel = 0
playerSearchBar.Text = "Search players..."
playerSearchBar.TextColor3 = Color3.fromRGB(200, 200, 200)
playerSearchBar.TextSize = 14
playerSearchBar.Font = Enum.Font.SourceSans
playerSearchBar.ClearTextOnFocus = true
playerSearchBar.Parent = playersFrame
-- Player buttons container
local playerListContainer = Instance.new("Frame")
playerListContainer.Name = "PlayerListContainer"
playerListContainer.Size = UDim2.new(1, -20, 1, -50)
playerListContainer.Position = UDim2.new(0, 10, 0, 50)
playerListContainer.BackgroundTransparency = 1
playerListContainer.Parent = playersFrame
-- Player list layout
local playerListLayout = Instance.new("UIListLayout")
playerListLayout.Padding = UDim.new(0, 5)
playerListLayout.SortOrder = Enum.SortOrder.Name
playerListLayout.Parent = playerListContainer
-- Player context menu
local contextMenu = Instance.new("Frame")
contextMenu.Name = "ContextMenu"
contextMenu.Size = UDim2.new(0, 150, 0, 200)
contextMenu.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
contextMenu.BorderSizePixel = 0
contextMenu.Visible = false
contextMenu.ZIndex = 10
contextMenu.Parent = gui
-- Context menu layout
local contextMenuLayout = Instance.new("UIListLayout")
contextMenuLayout.Padding = UDim.new(0, 2)
contextMenuLayout.SortOrder = Enum.SortOrder.Name
contextMenuLayout.Parent = contextMenu
-- Context menu options
local contextOptions = {
{name = "Kill", cmd = "kill"},
{name = "LoopKill", cmd = "loopkill"},
{name = "UnLoopKill", cmd = "unloopkill"},
{name = "Teleport To", cmd = "tp"},
{name = "Bring", cmd = "bring"},
{name = "Give Guns", cmd = "guns"},
{name = "Arrest", cmd = "arrest"},
{name = "Free", cmd = "free"},
{name = "Tase", cmd = "tase"},
{name = "Fling", cmd = "fling"},
{name = "Ban", cmd = "ban"},
{name = "Kick", cmd = "kick"},
{name = "Admin", cmd = "admin"}
}
-- Add context menu buttons
for _, option in ipairs(contextOptions) do
local optionButton = Instance.new("TextButton")
optionButton.Name = option.name .. "Option"
optionButton.Size = UDim2.new(1, 0, 0, 25)
optionButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
optionButton.BorderSizePixel = 0
optionButton.Text = option.name
optionButton.TextColor3 = Color3.fromRGB(255, 255, 255)
optionButton.TextSize = 14
optionButton.Font = Enum.Font.SourceSans
optionButton.ZIndex = 11
optionButton.Parent = contextMenu
-- Adjust context menu size
contextMenu.Size = UDim2.new(0, 150, 0, #contextOptions * 27)
end
-- Add player buttons
local displayedPlayers = {}
local selectedPlayer = nil
local function updatePlayerList(filter)
-- Clear existing buttons
for _, button in pairs(displayedPlayers) do
button:Destroy()
end
displayedPlayers = {}
-- Add player buttons based on filter
for _, player in ipairs(Players:GetPlayers()) do
if not filter or player.Name:lower():find(filter:lower(), 1, true) then
local playerFrame = Instance.new("Frame")
playerFrame.Name = player.Name .. "Frame"
playerFrame.Size = UDim2.new(1, 0, 0, 40)
playerFrame.BackgroundColor3 = player.TeamColor.Color
playerFrame.BorderSizePixel = 0
playerFrame.Parent = playerListContainer
-- Player name
local playerName = Instance.new("TextLabel")
playerName.Name = "PlayerName"
playerName.Size = UDim2.new(1, -80, 1, 0)
playerName.Position = UDim2.new(0, 40, 0, 0)
playerName.BackgroundTransparency = 1
playerName.Text = player.Name
playerName.TextColor3 = Color3.fromRGB(255, 255, 255)
playerName.TextSize = 14
playerName.Font = Enum.Font.SourceSans
playerName.TextXAlignment = Enum.TextXAlignment.Left
playerName.Parent = playerFrame
-- Player icon (square for now, can be replaced with actual player
icon)
local playerIcon = Instance.new("Frame")
playerIcon.Name = "PlayerIcon"
playerIcon.Size = UDim2.new(0, 30, 0, 30)
playerIcon.Position = UDim2.new(0, 5, 0, 5)
playerIcon.BackgroundColor3 = Color3.fromRGB(200, 200, 200)
playerIcon.BorderSizePixel = 0
playerIcon.Parent = playerFrame
-- Status indicators (admin, whitelisted, blacklisted)
if Settings.RankedPlayers[player.Name] then
local adminIndicator = Instance.new("Frame")
adminIndicator.Name = "AdminIndicator"
adminIndicator.Size = UDim2.new(0, 10, 0, 10)
adminIndicator.Position = UDim2.new(1, -15, 0, 5)
adminIndicator.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
adminIndicator.BorderSizePixel = 0
adminIndicator.Parent = playerFrame
end
if Settings.WhitelistedPlayers[player.Name] then
local whitelistIndicator = Instance.new("Frame")
whitelistIndicator.Name = "WhitelistIndicator"
whitelistIndicator.Size = UDim2.new(0, 10, 0, 10)
whitelistIndicator.Position = UDim2.new(1, -15, 0, 20)
whitelistIndicator.BackgroundColor3 = Color3.fromRGB(255, 255,
0)
whitelistIndicator.BorderSizePixel = 0
whitelistIndicator.Parent = playerFrame
end
if Settings.BlacklistedPlayers[player.Name] then
local blacklistIndicator = Instance.new("Frame")
blacklistIndicator.Name = "BlacklistIndicator"
blacklistIndicator.Size = UDim2.new(0, 10, 0, 10)
blacklistIndicator.Position = UDim2.new(1, -30, 0, 20)
blacklistIndicator.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
blacklistIndicator.BorderSizePixel = 0
blacklistIndicator.Parent = playerFrame
end
-- Player frame click handler
playerFrame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
-- Select the player
if selectedPlayer then
selectedPlayer.BackgroundTransparency = 0
end
selectedPlayer = playerFrame
playerFrame.BackgroundTransparency = 0.5
elseif input.UserInputType == Enum.UserInputType.MouseButton2
then
-- Show context menu
contextMenu.Position = UDim2.new(0, input.Position.X, 0,
input.Position.Y)
contextMenu.Visible = true
selectedPlayer = player
-- Set up context menu button handlers
for _, child in pairs(contextMenu:GetChildren()) do
if child:IsA("TextButton") then
for _, option in ipairs(contextOptions) do
if child.Text == option.name then
child.MouseButton1Click:Connect(function()
processChatCommand(Settings.Prefix ..
option.cmd .. " " .. player.Name, LocalPlayer)
contextMenu.Visible = false
end)
end
end
end
end
end
end)
-- Add to displayed players
displayedPlayers[player.Name] = playerFrame
end
end
end
-- Initial population
updatePlayerList()
-- Search functionality
playerSearchBar.Changed:Connect(function(prop)
if prop == "Text" then
local filter = playerSearchBar.Text
if filter == "Search players..." then filter = "" end
updatePlayerList(filter)
end
end)
-- Hide context menu when clicking elsewhere
gui.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 and
contextMenu.Visible then
contextMenu.Visible = false
end
end)
-- Update player list when players join/leave
Players.PlayerAdded:Connect(function(player)
wait(1) -- Wait for player to fully load
updatePlayerList(playerSearchBar.Text ~= "Search players..." and
playerSearchBar.Text or "")
end)
Players.PlayerRemoving:Connect(function(player)
updatePlayerList(playerSearchBar.Text ~= "Search players..." and
playerSearchBar.Text or "")
end)
-- Populate Settings tab
local settingsFrame = tabFrames["Settings"]
-- Settings container
local settingsContainer = Instance.new("Frame")
settingsContainer.Name = "SettingsContainer"
settingsContainer.Size = UDim2.new(1, -20, 1, -20)
settingsContainer.Position = UDim2.new(0, 10, 0, 10)
settingsContainer.BackgroundTransparency = 1
settingsContainer.Parent = settingsFrame
-- Settings layout
local settingsLayout = Instance.new("UIListLayout")
settingsLayout.Padding = UDim.new(0, 10)
settingsLayout.SortOrder = Enum.SortOrder.Name
settingsLayout.Parent = settingsContainer
-- Add toggle settings
local toggleSettings = {
{name = "Anti-Kick", value = "EnableAntiKick"},
{name = "Anti-Tase", value = "AntiTase"},
{name = "Anti-Arrest", value = "AntiArrest"},
{name = "Anti-Shoot", value = "AntiShoot"},
{name = "Anti-Punch", value = "AntiPunch"},
{name = "Anti-Fling", value = "AntiFling"},
{name = "Anti-Void", value = "AntiVoid"},
{name = "Anti-Death", value = "AntiDeath"},
{name = "Anti-Ragdoll", value = "AntiRagdoll"},
{name = "Kill Aura", value = "KillAura"},
{name = "Silent Aim", value = "SilentAim"},
{name = "Infinite Ammo", value = "InfAmmo"},
{name = "One-Shot Kills", value = "InfDamage"},
{name = "No Recoil", value = "NoRecoil"},
{name = "Rapid Fire", value = "RapidFire"},
{name = "Fullbright", value = "Fullbright"},
{name = "ESP", value = "PlayerESP"},
{name = "X-Ray", value = "Xray"},
{name = "Auto Guns", value = "AutoGuns"},
{name = "Join Notifications", value = "JoinNotify"},
{name = "Leave Notifications", value = "LeaveNotify"},
{name = "Kill Notifications", value = "KillNotify"},
{name = "Command Notifications", value = "CommandNotify"}
}
for _, setting in ipairs(toggleSettings) do
local settingFrame = Instance.new("Frame")
settingFrame.Name = setting.name .. "Frame"
settingFrame.Size = UDim2.new(1, 0, 0, 30)
settingFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
settingFrame.BorderSizePixel = 0
settingFrame.Parent = settingsContainer
-- Setting name
local settingName = Instance.new("TextLabel")
settingName.Name = "SettingName"
settingName.Size = UDim2.new(1, -60, 1, 0)
settingName.Position = UDim2.new(0, 10, 0, 0)
settingName.BackgroundTransparency = 1
settingName.Text = setting.name
settingName.TextColor3 = Color3.fromRGB(255, 255, 255)
settingName.TextSize = 14
settingName.Font = Enum.Font.SourceSans
settingName.TextXAlignment = Enum.TextXAlignment.Left
settingName.Parent = settingFrame
-- Toggle button
local toggleButton = Instance.new("TextButton")
toggleButton.Name = "ToggleButton"
toggleButton.Size = UDim2.new(0, 40, 0, 20)
toggleButton.Position = UDim2.new(1, -50, 0, 5)
toggleButton.BackgroundColor3 = Settings[setting.value] and
Color3.fromRGB(0, 200, 0) or Color3.fromRGB(200, 0, 0)
toggleButton.BorderSizePixel = 0
toggleButton.Text = Settings[setting.value] and "ON" or "OFF"
toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
toggleButton.TextSize = 12
toggleButton.Font = Enum.Font.SourceSansBold
toggleButton.Parent = settingFrame
-- Toggle button click handler
toggleButton.MouseButton1Click:Connect(function()
Settings[setting.value] = not Settings[setting.value]
toggleButton.BackgroundColor3 = Settings[setting.value] and
Color3.fromRGB(0, 200, 0) or Color3.fromRGB(200, 0, 0)
toggleButton.Text = Settings[setting.value] and "ON" or "OFF"
-- Execute appropriate command if needed
if setting.value == "KillAura" then
processChatCommand(Settings.Prefix .. "killaura", LocalPlayer)
elseif setting.value == "SilentAim" then
processChatCommand(Settings.Prefix .. "silentaim", LocalPlayer)
elseif setting.value == "InfAmmo" then
processChatCommand(Settings.Prefix .. "infammo", LocalPlayer)
elseif setting.value == "NoRecoil" then
processChatCommand(Settings.Prefix .. "norecoil", LocalPlayer)
elseif setting.value == "RapidFire" then
processChatCommand(Settings.Prefix .. "rapidfire", LocalPlayer)
elseif setting.value == "Fullbright" then
processChatCommand(Settings.Prefix .. "fullbright", LocalPlayer)
elseif setting.value == "PlayerESP" then
processChatCommand(Settings.Prefix .. "esp", LocalPlayer)
elseif setting.value == "Xray" then
processChatCommand(Settings.Prefix .. "xray", LocalPlayer)
elseif setting.value == "AutoGuns" then
processChatCommand(Settings.Prefix .. "autoguns", LocalPlayer)
elseif setting.value == "AntiTase" then
processChatCommand(Settings.Prefix .. "antitase", LocalPlayer)
elseif setting.value == "AntiArrest" then
processChatCommand(Settings.Prefix .. "antiarrest", LocalPlayer)
elseif setting.value == "AntiShoot" then
processChatCommand(Settings.Prefix .. "antishoot", LocalPlayer)
elseif setting.value == "AntiPunch" then
processChatCommand(Settings.Prefix .. "antipunch", LocalPlayer)
elseif setting.value == "AntiFling" then
processChatCommand(Settings.Prefix .. "antifling", LocalPlayer)
elseif setting.value == "AntiVoid" then
processChatCommand(Settings.Prefix .. "antivoid", LocalPlayer)
end
end)
end
-- Populate Info tab
local infoFrame = tabFrames["Info"]
-- Info container
local infoContainer = Instance.new("Frame")
infoContainer.Name = "InfoContainer"
infoContainer.Size = UDim2.new(1, -20, 1, -20)
infoContainer.Position = UDim2.new(0, 10, 0, 10)
infoContainer.BackgroundTransparency = 1
infoContainer.Parent = infoFrame
-- Info layout
local infoLayout = Instance.new("UIListLayout")
infoLayout.Padding = UDim.new(0, 10)
infoLayout.SortOrder = Enum.SortOrder.LayoutOrder
infoLayout.Parent = infoContainer
-- Version info
local versionInfo = Instance.new("TextLabel")
versionInfo.Name = "VersionInfo"
versionInfo.Size = UDim2.new(1, 0, 0, 30)
versionInfo.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
versionInfo.BorderSizePixel = 0
versionInfo.Text = "Prison Life Admin v" .. currentVersion
versionInfo.TextColor3 = Color3.fromRGB(255, 255, 255)
versionInfo.TextSize = 14
versionInfo.Font = Enum.Font.SourceSansBold
versionInfo.LayoutOrder = 1
versionInfo.Parent = infoContainer
-- Execution info
local executionInfo = Instance.new("TextLabel")
executionInfo.Name = "ExecutionInfo"
executionInfo.Size = UDim2.new(1, 0, 0, 30)
executionInfo.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
executionInfo.BorderSizePixel = 0
executionInfo.Text = "Executed on: " .. ExecutionDate
executionInfo.TextColor3 = Color3.fromRGB(255, 255, 255)
executionInfo.TextSize = 14
executionInfo.Font = Enum.Font.SourceSans
executionInfo.LayoutOrder = 2
executionInfo.Parent = infoContainer
-- Command count
local commandCountLabel = Instance.new("TextLabel")
commandCountLabel.Name = "CommandCountLabel"
commandCountLabel.Size = UDim2.new(1, 0, 0, 30)
commandCountLabel.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
commandCountLabel.BorderSizePixel = 0
commandCountLabel.Text = "Total Commands: " .. commandCount
commandCountLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
commandCountLabel.TextSize = 14
commandCountLabel.Font = Enum.Font.SourceSans
commandCountLabel.LayoutOrder = 3
commandCountLabel.Parent = infoContainer
-- Stats section
local statsTitle = Instance.new("TextLabel")
statsTitle.Name = "StatsTitle"
statsTitle.Size = UDim2.new(1, 0, 0, 30)
statsTitle.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
statsTitle.BorderSizePixel = 0
statsTitle.Text = "Statistics"
statsTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
statsTitle.TextSize = 16
statsTitle.Font = Enum.Font.SourceSansBold
statsTitle.LayoutOrder = 4
statsTitle.Parent = infoContainer
-- Create stats labels
local function createStatLabel(name, text, order)
local statLabel = Instance.new("TextLabel")
statLabel.Name = name .. "Label"
statLabel.Size = UDim2.new(1, 0, 0, 25)
statLabel.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
statLabel.BorderSizePixel = 0
statLabel.Text = text
statLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
statLabel.TextSize = 14
statLabel.Font = Enum.Font.SourceSans
statLabel.LayoutOrder = order
statLabel.Parent = infoContainer
return statLabel
end
local executionCountLabel = createStatLabel("ExecutionCount", "Commands
Executed: " .. Settings._internal.executionCount, 5)
local killCountLabel = createStatLabel("KillCount", "Total Kills: " ..
Settings._internal.killCount, 6)
local teleportCountLabel = createStatLabel("TeleportCount", "Total Teleports: "
.. Settings._internal.teleportCount, 7)
local uptimeLabel = createStatLabel("Uptime", "Uptime: 0m", 8)
-- Credits section
local creditsTitle = Instance.new("TextLabel")
creditsTitle.Name = "CreditsTitle"
creditsTitle.Size = UDim2.new(1, 0, 0, 30)
creditsTitle.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
creditsTitle.BorderSizePixel = 0
creditsTitle.Text = "Credits"
creditsTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
creditsTitle.TextSize = 16
creditsTitle.Font = Enum.Font.SourceSansBold
creditsTitle.LayoutOrder = 9
creditsTitle.Parent = infoContainer
local creditsLabel = Instance.new("TextLabel")
creditsLabel.Name = "CreditsLabel"
creditsLabel.Size = UDim2.new(1, 0, 0, 60)
creditsLabel.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
creditsLabel.BorderSizePixel = 0
creditsLabel.Text = "Original script by HarvCRW (C0REIss)\nExpanded and
modified for client-side execution\nIntegrated with PrizzLife mechanics"
creditsLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
creditsLabel.TextSize = 14
creditsLabel.Font = Enum.Font.SourceSans
creditsLabel.TextWrapped = true
creditsLabel.LayoutOrder = 10
creditsLabel.Parent = infoContainer
-- Update stats periodically
coroutine.wrap(function()
while wait(1) do
local uptime = os.time() - StartupTime
local minutesUptime = math.floor(uptime / 60)
local hoursUptime = math.floor(minutesUptime / 60)
if hoursUptime > 0 then
uptimeLabel.Text = "Uptime: " .. hoursUptime .. "h " ..
(minutesUptime % 60) .. "m"
else
uptimeLabel.Text = "Uptime: " .. minutesUptime .. "m"
end
executionCountLabel.Text = "Commands Executed: " ..
Settings._internal.executionCount
killCountLabel.Text = "Total Kills: " .. Settings._internal.killCount
teleportCountLabel.Text = "Total Teleports: " ..
Settings._internal.teleportCount
end
end)()
-- Set up GUI toggle on a key press
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if not gameProcessed and input.KeyCode == Enum.KeyCode.RightControl then
mainFrame.Visible = not mainFrame.Visible
end
end)
-- Make GUI semi-transparent when mouse is not over it
mainFrame.MouseEnter:Connect(function()
mainFrame.BackgroundTransparency = 0
titleBar.BackgroundTransparency = 0
tabContainer.BackgroundTransparency = 0
end)
mainFrame.MouseLeave:Connect(function()
mainFrame.BackgroundTransparency = 0.3
titleBar.BackgroundTransparency = 0.3
tabContainer.BackgroundTransparency = 0.3
end)
-- Set initial transparency
mainFrame.BackgroundTransparency = 0.3
titleBar.BackgroundTransparency = 0.3
tabContainer.BackgroundTransparency = 0.3
-- Store GUI for future reference
getgenv().CommandGui = gui
-- Parent GUI to appropriate location
if syn and syn.protect_gui then
syn.protect_gui(gui)
gui.Parent = game:GetService("CoreGui")
elseif gethui then
gui.Parent = gethui()
else
gui.Parent = game:GetService("CoreGui")
end
-- Show notification
Notif("GUI Loaded", "Press Right Control to toggle the GUI", 5)
return gui
end
-- =======================================
-- INITIALIZATION & STARTUP
-- =======================================
-- Set up safe mode for command execution
if Settings.SafeMode then
-- Set up error handling
local oldError = error
error = function(message, level)
-- Log the error
table.insert(Settings._internal.errorLog, {
message = tostring(message),
level = level,
time = os.time()
})
-- Keep error log at reasonable size
if #Settings._internal.errorLog > 50 then
table.remove(Settings._internal.errorLog, 1)
end
-- Show error notification
Notif("Error", tostring(message), 5)
-- Call original error function
return oldError(message, level)
end
end
-- Create commands for all direct teleport locations
for location, _ in pairs(TeleportLocations) do
if not COMMANDS[location] then
COMMANDS[location] = function(args, speaker)
return COMMANDS.teleport({location}, speaker)
end
end
end
-- Create commands for all items
for item, _ in pairs(ItemLocations) do
if not COMMANDS[item] and not COMMANDS[item:lower()] then
COMMANDS[item:lower()] = function(args, speaker)
return COMMANDS.gun({item:lower(), args[1]}, speaker)
end
end
end
-- Run startup
local function startup()
-- Set up anti-kick
if Settings.EnableAntiKick then
setupAntiKick()
end
-- Set up server access
setupServerAccess()
-- Set up weapon mods
if Settings.InfAmmo then
setupInfiniteAmmo()
end
-- Set up silent aim
if Settings.SilentAim then
setupSilentAim()
end
-- Execute auto commands
for _, cmd in ipairs(Settings.AutoExec) do
processChatCommand(Settings.Prefix .. cmd, LocalPlayer)
wait(0.1) -- Small delay between commands
end
-- Create command GUI
createCommandGui()
-- Show startup notification
Notif("Script Loaded", "Prison Life Admin v" .. currentVersion .. " loaded", 5)
if Settings.VerboseMode then
print("----------")
print("Prison Life Admin v" .. currentVersion .. " loaded")
print("Execution time: " .. tostring(tick() - Execution_Runtime) .. "
seconds")
print("Total commands: " .. tostring(#COMMANDS))
print("----------")
end
end
-- Run startup procedures
startup()
-- Return API for external use
API = {
Commands = COMMANDS,
Settings = Settings,
ProcessCommand = processChatCommand,
GetPlayers = function(arg, speaker) return findPlayer(arg, speaker) end,
GetTeleportLocation = function(name) return TeleportLocations[name:lower()]
end,
GetItemLocation = function(name) return ItemLocations[name:lower()] end,
Teleport = teleportPlayer,
Kill = function(player) return performPlayerAction(player, "kill") end,
PerformAction = performPlayerAction,
SetTeam = setTeam,
GiveItem = giveItem,
SendNotification = Notif,
OpenGui = function() if getgenv().CommandGui then
getgenv().CommandGui.MainFrame.Visible = true end end,
CloseGui = function() if getgenv().CommandGui then
getgenv().CommandGui.MainFrame.Visible = false end end,
ToggleGui = function() if getgenv().CommandGui then
getgenv().CommandGui.MainFrame.Visible = not getgenv().CommandGui.MainFrame.Visible
end end
}
return API