This is an item shop script
local player = game.Players Cash = script.Parent.Parent.Parent.Parent.Parent.RealMoney local tool = game.Lighting.Spas12 function onClick() if Cash.Value >= 10 then Cash.Value = Cash.Value - 10 local clone = tool:Clone() clone.Parent = player.Backpack end end script.Parent.MouseButton1Click:connect(onClick)
the leaderboard
local rs = game:GetService("ReplicatedStorage") game.Players.PlayerAdded:Connect(function(plr) local ls = Instance.new("IntValue", plr) ls.Name = "leaderstats" local rc = Instance.new("NumberValue", plr) rc.Name = "RealMoney" local c = Instance.new("StringValue", ls) c.Name = "Money" c.Value = "$"..rc.Value c.Value = 10 rc.Value = 10
Put Spas12 in ReplicatedStorage and put the script in the model and put a ClickDetector in the model. I'm not sure this will work:
local tool = game.ReplicatedStorage.Spas12 -- put Spas12 in ReplicatedStorage function onClick(plr) if plr.leaderstats.Realmoney.Value >= 10 then plr.leaderstats.RealMoney.Value = plr.leaderstats.RealMoney.Value - 10 local clone = tool:Clone() clone.Parent = plr.Backpack end end script.Parent.ClickDetector.MouseClick:Connect(onClick)