Guest User

Admin Script FE

a guest
Nov 25th, 2024
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. -- Advanced Admin Commands Script (FE Compatible)
  2. -- Note: Execute this script using a Roblox exploit that supports LUA execution
  3.  
  4. local players = game:GetService("Players")
  5. local localPlayer = players.LocalPlayer
  6. local prefix = "!" -- Command prefix (e.g., "!kill PlayerName")
  7.  
  8. -- Utility function to get a player by name
  9. local function getPlayer(name)
  10. for _, player in pairs(players:GetPlayers()) do
  11. if player.Name:lower():sub(1, #name) == name:lower() then
  12. return player
  13. end
  14. end
  15. return nil
  16. end
  17.  
  18. -- Admin commands handler
  19. local commands = {
  20. kill = function(targetName)
  21. local target = getPlayer(targetName)
  22. if target and target.Character and target.Character:FindFirstChild("Humanoid") then
  23. target.Character.Humanoid.Health = 0
  24. end
  25. end,
  26.  
  27. bring = function(targetName)
  28. local target = getPlayer(targetName)
  29. if target and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then
  30. local rootPart = localPlayer.Character and localPlayer.Character:FindFirstChild("HumanoidRootPart")
  31. if rootPart then
  32. target.Character.HumanoidRootPart.CFrame = rootPart.CFrame
  33. end
  34. end
  35. end,
  36.  
  37. teleport = function(targetName, destinationName)
  38. local target = getPlayer(targetName)
  39. local destination = getPlayer(destinationName)
  40. if target and target.Character and target.Character:FindFirstChild("HumanoidRootPart") and
  41. destination and destination.Character and destination.Character:FindFirstChild("HumanoidRootPart") then
  42. target.Character.HumanoidRootPart.CFrame = destination.Character.HumanoidRootPart.CFrame
  43. end
  44. end,
  45.  
  46. freeze = function(targetName)
  47. local target = getPlayer(targetName)
  48. if target and target.Character then
  49. for _, part in pairs(target.Character:GetDescendants()) do
  50. if part:IsA("BasePart") then
  51. part.Anchored = true
  52. end
  53. end
  54. end
  55. end,
  56.  
  57. unfreeze = function(targetName)
  58. local target = getPlayer(targetName)
  59. if target and target.Character then
  60. for _, part in pairs(target.Character:GetDescendants()) do
  61. if part:IsA("BasePart") then
  62. part.Anchored = false
  63. end
  64. end
  65. end
  66. end,
  67.  
  68. fly = function(targetName)
  69. local target = getPlayer(targetName)
  70. if target and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then
  71. -- Simple flying mechanism
  72. local bodyVelocity = Instance.new("BodyVelocity", target.Character.HumanoidRootPart)
  73. bodyVelocity.MaxForce = Vector3.new(1e5, 1e5, 1e5)
  74. bodyVelocity.Velocity = Vector3.new(0, 50, 0)
  75. end
  76. end
  77. }
  78.  
  79. -- Chat listener to detect admin commands
  80. local function onChat(message)
  81. if message:sub(1, #prefix) == prefix then
  82. local args = message:sub(#prefix + 1):split(" ")
  83. local command = args[1]:lower()
  84. table.remove(args, 1)
  85.  
  86. if commands[command] then
  87. commands[command](unpack(args))
  88. end
  89. end
  90. end
  91.  
  92. -- Hook chat messages
  93. localPlayer.Chatted:Connect(onChat)
  94.  
  95. -- Inform the admin
  96. print("Admin commands script loaded. Use '" .. prefix .. "[command]' in chat.")
  97.  
Advertisement
Add Comment
Please, Sign In to add comment