Upvote GUI For my diner

I am making a diner game, and I want to make a system where if someone from the rank 246+ says “/admin”, a GUI pops up allowing that rank+ to upvote people with the rank of 8 to be up or downvoted. You need 5 upvotes to be promoted. This is in the group id of 5143432. How do I make this?

I don’t really understand what your asking, could you clarify?

You can make a chatted event which checks if the player is an admin by using player:GetRankInGroup() such as

if player:GetRankInGroup(GroupId) >= 246 then
--do something
end

Then in that you can clone the gui into the player’s gui.

If by that you mean in the group you’d have to use a Roblox Bot for that which are many tutorials for.

I won’t write out a whole script but you’d need to view these articles:

This is an example of how it’d work, you can obviously change something if this isn’t what you want, but this is a bare example:

  1. Player joins, start the onchat event to listen to what they’re saying.
  2. When they say /admin, make the GUI appear on their screen.
  3. You’d have to make a system that checks for all players in the game, so you aren’t upvoting people that left the game.
  4. The upvote and downvote button once clicked would fire a RemoteEvent with the needed parameters.
  5. If the player is above 5 upvotes and is above rank 246+, give them admin/a promotion.

when they get 5 upvotes, a gui pops up telling them they got promoted.

This is my script so far:
local groupid = 5143432

local rankthatcanbeupvoted = 8

local minumumranktoupvote = 246

local upvotesneeded = 5

local players = game:GetService(“Players”)

players.Chatted:Connect(function(msg)

local command = “/admin”

if “/admin” then

game.StarterGui.Upvote.Enabled = true

end

if 5 upvotes then

game.StarterGui.Popup.Enabled = true

end

local DataStoreService = Game:GetService(“DataStoreService”)

Could you format that please.

However that wouldn’t work

Would be useless.

What you would have to do is

if msg == string.lower(command) then

I’m gonna assume you put that there as a placeholder for checking the upvotes,
also if you want to change the popup of the player you should be accessing playergui not startergui.

image

Im also assuming you only want a certain rank for the GUI to be showable?

246+ can see the gui if they say /admin