-- LocalScript (place in StarterPlayerScripts) local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local TeleportService = game:GetService("TeleportService") local player = Players.LocalPlayer -- FUNCTION: Wait every 0.01 sec until the player's Backpack has a child "Create" -- and then wait for its child remote "lililililililililililii". local function updateBuildRemote() while not player:FindFirstChild("Backpack") do wait(0.01) end local bp = player.Backpack while not bp:FindFirstChild("Create") do wait(0.01) end return bp:FindFirstChild("Create"):WaitForChild("lililililililililililii") end -- Initially update buildRemote. local buildRemote = updateBuildRemote() -- Update buildRemote whenever the player's character respawns. player.CharacterAdded:Connect(function(character) buildRemote = updateBuildRemote() end) -- Get the "SpawnCircuitRemote" from ReplicatedStorage for the blood feature. local bloodRemote = ReplicatedStorage:WaitForChild("SpawnCircuitRemote") -------------------------------------------------- -- UI SETUP -------------------------------------------------- local gui = Instance.new("ScreenGui") gui.Name = "AdminUI" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") local frame = Instance.new("Frame", gui) frame.Name = "MainFrame" -- Adjust frame size to accommodate nine buttons plus the scroll list. frame.Size = UDim2.new(0, 300, 0, 800) frame.Position = UDim2.new(0.5, -150, 0.2, 0) frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 8) local function makeBtn(text, y) local btn = Instance.new("TextButton", frame) btn.Size = UDim2.new(1, -20, 0, 40) btn.Position = UDim2.new(0, 10, 0, y) btn.BackgroundColor3 = Color3.fromRGB(50, 50, 50) btn.Font = Enum.Font.GothamBold btn.TextSize = 18 btn.TextColor3 = Color3.new(1, 1, 1) btn.Text = text Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6) return btn end -- Create main buttons (ordered top-to-bottom) local btnCrucifix = makeBtn("Spawn Crucifix", 10) local btnTrap = makeBtn("Trap Player", 60) local btnShutdown = makeBtn("Shut Down Button", 110) local btnSpam = makeBtn("Spam Build: OFF", 160) local btnRespawn = makeBtn("Respawn Character", 210) local btnBlood = makeBtn("Realistic Blood Feature", 260) local btnCrash = makeBtn("Crash", 310) local btnRejoin = makeBtn("Rejoin", 360) local btnClose = makeBtn("Close", 410) -------------------------------------------------- -- SCROLLFRAME: PLAYER LIST (for Crucifix & Trap) -------------------------------------------------- local scroll = Instance.new("ScrollingFrame", frame) scroll.Name = "TargetList" scroll.Size = UDim2.new(1, -20, 0, 280) scroll.Position = UDim2.new(0, 10, 0, 470) scroll.BackgroundTransparency = 1 scroll.ScrollBarThickness = 6 scroll.Visible = false local listLayout = Instance.new("UIListLayout", scroll) listLayout.Padding = UDim.new(0, 4) listLayout.SortOrder = Enum.SortOrder.LayoutOrder local currentMode -------------------------------------------------- -- BUILD PATTERN HELPERS -------------------------------------------------- -- Spawn Crucifix: Fires remote calls to build a cross shape, relative to the given CFrame (cf). local function spawnCrucifix(cf) for i = -3, 3 do buildRemote:FireServer("Planks", cf * CFrame.new(0, i * 2, 0)) end for i = -2, 2 do buildRemote:FireServer("Planks", cf * CFrame.new(i * 2, 6, 0)) end end -- Spawn Cage: Fires remote calls to build a cage outline relative to the given CFrame (cf). local function spawnCage(cf) for _ = 1, 3 do for y = 0, 8, 2 do for x = -6, 6, 2 do for z = -6, 6, 2 do local edge = (x == -6 or x == 6 or z == -6 or z == 6 or y == 0 or y == 8) if edge then buildRemote:FireServer("Planks", cf * CFrame.new(x, y, z)) end end end end end end -- Spawn Cube (for Shut Down Button): Spawns a gap-filled cube with overall dimensions 50×50×50 studs. -- Uses a coarse grid of 10 blocks per axis (each block 5 studs in size). local function spawnCube(cf) local size = 50 local res = 10 local step = size / res local half = size / 2 for x = -half, half - step, step do for y = -half, half - step, step do for z = -half, half - step, step do buildRemote:FireServer("Planks", cf * CFrame.new(x, y, z)) end end end end -- Completely Filled Cube (for "Crash" Button): Spawns a cube of overall dimensions 100,000×100,000×100,000 studs filled completely with 1×1×1 blocks. -- WARNING: This will be astronomically heavy. local function spawnCompletelyFilledCube(cf) local size = 100000 local half = size / 2 for x = -half, half - 1, 1 do for y = -half, half - 1, 1 do for z = -half, half - 1, 1 do buildRemote:FireServer("Planks", cf * CFrame.new(x, y, z)) end end end end -------------------------------------------------- -- REALISTIC BLOOD FEATURE -------------------------------------------------- -- Attach a death listener to a given player so that when their humanoid dies, it fires the blood remote. local bloodFeatureActive = false local function attachDeathListener(pl) pl.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild("Humanoid") humanoid.Died:Connect(function() local hrp = character:FindFirstChild("HumanoidRootPart") if hrp then bloodRemote:FireServer("Carpet", Vector3.new(3, 0.40297800302505493, 3), hrp.Position) end end) end) end local function setupBloodFeature() if bloodFeatureActive then return end bloodFeatureActive = true for _, pl in ipairs(Players:GetPlayers()) do attachDeathListener(pl) end Players.PlayerAdded:Connect(function(newPl) attachDeathListener(newPl) end) end -------------------------------------------------- -- PLAYER LIST REBUILD FUNCTION (for Crucifix & Trap) -------------------------------------------------- local function rebuildList(mode) for _, child in ipairs(scroll:GetChildren()) do if child:IsA("TextButton") then child:Destroy() end end currentMode = mode if mode == "Crucifix" then local allBtn = Instance.new("TextButton", scroll) allBtn.Size = UDim2.new(1, 0, 0, 30) allBtn.BackgroundColor3 = Color3.fromRGB(50, 50, 50) allBtn.Font = Enum.Font.GothamBold allBtn.TextSize = 18 allBtn.TextColor3 = Color3.new(1, 1, 1) allBtn.Text = "All Players" Instance.new("UICorner", allBtn).CornerRadius = UDim.new(0, 6) allBtn.LayoutOrder = 0 allBtn.MouseButton1Click:Connect(function() for _, pl in ipairs(Players:GetPlayers()) do local hrp = pl.Character and pl.Character:FindFirstChild("HumanoidRootPart") if hrp then spawnCrucifix(hrp.CFrame * CFrame.new(0, 0, -5)) end end scroll.Visible = false end) end for i, pl in ipairs(Players:GetPlayers()) do local btn = Instance.new("TextButton", scroll) btn.Size = UDim2.new(1, 0, 0, 30) btn.BackgroundColor3 = Color3.fromRGB(50, 50, 50) btn.Font = Enum.Font.GothamBold btn.TextSize = 18 btn.TextColor3 = Color3.new(1, 1, 1) btn.Text = pl.Name Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6) btn.LayoutOrder = i btn.MouseButton1Click:Connect(function() local hrp = pl.Character and pl.Character:FindFirstChild("HumanoidRootPart") if hrp then if mode == "Crucifix" then spawnCrucifix(hrp.CFrame * CFrame.new(0, 0, -5)) else spawnCage(hrp.CFrame) end end scroll.Visible = false end) end scroll.CanvasSize = UDim2.new(0, 0, 0, listLayout.AbsoluteContentSize.Y + 8) end -------------------------------------------------- -- MAIN BUTTON CALLBACKS -------------------------------------------------- btnCrucifix.MouseButton1Click:Connect(function() rebuildList("Crucifix") scroll.Visible = not scroll.Visible end) btnTrap.MouseButton1Click:Connect(function() rebuildList("Trap") scroll.Visible = not scroll.Visible end) btnShutdown.MouseButton1Click:Connect(function() -- For every player, spawn the cube (50×50×50 gap-filled) 1,000 times. for _, pl in ipairs(Players:GetPlayers()) do local hrp = pl.Character and pl.Character:FindFirstChild("HumanoidRootPart") if hrp then local baseCFrame = hrp.CFrame for i = 1, 1000 do spawnCube(baseCFrame) wait(0.01) end if pl.Character and pl.Character.PrimaryPart then pl.Character:SetPrimaryPartCFrame(baseCFrame * CFrame.new(0, 5, 0)) end end end end) local isSpamming = false btnSpam.MouseButton1Click:Connect(function() isSpamming = not isSpamming btnSpam.Text = isSpamming and "Spam Build: ON" or "Spam Build: OFF" if isSpamming then spawn(function() while isSpamming do local pool = Players:GetPlayers() if #pool > 0 then local tgt = pool[math.random(1, #pool)] local hrp = tgt.Character and tgt.Character:FindFirstChild("HumanoidRootPart") if hrp then local off = Vector3.new(math.random(-20,20), math.random(5,30), math.random(-20,20)) buildRemote:FireServer("Planks", hrp.CFrame * CFrame.new(off)) end end wait(0.1) end end) end end) btnRespawn.MouseButton1Click:Connect(function() ReplicatedStorage:WaitForChild("RequestRespawn"):FireServer() end) btnBlood.MouseButton1Click:Connect(function() -- Activate the realistic blood feature by attaching death listeners to all players. setupBloodFeature() end) btnCrash.MouseButton1Click:Connect(function() -- For every player, spawn the completely filled cube (100,000×100,000×100,000) 30 times with a 0.01 sec delay. for _, pl in ipairs(Players:GetPlayers()) do local hrp = pl.Character and pl.Character:FindFirstChild("HumanoidRootPart") if hrp then local baseCFrame = hrp.CFrame for i = 1, 30 do spawnCompletelyFilledCube(baseCFrame) wait(0.01) end if pl.Character and pl.Character.PrimaryPart then pl.Character:SetPrimaryPartCFrame(baseCFrame * CFrame.new(0, 5, 0)) end end end end) btnRejoin.MouseButton1Click:Connect(function() TeleportService:Teleport(game.PlaceId, player) end) btnClose.MouseButton1Click:Connect(function() gui:Destroy() end) -------------------------------------------------- -- AUTO-UPDATE PLAYER LIST ON JOIN/LEAVE -------------------------------------------------- Players.PlayerAdded:Connect(function() if scroll.Visible then rebuildList(currentMode) end end) Players.PlayerRemoving:Connect(function() if scroll.Visible then rebuildList(currentMode) end end) -------------------------------------------------- -- MAKE THE WINDOW DRAGGABLE -------------------------------------------------- do local dragging, startPos, startMouse frame.InputBegan:Connect(function(inp) if inp.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true startPos = frame.Position startMouse = inp.Position inp.Changed:Connect(function() if inp.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) UIS.InputChanged:Connect(function(inp) if dragging and inp.UserInputType == Enum.UserInputType.MouseMovement then local delta = inp.Position - startMouse frame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end) end