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
 

[ Content Deleted ]

Previous Thread :: Next Thread 
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
12 Aug 2011 03:54 PM
local moderators = {"Controllers", "robotman5114", "88dragon6", "IMstDie87", "Spectrumz"}

local admins = {"CaptainAndy", "nicholasjonasfan", "mydarkrai246", "CPTAndy", "Rabbit108227", "Spectrumz"}

function verifyMods(name)
for i, v in pairs(moderators) do
if string.lower(name) == string.lower(v) then
return true
else
return false
end
end
end

function verifyAdmins(name)
for i, v in pairs(admins) do
if string.lower(name) == string.lower(v) then
return true
else
return false
end
end
end

script.Parent.MouseButton1Down:connect(function()
local tbFinder = script.Parent.Parent:findFirstChild("M&ACP - Moderator and Administrator Control Panel")
local tb2Finder = script.Parent.Parent:findFirstChild("ACP - Administrator Control Panel")
if tbFinder and tb2Finder then return end
if verifyMods(game.Players.LocalPlayer.Name) or verifyAdmins(game.Players.LocalPlayer.Name) then --One line
Report Abuse
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
12 Aug 2011 03:55 PM
Sorry! The mistake should be at the end if statement. I forgot about the sticky.
Report Abuse
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
12 Aug 2011 07:45 PM
Bump of epix.
Report Abuse
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
12 Aug 2011 07:55 PM
I know you're looking at this thread, AFF.
Report Abuse
Bannana97 is not online. Bannana97
Joined: 22 Jun 2008
Total Posts: 10215
12 Aug 2011 08:00 PM
[ Content Deleted ]
Report Abuse
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
12 Aug 2011 10:19 PM
Lol, it was a joke.
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
12 Aug 2011 10:21 PM
No clue, but thanks for posting this. I just realized for my script I needed to do string.lower() on the table when it checks the players. :L
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
12 Aug 2011 10:22 PM
o.o Nevermind, my doens't use string.lower when they check the player. >.> Any output for this?
Report Abuse
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
13 Aug 2011 12:28 PM
No, since it's in the StarterGui which is then cloned into the PlayerGui.
Report Abuse
Bannana97 is not online. Bannana97
Joined: 22 Jun 2008
Total Posts: 10215
13 Aug 2011 12:34 PM
[ Content Deleted ]
Report Abuse
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
13 Aug 2011 12:35 PM
Yes, it is.
Report Abuse
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
13 Aug 2011 12:36 PM
What I want this script to do is check to see if the person who clicked the GUI is in either one of the tables.
Report Abuse
Bannana97 is not online. Bannana97
Joined: 22 Jun 2008
Total Posts: 10215
13 Aug 2011 12:38 PM
[ Content Deleted ]
Report Abuse
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
13 Aug 2011 12:40 PM
...The rest of it is just editing two cloned GUIs.

And just so you know, this script worked BEFORE I had the admin/moderator table with that added if statement (yes, I added another end for it). Plus, the rest of the script is EXTREMELY long.
Report Abuse
Bannana97 is not online. Bannana97
Joined: 22 Jun 2008
Total Posts: 10215
13 Aug 2011 12:49 PM
[ Content Deleted ]
Report Abuse
Spectrumz is not online. Spectrumz
Joined: 22 Mar 2011
Total Posts: 4338
13 Aug 2011 12:53 PM
Yes. I want the script to run ONLY if they don't exist, which they don't. (They only exist in Lighting, where I don't check for them.) And I've done some experimenting...

local moderators = {"Controllers", "robotman5114", "88dragon6", "IMstDie87", "Spectrumz"}

local admins = {"CaptainAndy", "nicholasjonasfan", "mydarkrai246", "CPTAndy", "Rabbit108227", "Spectrumz"}

function verifyMods(name)
for i, v in pairs(moderators) do
if string.lower(name) == string.lower(v) then
return true
else
return false
end
end
end

function verifyAdmins(name)
for i, v in pairs(admins) do
if string.lower(name) == string.lower(v) then
return true
else
return false
end
end
end

game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
repeat wait() until c
if verifyMods(p.Name) or verifyAdmins(p.Name) then
local m = Instance.new("Message", p.PayerGui)
m.Text = "You are an admin/moderator."
wait(3)
m:Remove()
elseif verifyMods(p.Name) == false and verifyAdmins(p.Name) == false then
local m = Instance.new("Message", p.PlayerGui)
m.Text = "You are not admin/moderator."
wait(3)
m:Remove()
end
end)
end)

That script makes a message on my screen telling me I'm NOT an admin, so obviously it's somewhere in the verification function or the checking part.
Report Abuse
Bannana97 is not online. Bannana97
Joined: 22 Jun 2008
Total Posts: 10215
13 Aug 2011 01:05 PM
[ Content Deleted ]
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