I got an answer from ROBLOX forums.
local Player = game.Players.LocalPlayer
script.Parent.MouseButton1Down:connect(function() Player.leaderstats.cash.Value = Player.leaderstats.cash.Value - 5000 end)
Incase anyone needs it.
Just Use LocalPlayer
button = script.Parent window = script.Parent.Parent.Parent.Parent local sp = game.Players.LocalPlayer function onClicked(GUI) script.Parent.Parent.Visible = false script.Parent.Parent.Parent.LowEndPC.Visible = true cash = sp.leaderstats.Money.Value if cash.Value >= 15000 then cash.Value = cash.Value- 5000 end end script.Parent.MouseButton1Click:connect(onClicked)