I see what game your making, an "Eat Junk and Get Fat" simulator, how original.
Anyways, You need to decide how much coins a player would get. An example would be fat / 2 would equal how many coins the player would get. So here would be the code:
2 | local p = game.Players.LocalPlayer |
3 | p.leaderstats.Coins.Value = p.leaderstats.Fat.Value / 2 |
Make a new script with this code:
1 | game.Players.PlayersAdded:Connect( function (plr) |
2 | Instance.new( "Folder" ,plr).Name = "leaderstats" |
3 | Instance.new( "IntValue" ,plr.leaderstats).Name = "Coins" |
4 | Instance.new( "IntValue" ,plr.leaderstats).Name = "Fat" |
Happy Devolping! Vivilian9