Secret GUI - Free Model

Got bored and figured, why not. This shows the GUI only to indicated userIds and is meant for public use and editing.

1 Like

That image is pretty cool.

Since I’m lazy, can you explain how you do it? Chances are you might be doing it a bad way (that is - it might be easily fooled)

Are you talking about the secret GUI or the image? Guessing GUI so…

It basically changes the value of a NumberValue to the LocalPlayers userId. Then it checks to see if the Id matches the designated id(s). If it does, it will make it visible in this version. Simple script though.

[quote] Are you talking about the secret GUI or the image? Guessing GUI so…

It basically changes the value of a NumberValue to the LocalPlayers userId. Then it checks to see if the Id matches the designated id(s). If it does, it will make it visible in this version. Simple script though.

[/quote]

Why does it need to do it so many times? userId doesn’t change. While loops should rarely be used like that at that rate

Also, 0 evaluates to true, so it would display for everybody

I think this is what you were trying to write:

local player = game:GetService("Players").LocalPlayer
local userId = player.userId
if userId == 16212258 or (userId <= 0 and player.Name == "Player1") then
	script.Parent.Frame.Visible = true
end
local player = game:GetService("Players").LocalPlayer
local userId = player.userId
script.Parent.Frame.Visible = (userId == 16212258 or (userId <= 0 and player.Name == "Player1"))

Also use [ code ] [ /code ] tags instead of posting screenshots :wink:

If you’re feeling even more fancy, do that server-side. And then clone the GUI into the player’s PlayerGui if they are the right player.

That way the GUI doesn’t even exist in memory for players unless the server gives them it.

--[[
Hide it | ServerSide
========================================
]]

-- Settings
local Admins = {0}
local NAME_GUI = 'AdminGui'

local function isAdmin(Player)
for _,v in pairs(Admins) do
if Player.userId == v then
return true
end
end
return false
end

-- Hook our Events up
local function Connect(Player)
Player.CharacterAdded:connect(function(Char)
if isAdmin(Player) then
if not Player.PlayerGui:findFirstChild(NAME_GUI) then
ServerStorage[NAME_GUI]:Clone().Parent = Player.PlayerGui
end
end
end)
end

Game:GetService('Players').PlayerAdded:connect(function(NewPlayer)
Connect(NewPlayer)
end)

for _, v in pairs(Game:GetService('Players'):GetChildren()) do
Connect(v)
end

@Crazyman32, that was my initial idea, however I figured that for newer players the current method is easier for their development. Meant to be very easy to edit. Working on a couple ideas and updates for it too.

@Juraan, Great ideas, going to incorporate this.

Umm… lol yeah that was way inefficient and easily exploited, good job some other guys wrote quick examples.

Quite constructive as always.

Anyhow, thank you OP. You’ve given me a wonderful idea – I’m currently on/off working on server control commands, and I’ll make sure to build permission-specific GUI distribution into it :slight_smile:

[quote] Quite constructive as always.
[/quote]

Plz don’t, it’s Christmas.

I actually made something really cool like this recently. By requiring a ModuleScript, it returns a simple function. With this, I can then execute the function in the Moudle from another script with a specified key and privileged player. If the key matches the key of a table, and the player’s userId is located in the players table within that table, only then will it return what you want. Otherwise, the only difference is it virtually doesn’t exist to outside users. The only down side to this is that it only works in games online.

[quote] @Crazyman32, that was my initial idea, however I figured that for newer players the current method is easier for their development. Meant to be very easy to edit. Working on a couple ideas and updates for it too.

@Juraan, Great ideas, going to incorporate this. [/quote]

This forum isn’t really for “newer players” at all.

At first, a lot of users were let into RBXDev without any filters attached. Now, it’s a lot more difficult to get in. So, there are some ‘newer’ members, though most aren’t.

I meant that the newer players on ROBLOX site can have a hard time understanding LUA when they’ve never seen it before. Not newer RBXDev members,