Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Advanced Admin Commands Script (FE Compatible)
- -- Note: Execute this script using a Roblox exploit that supports LUA execution
- local players = game:GetService("Players")
- local localPlayer = players.LocalPlayer
- local prefix = "!" -- Command prefix (e.g., "!kill PlayerName")
- -- Utility function to get a player by name
- local function getPlayer(name)
- for _, player in pairs(players:GetPlayers()) do
- if player.Name:lower():sub(1, #name) == name:lower() then
- return player
- end
- end
- return nil
- end
- -- Admin commands handler
- local commands = {
- kill = function(targetName)
- local target = getPlayer(targetName)
- if target and target.Character and target.Character:FindFirstChild("Humanoid") then
- target.Character.Humanoid.Health = 0
- end
- end,
- bring = function(targetName)
- local target = getPlayer(targetName)
- if target and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then
- local rootPart = localPlayer.Character and localPlayer.Character:FindFirstChild("HumanoidRootPart")
- if rootPart then
- target.Character.HumanoidRootPart.CFrame = rootPart.CFrame
- end
- end
- end,
- teleport = function(targetName, destinationName)
- local target = getPlayer(targetName)
- local destination = getPlayer(destinationName)
- if target and target.Character and target.Character:FindFirstChild("HumanoidRootPart") and
- destination and destination.Character and destination.Character:FindFirstChild("HumanoidRootPart") then
- target.Character.HumanoidRootPart.CFrame = destination.Character.HumanoidRootPart.CFrame
- end
- end,
- freeze = function(targetName)
- local target = getPlayer(targetName)
- if target and target.Character then
- for _, part in pairs(target.Character:GetDescendants()) do
- if part:IsA("BasePart") then
- part.Anchored = true
- end
- end
- end
- end,
- unfreeze = function(targetName)
- local target = getPlayer(targetName)
- if target and target.Character then
- for _, part in pairs(target.Character:GetDescendants()) do
- if part:IsA("BasePart") then
- part.Anchored = false
- end
- end
- end
- end,
- fly = function(targetName)
- local target = getPlayer(targetName)
- if target and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then
- -- Simple flying mechanism
- local bodyVelocity = Instance.new("BodyVelocity", target.Character.HumanoidRootPart)
- bodyVelocity.MaxForce = Vector3.new(1e5, 1e5, 1e5)
- bodyVelocity.Velocity = Vector3.new(0, 50, 0)
- end
- end
- }
- -- Chat listener to detect admin commands
- local function onChat(message)
- if message:sub(1, #prefix) == prefix then
- local args = message:sub(#prefix + 1):split(" ")
- local command = args[1]:lower()
- table.remove(args, 1)
- if commands[command] then
- commands[command](unpack(args))
- end
- end
- end
- -- Hook chat messages
- localPlayer.Chatted:Connect(onChat)
- -- Inform the admin
- print("Admin commands script loaded. Use '" .. prefix .. "[command]' in chat.")
Advertisement
Add Comment
Please, Sign In to add comment