Hello developers!
I would like to announce that I’ve made an open source over head GUI! A while back I made an over head GUI and… Well it, wasn’t that good. Now, is this better then the top downloaded one? No, it’s not. This is more of testing what I can do, while adding to the Roblox Developer Community.
Marketplace code is outdated. Please use the code used in this post. Also set Image instance .Visible
to false
Images
Set up
After importing the model, put it in ServerScriptService
. Click on the script and adjust the attributes
if needed.
Name | What it does |
---|---|
IfStarCreator | Adds badge if player is a star creator |
IsGroupEnabled | Allows option to add group |
IsPremiumEnabled | Adds badge if player has Premium |
RobloxAdminIcon | If the player is a Roblox Admin |
UseDisplayName | Uses the players DisplayName and removes “@” |
VerifiedUser | Checks if the player has the Verified Badge |
Adding Group
To and a group go to OverheadGuiScript
and open it. Edit GroupPlayerIsIn number to your group ID.
To add a image create something like this local MyImage = 69420
and change “69420” to your image ID. Put that on Line 25
.
Copy this and put it on Line 59
. Make sure to change 255
to your group role.
if Player:GetRankInGroup(GroupPlayerIsIn) == 255 then
local ImageClone = OverheadGuiImage:Clone()
ImageClone.Parent = OverheadGuiClone.Background
ImageClone.Image = string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", MyImage) -- Change "MyImage" to whatever you named your icon
end
Code
--[[
Script created by @Koolkp5
Hello, this is an open source overhead Gui. Feel free to edit anycode!
If you don't know how to add more roles, check the post on the DevForum.
--> https://devforum.roblox.com/t/overhead-gui-updated/2321372
]]--
-- Services
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local StarterGui = game:GetService("StarterGui")
-- Locals
local OverheadGui = script.OverheadGui
local VerifiedImageId = 11207341678 -- Verified Check Image
local StarCreatorImageId = 11322155024 -- Star Creator Image
local DeveloperImageId = 10885640695 -- Developer Image
local RobloxIconImageId = 12932462702 -- Roblox Admin Image
local PremiumImageId = 10885647377 -- Premium Image
local GroupPlayerIsIn = 7 -- 🔶 Change "7" to the group ID if needed.
local RoleInGroup = 255 -- 🔶 Change this if needed.
local IsGroupEnabled = script:GetAttribute("IsGroupEnabled")
local UseDisplayName = script:GetAttribute("UseDisplayName")
local RobloxAdminIcon = script:GetAttribute("RobloxAdminIcon")
local VerifiedUser = script:GetAttribute("VerifiedUser")
local IsPremiumEnabled = script:GetAttribute("IsPremiumEnabled")
local IfStarCreator = script:GetAttribute("IfStarCreator")
-- PlayerAdded
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
task.wait(1)
local OverheadGuiClone = script:WaitForChild("OverheadGui"):Clone() -- Clones OverHeadGui
OverheadGuiClone.Parent = Character:WaitForChild("Head")
OverheadGuiClone.Adornee = Character.Head
local OverheadGuiImage = OverheadGuiClone.Background.Image
if UseDisplayName == true then -- Checks if UseDisplayName true
OverheadGuiClone.Background.Username.Text = Player.DisplayName
else
OverheadGuiClone.Background.Username.Text = "@"..Player.Name-- I added an "@" to say that this is a username and not display name. But it's not needed
end
if IsGroupEnabled == true then -- Checks if IsGroupEnabled. If so, checks if player is in that group.
if Player:IsInGroup(GroupPlayerIsIn) then
if Player:GetRankInGroup(GroupPlayerIsIn) == RoleInGroup then
local ImageClone = OverheadGuiImage:Clone()
ImageClone.Parent = OverheadGuiClone.Background
ImageClone.Image = string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", DeveloperImageId) -- Change "DeveloperImageId" to what ever
ImageClone.Visible = true
end
end
elseif RobloxAdminIcon == true then -- Checks if RobloxAdminIcon is enabled
if Player:IsInGroup(1200769) then -- Admin group
local ImageClone = OverheadGuiImage:Clone()
ImageClone.Parent = OverheadGuiClone.Background
ImageClone.Image = string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", RobloxIconImageId)
ImageClone.Visible = true
end
elseif VerifiedUser == true then
if Player.HasVerifiedBadge then -- Checks if player has badge
print(tostring(Player.HasVerifiedBadge))
local ImageClone = OverheadGuiImage:Clone()
ImageClone.Parent = OverheadGuiClone.Background
ImageClone.Image = string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", VerifiedImageId)
ImageClone.Visible = true
end
end
if IsPremiumEnabled == true then -- Premium
if Player.MembershipType == Enum.MembershipType.Premium then
local ImageClone = OverheadGuiImage:Clone()
ImageClone.Parent = OverheadGuiClone.Background
ImageClone.Image = string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", PremiumImageId)
ImageClone.Visible = true
end
end
if IfStarCreator == true then -- Star Creator
if Player:IsInGroup(4199740) then
local ImageClone = OverheadGuiImage:Clone()
ImageClone.Parent = OverheadGuiClone.Background
ImageClone.Image = string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", StarCreatorImageId)
ImageClone.Visible = true
end
end
if Player.UserId == game.CreatorId then -- Checks if player is the creator
OverheadGuiImage.Image = string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", DeveloperImageId)
end
end)
end)