You're very close to your own solution. There are just a couple of mistakes in your attempt. The first is that you need a way to track the player's 'Richness'.
If you want this to appear in the Leaderboard at the top right, you need to attach a 'leaderstats' Value to the player. You can do this by doing the following:
-- somewhere in code, connect to the PlayerAdded event.
game.Players.PlayerAdded:Connect(function(player)
-- in here, add a folder named 'leaderstats' to the Player.
-- IMPORTANT: It must be named 'leaderstats' exactly, all lowercase
local leaderstats = Instance.new('Folder')
leaderstats.Name = 'leaderstats'
-- then add the Richness to the added Player. Name if whatever you'd like
local richness = Instance.new('IntValue')
richness.Name = 'Richness'
richness.Value = 0
-- Parent this Richness value to the leaderstats to make it appear
-- in the Leaderboard at the top right
richness.Parent = leaderstats
-- After you've created this Leaderboard stat, you need to
-- parent the leaderstats to the Player
leaderstats.Parent = player
end)
Now all players will show up on the Leaderboard with a 'Richness' stat. They'll all be 0 until you update this value. You can update the value using RemoteEvent
s from the Client to the Server.
The Second is that you are printing to the Output window incorrectly. When you merge strings together (called concatenation), in Lua you do so by using '..'. For example:
print('Here is a ' .. 'part of a ' .. 'string')
This will output the following in the 'Output' window:
Here is a part of a string
So to put that into use in your code, you'd type the following:
print('You are ' .. (Rich + 1) .. ' Rich')