Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make a sell script give coins for fat?

i want it to sell Fat in return for Coins but idk how

2 comments

0

do you even try

0

and im confused if you mean a simulator type game displaying fat on leaderboards

1 answer

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:

--Event goes here
local p = game.Players.LocalPlayer
p.leaderstats.Coins.Value = p.leaderstats.Fat.Value / 2 --Again, replace 2 with any number.
--end)

Make a new script with this code:

game.Players.PlayersAdded:Connect(function(plr)
Instance.new("Folder",plr).Name = "leaderstats"
Instance.new("IntValue",plr.leaderstats).Name = "Coins"
Instance.new("IntValue",plr.leaderstats).Name = "Fat"
end)

Happy Devolping! Vivilian9

2 comments

0

To note: this is unsafe from exploiters unless the leaderstats info is copied from elsewhere, and all uses of the info is from that elsewhere location.

0

What do you mean? Exploiters' commands are ran from a localscript, so it's value isn't changed to the server.

This discussion is preserved as it was. New answers, comments, and votes are closed.