How do I make a similar gui to this?

So there is this cash GUI that syncs with the leader stats (increases when you earn cash and decreases when you buy something), and it looks similar to the ROBLOX core GUI, I was wondering how would I make something just like it?

Picture:

Note: I know TopBar Plus exists but I don’t really understand how to make that GUI using it.

Could you tag me when you find a solution? I’ve been wondering how to do this too.

1 Like

I dont really know much about the TopBar, But You could make a textlable like it, and in the screengui disable IgnoreGuiInset, thats all i could think of really.

And this would be the Base of the script that indicates your Money

`while wait(1) do
script.Parent.Text = '$ '…game.Players.LocalPlayer.leaderstats.Cash.Value

end`

the loop Keeps checking the players currency and places it in its parents text.

Hope it helps!

1 Like

Sounds like this is more of an issue with your understanding of GUI manipulation rather than scripting.

@devforum_helper mentioned the IgnoreGuiInset property which you can use on a ScreenGui that looks like:

STRUCTURE
Screenshot (52)

Then you can mess around with the properties of the TextButton, UICorner, and UIPadding which lands you…

RESULT

Of course my attempt isn’t perfect, but it’s a head start!

Now if you want to synchronize the TextButton's Text to the player’s leaderstats Cash, then yeah you need a little scripting. Assuming you already have your leaderstats system setup, setup a Changed event with your Cash ValueObject:

-- LocalScript
local players = game:GetService("Players")
local player = players.LocalPlayer
local leaderstats = player.leaderstats
local cashValueObj = leaderstats.Cash

local textButton = -- Reference to the TextButton in the structure above

cashValueObj.Changed:Connect(function()
    textButton.Text = cashValueObj.Value
end)

Your server side code would be responsible for changing the Cash ValueObject, so I didn’t show it here. Note: Everything I’ve demo’d are just examples you use as references, not necessarily things to copy and paste.

Extra information
4 Likes

Make a screengui
Make it’s IgnoreGuiInset property to true
Put a frame in it and set it’s anchorpoint to 0.5,0
Put it in the middle-top of the screen
Make the frame’s color dark-ish
Add a ui corner and make it semi transparent
Add a textlabel into it with transparent background/centered

Update the textlabel’s text on your cash value changed events. (Assuming your using an intvalue)

Your done.

1 Like

This is not the way to do it! :slight_smile: Will be posting the solution below.

1 Like

Hi! Here’s the solution to your question. I expect that you’ve already made the leaderstat and gui

local LocalPlayer = game:GetService("Players").LocalPlayer
local leaderstats = LocalPlayer:WaitForChild("leaderstats")
local Money = leaderstats:WaitForChild("Money")

local MoneyTextLabel = ... -- define the path here yourself

Money:GetPropertyChangedSignal("Value"):Connect(function()

MoneyTextLabel.Text = "$"..Money.Value

end)
1 Like