Undiscovered server-breaking

Script Credit :- duck#1337
Features

Undiscovered server-breaking

Script
--BROUGHT TO YOU BY RobloxScripter.com!--

--[[ Command List: notool [plr] breakworkspace disableinput [plr] enableinput [plr] door rejoin loopkill [plr] unloopkill [plr] corruptcop [plr] uncorruptcop [plr] oneshot [plr] unoneshot [plr] stungun [plr] unstungun [plr] innocent [plr] uninnocent [plr] guardban [plr] unguardban [plr] gunban [plr] ungunban [plr] noshield [plr] noarm [plr] claim [plr] stun [plr] input [plr] lock disable [script] enable [script] disablegun [plr] cars noleg [plr] nolimb [plr] kill [plr] noseats [plr] unseat [plr] unhat [plr] --]] -- Credits: -- Sawd: -- showed Dis that you can change the value of isOn -- Dis: -- showed me how you can change the value of the isOn in the -- which lead me to figure out the rest of the table structure -- Splash: -- figured out that if you use all 4 parts then rejoin you can lock a instance -- into a state where it's enabled and disabled making it unable to disable -- Zyrex: -- your MOM -- Chonker: -- Made most of the script -- 4eyes: -- Network library loadstring(game:HttpGet("https://raw.githubusercontent.com/your4eyes/RobloxScripts/main/Net_Library.lua"))(); Network.Output.Enabled = false; local Chat = loadstring(game:HttpGet("https://pastebin.com/raw/7hMz15av"))() local Camera = workspace.CurrentCamera; local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local sirenToggleScript = workspace.Remote.toggleSiren.sirenToggleScript local LocalPlayer = Players.LocalPlayer local AntiCheat = { Tool = { MaxDistance = 20, -- Add a little extra because ping Players = {}, Enabled = true }, Bullet = { MaxAmount = 6, MaxDistance = 1000, Debounce = 0.02, Enabled = true }, God = { Enabled = false }, CharacterConnections = {}, RemovingConnections = {}, Flags = {}, Whitelist = {LocalPlayer.UserId} } local Admin = { Ranks = {}, Admins = {}, Commands = {}, AddCommand = function(self, data) if type(data.Command) == "table" then for _, Command in next, data.Command do self.Commands[Command] = data end else self.Commands[data.Command] = data end end, SetRank = function(self, plr, rank) if not self.Admins[plr] then self.Admins[plr] = { Prefix = ";", Rank = rank } if plr == LocalPlayer then LocalPlayer.Chatted:Connect(function(msg) pcall(function() local Command = msg:match(self.Admins[plr].Prefix .. "([%w]+)%s?") local Args = msg:sub(#self.Admins[plr].Prefix + #Command, #msg):split(" ") table.remove(Args, 1) table.insert(Args, 1, plr) if self.Commands[Command] then self.Commands[Command].Callback(unpack(Args)) end end) end) end return end self.Admins[plr].Rank = rank end } Admin.GetPlayer = function(plr, msg) msg = msg:gsub(",", "."):gsub(";", "."); local ret = {}; if msg:match("(%.)") then for index, msg in next, msg:split("%.") do if msg == "me" then table.insert(ret, plr) end if msg == "others" then for i,v in next, Players:GetPlayers() do if v ~= plr then table.insert(ret, v) end end end if msg == "all" then for i,v in next, Players:GetPlayers() do table.insert(ret, v) end end if msg == "inmates" or msg == "prisoners" then for i,v in next, game.Teams.Inmates do table.insert(ret, v) end end if msg == "cops" or msg == "guards" then for i,v in next, game.Teams.Guards do table.insert(ret, v) end end if msg == "crims" or msg == "criminals" then for i,v in next, game.Teams.Criminals do table.insert(ret, v) end end for i,v in next, Players:GetPlayers() do if v.Name:sub(1, #msg):lower() == msg:lower() or v.DisplayName:sub(1, #msg):lower() == msg:lower() then table.insert(ret, v); end end end return ret end if msg == "me" then table.insert(ret, plr) end if msg == "others" then for i,v in next, Players:GetPlayers() do if v ~= plr then table.insert(ret, v) end end end if msg == "all" then for i,v in next, Players:GetPlayers() do table.insert(ret, v) end end if msg == "inmates" or msg == "prisoners" then for i,v in next, game.Teams.Inmates:GetPlayers() do table.insert(ret, v) end end if msg == "cops" or msg == "guards" then for i,v in next, game.Teams.Guards:GetPlayers() do table.insert(ret, v) end end if msg == "crims" or msg == "criminals" then for i,v in next, game.Teams.Criminals:GetPlayers() do table.insert(ret, v) end end for i,v in next, Players:GetPlayers() do if v.Name:sub(1, #msg):lower() == msg:lower() or v.DisplayName:sub(1, #msg):lower() == msg:lower() then table.insert(ret, v) end end return ret end local GunSystem = { Add = function(self, type, func) table.insert(self.Gun, { Callback = func, Type = type, Players = {} }) end, AddPlayer = function(self, type, plr) for i, v in next, self.Gun do if v.Type == type then table.insert(v.Players, plr) end end end, RemovePlayer = function(self, tye, plr) for i, v in next, self.Gun do if v.Type == type then for i, _v in next, v.Players do if _v == plr then table.remove(v.Players, i) end end end end end, Gun = {} } -- Set owner rank Admin:SetRank(LocalPlayer, math.huge) local LoopKills = {} local ClientScripts = {} local Innocent = {} local CorruptCop = {} local GunBanConnection = {} local GuardBan = {} local Beans = {} local sound = workspace.Prison_guardspawn.spawn.Sound; task.spawn(function() while task.wait() do sound.Volume = 0 end end) function GetSound() local sound = workspace.Prison_guardspawn.spawn.Sound; -- doesnt work :( --[[for i,v in pairs(Players:GetPlayers()) do if v.Character then local Root = v.Character:FindFirstChild("HumanoidRootPart"); if Root and Root:FindFirstChild("Climbing") then sound = Root:FindFirstChild("Climbing"); end end end ]] return sound; end function BreakJoints(Model) for i,v in next, Model:GetDescendants() do if v:IsA("JointInstance") then task.spawn(Disable, v) end end end function Kill(plr) pcall(function() Disable(plr.Character.Torso.Neck) end) end function ToggleBoolValue(instance, val) --[[task.spawn(function() local oldValue = instance.Value repeat workspace.Remote.toggleSiren:FireServer({ isOn = instance }) task.wait(0.025) until instance.Value == val task.wait(0.5) if instance.Value ~= val then ToggleBoolValue(instance, val) end end)]] task.spawn(function() repeat workspace.Remote.toggleSiren:FireServer({ isOn = instance }) task.wait() until instance.Value == val end) end function Loop(instance) workspace.Remote.toggleSiren:FireServer({ Part4 = { Part_Weld = true, l = instance }, Part3 = { Part_Weld = true, l = instance }, Part2 = { Part_Weld = true, l = instance }, Part1 = { Part_Weld = true, l = instance }, isOn = LocalPlayer.Status.isArrested, Speaker = { Part_Weld = true, Sound = sound } }) end function Disable(instance, customStopTime) local stop = false; if type(customStopTime) == "boolean" then customStopTime = nil end task.delay(customStopTime or 0.5, function() stop = true; end) while task.wait() do if stop then break end if not instance then break end if not instance.Parent then break end if not instance.Enabled then break end workspace.Remote.toggleSiren:FireServer({ Part1 = { Part_Weld = true, l = instance }, isOn = LocalPlayer.Status.isArrested, Speaker = { Part_Weld = true, Sound = GetSound() } }) end end function Enable(instance) local Connection; Connection = sirenToggleScript:GetPropertyChangedSignal("Enabled"):Connect(function() local enabled = sirenToggleScript.Enabled if enabled then if instance.Enabled then Connection:Disconnect() return end Loop(instance) end end) end -- Credits to splash -- couldn't have figured this out without him function Lock(instance) workspace.Remote.toggleSiren:FireServer({ Part4 = { Part_Weld = true, l = instance }, Part3 = { Part_Weld = true, l = instance }, Part2 = { Part_Weld = true, l = instance }, Part1 = { Part_Weld = true, l = instance }, isOn = LocalPlayer.Status.isArrested, Speaker = { Part_Weld = true, Sound = GetSound() } }) --[[syn.queue_on_teleport( getgenv().LOCKED = true )]] game:GetService('TeleportService'):TeleportToPlaceInstance(game.PlaceId, game.JobId, LocalPlayer) end function Crim(Target) coroutine.resume(Network["PartOwnership"]["Enable"]); local Spawn = workspace:FindFirstChild("Criminals Spawn").SpawnLocation; if Target.Character and LocalPlayer.Character then local TargetRoot = Target.Character:FindFirstChild("HumanoidRootPart"); local Root = LocalPlayer.Character:FindFirstChild("HumanoidRootPart"); local TargetHumanoid = Target.Character:FindFirstChild("Humanoid") if TargetRoot then local RootJoint = TargetRoot:FindFirstChild("RootJoint"); local CurrentCFrame = TargetRoot.CFrame; if RootJoint then Network.RetainPart(TargetRoot) Disable(RootJoint); local Stop; task.delay(2, function() Stop = true end) pcall(function() task.spawn(Disable, TargetHumanoid.SeatPart.SeatWeld); end) while task.wait() do pcall(function() TargetRoot = Target.Character:FindFirstChild("HumanoidRootPart"); RootJoint = TargetRoot:FindFirstChild("RootJoint"); Root = LocalPlayer.Character:FindFirstChild("HumanoidRootPart"); Root.CFrame = TargetRoot.CFrame; TargetRoot.CFrame = CurrentCFrame; Disable(RootJoint, 0.2); firetouchinterest(TargetRoot, Spawn, 0); end) if Stop then break end if not Target then break end if tostring(Target.Team) == "Criminals" then break end end end if TargetRoot then Network.RemovePart(TargetRoot) end end end coroutine.resume(Network["PartOwnership"]["Disable"]); end -- Check if the server has been locked local SirenDisabled; local ServerLocked; task.delay(1, function() if SirenDisabled then SirenDisabled:Disconnect(); end end) SirenDisabled = sirenToggleScript:GetPropertyChangedSignal("Disabled"):Connect(function() if not sirenToggleScript.Disabled then return end ServerLocked = true; SirenDisabled:Disconnect(); end) task.wait(1); if not ServerLocked then print("Locking the server...") Lock(sirenToggleScript); else print("Server is locked, the script will execute."); end --[[local enabled, disabled local stop task.delay(2, function() stop = true end) local sirenToggleScript = workspace.Remote.toggleSiren.sirenToggleScript repeat if stop then break end enabled = enabled or sirenToggleScript.Enabled disabled = disabled or not sirenToggleScript.Enabled task.wait() until enabled and disabled if not enabled and not disabled then Lock(workspace.Remote.toggleSiren.sirenToggleScript) elseif disabled and not enabled then -- Crash server end ]] function GunBan(v, dontPersistOnDeath) if v.Character then for i, tool in next, v.Character:GetChildren() do if tool:IsA("Tool") then pcall(function() local t = tick() repeat task.wait() until tool:FindFirstChildOfClass("Script") or tick() - t > 1 if tool:FindFirstChildOfClass("Script").Enabled == false then return end Disable(tool:FindFirstChildOfClass("Script")) Disable(tool:FindFirstChildOfClass("LocalScript")) end) end end end if v:FindFirstChild("Backpack") then for i, tool in next, v.Backpack:GetChildren() do pcall(function() local t = tick() repeat task.wait() until tool:FindFirstChildOfClass("Script") or tick() - t > 1 if tool:FindFirstChildOfClass("Script").Enabled == false then return end Disable(tool:FindFirstChildOfClass("Script")) Disable(tool:FindFirstChildOfClass("LocalScript")) end) end end if GunBanConnection[v] then return end if not dontPersistOnDeath then GunBanConnection[v] = { Disconnect = function(self) self.Character:Disconnect() self.Backpack:Disconnect() end, Character = v.CharacterAdded:Connect(function(character) if GunBanConnection[v] then GunBanConnection[v].Backpack:Disconnect() end for i, tool in next, v.Backpack:GetChildren() do pcall(function() local t = tick() repeat task.wait() until tool:FindFirstChildOfClass("Script") or tick() - t > 1 if tool:FindFirstChildOfClass("Script").Enabled == false then return end Disable(tool:FindFirstChildOfClass("Script")) Disable(tool:FindFirstChildOfClass("LocalScript")) end) end GunBanConnection[v].Backpack = v.Backpack.ChildAdded:Connect(function(tool) pcall(function() local t = tick() repeat task.wait() until tool:FindFirstChildOfClass("Script") or tick() - t > 1 if tool:FindFirstChildOfClass("Script").Enabled == false then return end Disable(tool:FindFirstChildOfClass("Script")) Disable(tool:FindFirstChildOfClass("LocalScript")) end) end) end), Backpack = v.Backpack.ChildAdded:Connect(function(tool) pcall(function() local t = tick() repeat task.wait() until tool:FindFirstChildOfClass("Script") or tick() - t > 1 if tool:FindFirstChildOfClass("Script").Enabled == false then return end Disable(tool:FindFirstChildOfClass("Script")) Disable(tool:FindFirstChildOfClass("LocalScript")) end) end) } else v.Backpack.ChildAdded:Connect(function(tool) pcall(function() local t = tick() repeat task.wait() until tool:FindFirstChildOfClass("Script") or tick() - t > 1 if tool:FindFirstChildOfClass("Script").Enabled == false then return end Disable(tool:FindFirstChildOfClass("Script")) Disable(tool:FindFirstChildOfClass("LocalScript")) end) end) end end local OldTeam; local SavedPosition = CFrame.new(); local SavedCameraPosition = CFrame.new(); function SavePos(POS) pcall(function() POS = POS or LocalPlayer.Character.Head.CFrame; end); if POS and LocalPlayer.Character then SavedPosition = POS; SavedCameraPosition = Camera.CFrame; end; end; function LoadPos() if SavedPosition and LocalPlayer.Character then if LocalPlayer.Character.PrimaryPart then LocalPlayer.Character:SetPrimaryPartCFrame(SavedPosition); RunService.RenderStepped:Wait(); Camera.CFrame = SavedCameraPosition; end end end function Loadchar(COLOR) workspace.Remote.loadchar:InvokeServer(LocalPlayer.Name, COLOR); end local ItemWhitelist = {} function MainCharacterAdded(CHAR) local function OnDied() SavePos(); OldTeam = LocalPlayer.TeamColor.Name Loadchar(OldTeam); LoadPos(); end local Humanoid = CHAR:WaitForChild("Humanoid", 1); if Humanoid then Humanoid.Died:Connect(OnDied); end -- CHAR.ChildAdded:Connect(function(tool) -- if tool:IsA("Tool") and not table.find(ItemWhitelist, tool) then -- tool:Dest -- end end function WhitelistItem(Item) if not table.find(ItemWhitelist, Item) then table.insert(ItemWhitelist, Item); end end function ArrestEvent(PLR, TIMES) for i = 1, TIMES do task.spawn(function() pcall(function() workspace.Remote.arrest:InvokeServer(PLR.Character:FindFirstChildWhichIsA("Part")); end) end); task.wait(0.03) end; end Admin:AddCommand({ Command = "ruin", Callback = function(plr) -- Disable(game.StarterPlayer.StarterPlayerScripts) end }) Admin:AddCommand({ Command = {"unequip", "notool"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do local tool = v.Character:FindFirstChildOfClass("Tool") if tool then pcall(function() Disable(v.Character["Right Arm"]:WaitForChild("RightGrip")) end) end end end }) Admin:AddCommand({ Command = "breakworkspace", Callback = function(plr, ...) BreakJoints(workspace) end }) Admin:AddCommand({ Command = {"di", "disableinput"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do pcall(Disable, v.Character:WaitForChild("ClientInputHandler")) ClientScripts[v] = v.CharacterAdded:Connect(function() local Character = v.Character pcall(Disable, Character:WaitForChild("ClientInputHandler")) end) end end }) Admin:AddCommand({ Command = {"ei", "enableinput"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do if ClientScripts[v] then ClientScripts[v]:Disconnect() end end end }) Admin:AddCommand({ Command = "door", Callback = function(plr) for i,v in next, workspace.Doors:GetChildren() do ToggleBoolValue(v.isActive, true) end end }) Admin:AddCommand({ Command = {"rj", "rejoin"}, Callback = function(plr) game:GetService('TeleportService'):TeleportToPlaceInstance(game.PlaceId, game.JobId, LocalPlayer) end }) Admin:AddCommand({ Command = {"lk", "loopkill"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do if not table.find(LoopKills, v) then table.insert(LoopKills, v) end end end }) Admin:AddCommand({ Command = {"unlk", "unloopkill"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do for i, _v in next, LoopKills do if v == _v then table.remove(LoopKills, i) end end end end }) Admin:AddCommand({ Command = {"cc", "corruptcop"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do ToggleBoolValue(v.Status.isBadGuard, false) GunSystem:AddPlayer("Corrupt", v) end end }) Admin:AddCommand({ Command = {"uncc", "uncorruptcop"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do GunSystem:RemovePlayer("Corrupt", v) end end }) Admin:AddCommand({ Command = {"os", "oneshot"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do GunSystem:AddPlayer("Oneshot", v) end end }) Admin:AddCommand({ Command = {"unos", "unoneshot"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do GunSystem:RemovePlayer("Oneshot", v) end end }) Admin:AddCommand({ Command = {"sg", "stungun"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do GunSystem:AddPlayer("Stun", v) end end }) Admin:AddCommand({ Command = {"unsg", "unstungun"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do GunSystem:RemovePlayer("Stun", v) end end }) Admin:AddCommand({ Command = {"i", "innocent"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do GunSystem:AddPlayer("Innocent", v) end end }) Admin:AddCommand({ Command = {"ui", "uninnocent"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do GunSystem:RemovePlayer("Innocent", v) end end }) Admin:AddCommand({ Command = {"bc", "badcop", "guardban"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do table.insert(GuardBan, v) end for i, v in next, Admin.GetPlayer(plr, ...) do Crim(v); pcall(function() LocalPlayer.Character.HumanoidRootPart.CFrame = plr.Character.HumanoidRootPart.CFrame end) task.wait(0.1) ArrestEvent(v, 5); task.wait(0.1) Kill(v); end end }) Admin:AddCommand({ Command = {"unbc", "unbadcop", "unguardban"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do for i, _v in next, GuardBan do if v == _v then table.remove(GuardBan, i) end end end end }) Admin:AddCommand({ Command = {"gb", "gunban"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do GunBan(v); end end }) Admin:AddCommand({ Command = {"ungb", "ungunban"}, Callback = function(plr, ...) for i, v in next, Admin.GetPlayer(plr, ...) do if GunBanConnection[v] then GunBanConnection[v]:Disconnect() end end end }) -- Admin:AddCommand({ -- Command = "", -- Callback = function(plr, ...) -- end -- }) Admin:AddCommand({ Command = {"rshield", "noshield"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do pcall(function() Disable(v.Character.Torso.ShieldFolder.shield.Weld) end) end end }) Admin:AddCommand({ Command = {"rarm", "noarm"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do pcall(function() Disable(v.Character.Torso["Right Shoulder"]) end) pcall(function() Disable(v.Character.Torso["Left Shoulder"]) end) end end }) Admin:AddCommand({ Command = "claim", Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do pcall(function() Disable(v.Character.HumanoidRootPart.RootJoint) end) task.spawn(function() while task.wait() do v.Character:SetPrimaryPartCFrame(Players:GetPlayers()[math.random(1, #Players:GetPlayers())].Character.PrimaryPart.CFrame) end end) end end }) Admin:AddCommand({ Command = {"rroot", "noroot", "stun"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do pcall(function() task.spawn(Disable, v.Character.HumanoidRootPart.RootJoint) end) end end }) Admin:AddCommand({ Command = "input", Callback = function(plr, victim) end }) Admin:AddCommand({ Command = "rj", Callback = function(plr, victim) game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, game.JobId, LocalPlayer); end }) local scripts = { arrest = workspace.Remote.arrest.arrestScript, button = workspace.Prison_ITEMS.buttons.Script, loadchar = workspace.Remote.loadchar.Script, cell = workspace.Remote.MoveDoors.Script, teamevent = workspace.Remote.TeamEvent.TeamChange, shield = workspace.Remote.equipShield.RiotShieldServer, clientinput = game.StarterPlayer.StarterCharacterScripts.ClientInputHandler, bubblechat = game.StarterPlayer.StarterPlayerScripts.BubbleChat, chat = game.StarterPlayer.StarterPlayerScripts.ChatScript, replicate = game.StarterPlayer.StarterPlayerScripts.ClientGunReplicator, item = game.StarterPlayer.StarterPlayerScripts.ClientItemHandler, message = game.StarterPlayer.StarterPlayerScripts.ClientMessageHandler, loader = game.StarterPlayer.StarterPlayerScripts.PlayerScriptsLoader, sounds = game.StarterPlayer.StarterPlayerScripts.RbxCharacterSounds, serverchat = game:GetService("Chat").ChatServiceRunner, boundary = workspace.BOUNDARY.Script, cam = ReplicatedStorage.gooeys.camGui.Frame.LocalScript } Admin:AddCommand({ Command = "lock", Rank = math.huge, Callback = function(plr, src) Lock(scripts[src:lower()]) end }) Admin:AddCommand({ Command = "disable", Rank = math.huge, Callback = function(plr, src) Disable(scripts[src:lower()]) end }) Admin:AddCommand({ Command = "enable", Rank = math.huge, Callback = function(plr, src) Enable(scripts[src:lower()]) end }) Admin:AddCommand({ Command = {"dgun", "disablegun"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do local tool = v.Character:FindFirstChildOfClass("Tool") if tool then Disable(tool.GunInterface) end for i,v in next, v.Backpack:GetChildren() do if v.GunInterface then Disable(v.GunInterface) end end end end }) Admin:AddCommand({ Command = "cars", Callback = function(plr) for i,v in next, workspace.CarContainer:GetChildren() do BreakJoints(v) end end }) Admin:AddCommand({ Command = {"rleg", "noleg"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do pcall(function() Disable(v.Character.Torso["Right Hip"]) end) pcall(function() Disable(v.Character.Torso["Left Hip"]) end) end end }) Admin:AddCommand({ Command = {"rarm", "noarm"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do pcall(function() Disable(v.Character.Torso["Right Shoulder"]) end) pcall(function() Disable(v.Character.Torso["Left Shoulder"]) end) end end }) Admin:AddCommand({ Command = {"rleg", "noleg"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do task.spawn(function() pcall(function() Disable(v.Character.Torso["Right Hip"]) end) pcall(function() Disable(v.Character.Torso["Left Hip"]) end) end) end end }) Admin:AddCommand({ Command = {"rlimb", "nolimb"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do task.spawn(function() pcall(function() Disable(v.Character.Torso["Right Shoulder"]) end) pcall(function() Disable(v.Character.Torso["Left Shoulder"]) end) pcall(function() Disable(v.Character.Torso["Right Hip"]) end) pcall(function() Disable(v.Character.Torso["Left Hip"]) end) end) end end }) Admin:AddCommand({ Command = "kill", Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do task.spawn(Kill, v) end end }) Admin:AddCommand({ Command = {"seats", "noseats"}, Callback = function(plr) for i,v in next, workspace:GetDescendants() do if v:IsA("Seat") then task.spawn(Disable, v) end end end }) Admin:AddCommand({ Command = {"unseat", "unsit"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do task.spawn(Disable, v.Character.Humanoid.SeatPart.SeatWeld) end end }) Admin:AddCommand({ Command = {"rhat", "unhat"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do for i,v in next, v.Character:GetChildren() do if v:IsA("Accessory") then for i,v in next, v:GetDescendants() do if v:IsA("Weld") then task.spawn(Disable, v) end end end end end end }) Admin:AddCommand({ Command = {"loopbean"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do if not table.find(Beans, v) then table.insert(Beans, v); end end end }) Admin:AddCommand({ Command = {"unloopbean"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do local idx = table.find(Beans, v); if idx then table.remove(Beans, idx); end end end }) Admin:AddCommand({ Command = {"wl", "whitelist"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do local idx = table.find(AntiCheat.Whitelist, v.UserId); if not idx then table.insert(AntiCheat.Whitelist, v.UserId); print(table.find(AntiCheat.Whitelist, v.UserId)) if GunBanConnection[v] then GunBanConnection[v]:Disconnect() end end end end }) Admin:AddCommand({ Command = {"bl", "blacklist"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do local idx = table.find(AntiCheat.Whitelist, v.UserId); if idx then table.remove(AntiCheat.Whitelist, i); end end end }) local breaksa; Admin:AddCommand({ Command = {"sa", "spamarrest"}, Callback = function(plr, ...) breaksa = true; breaksa = false; AntiCheat.Tool.Enabled = false; AntiCheat.Bullet.Enabled = false; task.spawn(Disable, scripts.loadchar, 1); task.spawn(Disable, scripts.teamevent, 1); task.wait(2) local p; for i,v in next, Admin.GetPlayer(plr, ...) do p = v break end task.spawn(function() while task.wait() do if breaksa then break end Crim(p); --[[if tostring(plr.Team) ~= "Criminals" then print("crimming") Crim(p); else pcall(function() local part2 = p.Character:FindFirstChild("HumanoidRootPart"); if part2 then LocalPlayer.Character.HumanoidRootPart.CFrame = part2.CFrame; else LocalPlayer.Character.HumanoidRootPart.CFrame = p.Character.PrimaryPart.CFrame; end end) end]] end end) task.spawn(function() while task.wait(0.03) do if breaksa then break end task.spawn(ArrestEvent, p, 10) end end) end }) Admin:AddCommand({ Command = {"nosa", "breaksa"}, Callback = function(plr, ...) breaksa = true AntiCheat.Tool.Enabled = true; AntiCheat.Bullet.Enabled = true; Enable(scripts.loadchar); Enable(scripts.teamevent); end }) Admin:AddCommand({ Command = {"crim", "criminal"}, Callback = function(plr, ...) for i,v in next, Admin.GetPlayer(plr, ...) do if v ~= LocalPlayer then Crim(v); end end end }) -- commands end print("processed cmds") --- Anticrash -- are we gonna use the onclientevent thing or just check whatever instances in the camera -- we could just check by the length of the table that's sent and if it's past the specific gun can like the shotgun can shoot 5 or 6 -- oh fair -- i forgot what it was called lol local GunRates = { ["M4A1"] = 0.05, ["Remington 870"] = 0.5, ["Taser"] = 1, ["M9"] = 0.05, ["AK-47"] = 0.05 } local Debounces = {}; function GetClosestPlayerToPosition(Position, MaxDistance) local Max, Closest = MaxDistance or math.huge; for i,v in pairs(Players:GetPlayers()) do if v.Character then local Tool = v.Character:FindFirstChildOfClass("Tool") or v.Backpack:FindFirstChildOfClass("Tool"); if Tool then local ShootPart = Tool:FindFirstChild("Muzzle"); local PrimaryPart = v.Character.PrimaryPart; if PrimaryPart and ShootPart then local Distance = (ShootPart.Position-Position).Magnitude; if Distance < Max then Max = Distance; Closest = v; end end end end end return Closest; end --[[ if AntiCheat.Flags[player] then local Type = AntiCheat.Flags[player].Type if Type == "Magnitude" then -- player teleported or used walkspeed local Magnitude = AntiCheat.Flags[player].Value end end ]] function checkCarDistance(pos) for i, car in next, workspace.CarContainer:GetChildren() do pcall(function() if ((pos - car.Body.Main.Position) * Vector3.new(1, 0, 1)).Magnitude 60 end return false end function checkCellSpawn(pos) local cellBlock = workspace.Prison_Cellblock for i, cell in next, cellBlock.Cells_A:GetChildren() do if (pos - cell.spawnbrick.Position).Magnitude < 18 then return true end end for i, cell in next, cellBlock.Cells_B:GetChildren() do if (pos - cell.spawnbrick.Position).Magnitude 70 and not humanoid.SeatPart and not (checkCarDistance(newPos) or checkFling(player) or checkCellSpawn(newPos)) then if not table.find(AntiCheat.Whitelist, player.UserId) then -- print(Displacement) -- print(checkCarDistance(newPos)) -- print(checkFling(player)) print(player.Name .. " flagged magnitude.") AntiCheat.Flags[player] = { Type = "Magnitude", Value = Displacement }; timeSinceLastFlag = tick(); end end task.wait(0.4) oldPos = newPos; end end) task.spawn(function() while task.wait() do if breakLoop then break end if tick() - timeSinceLastFlag > 5 then AntiCheat.Flags[player] = nil; end end end) end for i,v in pairs(Players:GetPlayers()) do if v.Character then task.spawn(AntiTP_CharacterAdded, v.Character); end AntiCheat.CharacterConnections[v] = v.CharacterAdded:Connect(AntiTP_CharacterAdded); end Players.PlayerAdded:Connect(function(p) AntiCheat.CharacterConnections[p] = p.CharacterAdded:Connect(AntiTP_CharacterAdded); end) local LastCrashCFrame; local CrashCount = 4; local LastCount = tick(); local LastIllegalCframe = 0; local LastIllegalDistance = 0; local LastTools = {}; function getPlayerFromPart(part) for i,v in next, Players:GetPlayers() do if v.Character and part:IsDescendantOf(v.Character) then return v end end end GunSystem:Add("Corrupt", function(From, Shot) if not Shot.Status.isHostile.Value then ToggleBoolValue(Shot.Status.isHostile, true) end end) GunSystem:Add("Innocent", function(From, Shot) if Shot.Status.isHostile.Value then ToggleBoolValue(Shot.Status.isHostile, false) end end) GunSystem:Add("Stun", function(From, Shot) if Shot.Character and Shot.Character:FindFirstChild("HumanoidRootPart") and Shot.Character.HumanoidRootPart:FindFirstChild("RootJoint") and Shot.Character.HumanoidRootPart.RootJoint.Enabled == true then Disable(Shot.Character.HumanoidRootPart.RootJoint) end end) GunSystem:Add("Oneshot", function(From, Shot) if Shot.Character and Shot.Character:FindFirstChild("Humanoid") and Shot.Character.Humanoid.Health > 0 then Disable(Shot.Character:WaitForChild("Torso").Neck) end end) -- anti crash ReplicatedStorage.ReplicateEvent.OnClientEvent:Connect(function(bulletData, isTaser) if AntiCheat.Bullet.Enabled and #bulletData > AntiCheat.Bullet.MaxAmount then if tick() - LastCount >= 5 then CrashCount = 0 LastCount = tick(); end print("Detected illegal bullet count") for i,v in pairs(bulletData) do local Hit, Distance, Cframe, RayObject = v.Hit, v.Distance, v.Cframe, v.RayObject; if Hit and Distance and Cframe then if Distance > AntiCheat.Bullet.MaxDistance then if tick() - LastIllegalDistance >= 3 then print("Detected an illegal distance") for _,p in pairs(Players:GetPlayers()) do if p ~= LocalPlayer then GunBan(p, true); end end LastIllegalDistance = tick(); end end if Cframe ~= CFrame.new() then local CalculatedCFrame = Cframe * CFrame.new(0, 0, -Distance / 2); local WhoShot = GetClosestPlayerToPosition(CalculatedCFrame.p, 30); --print(WhoShot) if WhoShot and WhoShot.Character and not table.find(AntiCheat.Whitelist, WhoShot.UserId) then local DB = Debounces[WhoShot] or 0; local Flag = tick() - DB; local Tool = WhoShot.Character:FindFirstChildOfClass("Tool"); local GunDebounce = GunRates[(Tool and Tool.Name) or "M4A1"]; if ((Tool and Tool.Name == LastTools[WhoShot]) or not Tool) and Flag = 4 then print("Attempting to cancel a potential crash.") for _,p in pairs(Players:GetPlayers()) do if p ~= LocalPlayer then GunBan(p, true); end end CrashCount = 0; LastCount = tick(); end else if tick() - LastIllegalCframe >= 3 then LastIllegalCframe = tick(); print("Detected an illegal cframe") for i,v in pairs(Players:GetPlayers()) do if v ~= LocalPlayer then GunBan(v, true); end end end end end -- i ahte that feature lol end-- oop didn't realize ctrl + z does it for your work as well that's gay lol end for i,v in next, bulletData do local Hit, Distance, Cframe, RayObject = v.Hit, v.Distance, v.Cframe, v.RayObject; local CalculatedCFrame = Cframe * CFrame.new(0, 0, -Distance / 2); local WhoShot = GetClosestPlayerToPosition(CalculatedCFrame.p, 30); if WhoShot and Hit then local DB = Debounces[WhoShot] or 0; local Flag = tick() - DB if Flag 1 local prt = v:FindFirstChildOfClass("Part") local pickup = v:FindFirstChild("ITEMPICKUP") if pickup and not prt then prt = pickup end if prt then ToolPositions[v.Name][v] = prt.CFrame end end workspace.Prison_ITEMS.single.ChildAdded:Connect(function(v) local t = tick() repeat task.wait() until v:FindFirstChildOfClass("Part") or tick() - t > 1 local prt = v:FindFirstChildOfClass("Part") if not prt then prt = v.ITEMPICKUP end ToolPositions[v.Name][v] = prt.CFrame end) workspace.Prison_ITEMS.single.ChildRemoved:Connect(function(v) if v.Name == "Crude Knife" or v.Name == "Hammer" then return end ToolPositions[v.Name][v] = nil end) function waitFor(parent, name, timeout) -- Made this because the waitforchild timeout is annoying if not timeout then timeout = 1 end local t = tick() repeat task.wait() until parent:FindFirstChild(name) or tick() - t > timeout return parent:FindFirstChild(name) end for i, player in next, Players:GetPlayers() do if not AntiCheat.Tool.Players[player] then AntiCheat.Tool.Players[player] = {} end pcall(function() for i, v in next, player.Backpack:GetChildren() do AntiCheat.Tool.Players[player][v.Name] = true end for i,v in next, player.Character:GetChildren() do if v:IsA("Tool") then AntiCheat.Tool.Players[player][v.Name] = true end end end) end function charConnection(Character) local player = Players:GetPlayerFromCharacter(Character) if table.find(AntiCheat.Whitelist, player.UserId) then return end if not AntiCheat.Tool.Players[player] then AntiCheat.Tool.Players[player] = {} end for i, v in next, AntiCheat.Tool.Players[player] do AntiCheat.Tool.Players[player][i] = nil end for i,v in next, player.Backpack:GetChildren() do AntiCheat.Tool.Players[player][v.Name] = true end for i,v in next, player.Character:GetChildren() do if v:IsA("Tool") then AntiCheat.Tool.Players[player][v.Name] = true end end if player.Team == game.Teams.Guards then AntiCheat.Tool.Players[player]["M9"] = true end if CheatConnections[player].Tool then CheatConnections[player].Tool:Disconnect() end CheatConnections[player].Tool = player.Backpack.ChildAdded:Connect(ToolConnection, player) end function ToolConnection(tool) local player = tool.Parent.Parent:IsA("Player") and tool.Parent.Parent or Players:GetPlayerFromCharacter(tool.Parent.Parent) if not AntiCheat.Tool.Enabled then return end if AntiCheat.Tool.Players[player] and AntiCheat.Tool.Players[player][tool.Name] then return end if tool.Name == "Taser" or tool.Name == "Breakfast" or tool.Name == "Lunch" or tool.Name == "Dinner" or tool.Name == "Handcuffs" then return end for i, position in next, ToolPositions[tool.Name] do if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then if (player.Character.HumanoidRootPart.CFrame.p - position.p).Magnitude = AntiWeld.WeldData[t.Name] then AntiWeld.Debounces[t] = AntiWeld.Debounces[t] or 0 if tick() - AntiWeld.Debounces[t] > 3 then AntiWeld.Debounces[t] = tick() print("Detected illegal weld count for " .. p.Name .. " in " .. t.Name .. " | " .. tostring(WeldCount)); if c and c:FindFirstChild("Torso") then if c.Torso:FindFirstChild("Right Shoulder") then Disable(c.Torso["Right Shoulder"]); end end if c and c:FindFirstChild("Right Arm") then if c["Right Arm"]:FindFirstChild("RightGrip") then Disable(c["Right Arm"].RightGrip) end end if not PlayerIsInTable(LoopKills, p) then table.insert(LoopKills, p) end end end end end end local handle = t:WaitForChild("Handle"); for _, w in pairs(handle:GetChildren()) do WeldAdded(w); end -- perhaps this -- nvm handle.ChildAdded:Connect(WeldAdded); end end function AntiWeld.PlayerAdded(v) if v.Character then for _, t in pairs(v.Character:GetChildren()) do AntiWeld.ToolAdded(t, v, v.Character); end end for _, t in pairs(v:WaitForChild("Backpack"):GetChildren()) do AntiWeld.ToolAdded(t, v, v.Character); end v:WaitForChild("Backpack").ChildAdded:Connect(function(t) AntiWeld.ToolAdded(t, v, v.Character); end) v.CharacterAdded:Connect(function(ch) ch.ChildAdded:Connect(function(t) AntiWeld.ToolAdded(t, v, ch); end) end) end for i,v in pairs(Players:GetPlayers()) do if v ~= LocalPlayer then AntiWeld.PlayerAdded(v) end end Players.PlayerAdded:Connect(AntiWeld.PlayerAdded);]] local LeftPlayers = { LoopKilling = {}, GunBans = {} }; -- rejoin support Players.PlayerRemoving:Connect(function(plr) local lkIndex = table.find(LoopKills, plr); if lkIndex then table.insert(LeftPlayers.LoopKilling, plr.UserId); table.remove(LoopKills, lkIndex); end if GunBanConnection[plr] then GunBanConnection[plr]:Disconnect(); table.insert(LeftPlayers.GunBans, plr.UserId); end end) Players.PlayerAdded:Connect(function(plr) local loopkilledPlayer = table.find(LeftPlayers.LoopKilling, plr.UserId); if loopkilledPlayer then table.insert(LoopKills, plr); table.remove(LeftPlayers.LoopKilling, loopkilledPlayer); end local gunBannedPlayer = table.find(LeftPlayers.GunBans, plr.UserId); if gunBannedPlayer then task.spawn(function() plr:WaitForChild("Backpack"); GunBan(plr); table.remove(LeftPlayers.GunBans, gunBannedPlayer); end) end end) local ToolAdded; local namecall; namecall = hookmetamethod(game, "__namecall", newcclosure(function(self, ...) local method = getnamecallmethod() local src = getfenv(3).script local args = {...} if self.Name == "SayMessageRequest" and args[1] and args[1]:sub(1, #Admin.Admins[LocalPlayer].Prefix) == Admin.Admins[LocalPlayer].Prefix then return end if method == "InvokeServer" and self.Name == "ItemHandler" then if LocalPlayer:FindFirstChild("Backpack") and not ToolAdded then ToolAdded = LocalPlayer.Backpack.ChildAdded:Connect(function(tool) WhitelistItem(tool); ToolAdded:Disconnect(); ToolAdded = nil; end) end end return namecall(self, ...) end)) print("loaded")