generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: My admin commands script isn´t working! URGENT!

Previous Thread :: Next Thread 
GamerOfGames123 is not online. GamerOfGames123
Joined: 14 Jul 2012
Total Posts: 210
26 Dec 2013 01:30 PM
Please help! I need to finish it! My friends are waiting and i can't wait to continue the dev!
The script is:
--[[
Made by: GamerOfGames123
Thank you for using my script! :D
To support me and test it go to my place "[GamerOfGames123's Admin Commands] Test Place"
--]]
--/Commands/
--[[
reset: = Resets your character.
kill:("Player") = Kills the "Player".
ban:("Player") = Bans the "Player".
unban:("Player") = Unbans the "Player".
kick:("Player") = Kicks the "Player".
--]]
--[Options]
--/Permissions/
isOwner = {["GamerOfGames123"] = true} -- Put your name here
isAdmin = {["GamerOfGames123"] = true, ["Tagap1234"] = true, ["Lbp2Fan321"] = true} --Put the names of the admins here! WARNING: If allAdmin is true, this will be ignored!
allAdmin = false -- Do you want to all be admin? Make this true, else make it false!
--/Punishment for trying to ban the owner (kick)/
punishment = true
-- NOTE: You need to ban people ingame!
-- Find player function
function findPlayer(name)
for _, player in ipairs(game.Players:GetPlayers()) do
if player.Name:lower() == name:lower() then
return player
end
end
end
-- Declarations
adminsOn = 0
adminsOnGUI = script.adminsOnGUI:clone()
script.adminsOnGUI:Remove()
adminsOnGUI.Parent = game.StarterGui
-- Command function
function Commands(msg, player)
-- Reset
if msg:sub(1, 6) == "reset:" then
player.Character:BreakJoints()
end
-- Kill
if msg:sub(1, 5) == "kill:" then
target = findPlayer(msg:sub(6))
target.Character:BreakJoints()
end
-- Kick
if msg:sub(1, 5) == "kick:" then
target = findPlayer(msg:sub(6))
target:Kick()
end
-- Ban
if msg:sub(1, 4) == "ban:" then
target = findPlayer(msg:sub(5))
if isOwner[target.name] then
if punishment == true then
player:Kick()
end
else
target:WaitForDataReady()
target.SaveBoolean('Banned', true)
target:Kick()
end
end
-- Unban
if msg:sub(1, 6) == "unban:" then
target = findPlayer(msg:sub(7))
target:WaitForDataReady()
target.SaveBoolean('Banned', false)
target:Kick()
end
end
-- [Detect if someone said something and if is banned]
-- Player join
game.Players.PlayerAdded:connect(function(player)
player:WaitForDataReady()
banned = player.LoadBoolean('Banned')
if banned == true then
player:Kick()
else
player.SaveBoolean('Banned', false)
end
if isAdmin[player.name] or isOwner[player.name] then
adminsOn = adminsOn + 1
adminsOnGUI.Text.Text = "Admins On: "..toString(adminsOn)
player.Chatted:connect(function(message) Commands(message, player) end)
end
end)
-- Player quit
game.Players.PlayerRemoving:connect(function(player)
if isAdmin[player.name] or isOwner[player.name] then
adminsOn = adminsOn - 1
adminsOnGUI.Text.Text = "Admins On: "..adminsOn.toString
end
end)
Please dont copy it
Report Abuse
GamerOfGames123 is not online. GamerOfGames123
Joined: 14 Jul 2012
Total Posts: 210
26 Dec 2013 01:47 PM
Please help me ! D:
Report Abuse
GamerOfGames123 is not online. GamerOfGames123
Joined: 14 Jul 2012
Total Posts: 210
27 Dec 2013 02:05 AM
Bump
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image