local Upgrader = workspace.UpGraderWall.Part.SurfaceGui
local Up1 = Upgrader.Upgrade1
local Cost = script.Cost
function Upgrader1(player)
local leaderstats = player:FindFirstChild('leaderstats')
if leaderstats ~= nil then
local NewValue = leaderstats.Cash
if NewValue.Value >= Cost.Value then
Cash.Value *= 1.5
end
end
print('Upgraded')
end
Up1.MouseButton1Click:Connect(Upgrader1)``` this is in ServerScriptService