It's a local script and I'm trying to insert a remote event for it to not be client sided
local cpsamount = 1 --how much cps given
local price = 50 --price of item
aot = 0
script.Parent.MouseButton1Click:connect(function()
local bux = game.Players.LocalPlayer.leaderstats.Bux
local button = script.Parent.Parent
local cps = bux.Parent.Parent.Stats.Cps
button.BackgroundColor3 = Color3.fromRGB(0,0,0)
if bux.Value >= price then
cps.Value = cps.Value + cpsamount
aot = aot + 1
bux.Value = bux.Value - price
local sound = script.Parent.Parent.Parent.Sound
sound:Play()
local msg = game.ReplicatedStorage.MSG:clone()
msg.Parent = game.Players.LocalPlayer.PlayerGui
msg.TextBox:TweenPosition(UDim2.new(-0.015,0, -0.045,0), 'Out', 'Bounce', 1.5)
wait(2.5)
msg:Destroy()
else
print("Not enough")
end
end)

1 comment
Try doing it yourself