how would I do it on the server if I dont want it to change for everyone
my full localscript:
local Id = 1268339333
local mps = game:GetService("MarketplaceService")
local player = game.Players.LocalPlayer
local breaking = false
script.Parent.MouseButton1Click:Connect(function()
mps:PromptProductPurchase(game.Players.LocalPlayer, Id)
end)
wait(3)
if game.Players.LocalPlayer:WaitForChild("AmountOwned").TimesThreeOrbs.Value ~= 0 and game.Players.LocalPlayer:WaitForChild("TimeLeft").ThreeTimesOrbsMinutes.Value ~= 0 and game.Players.LocalPlayer:WaitForChild("TimeLeft").ThreeTimesOrbsSeconds.Value ~= 0 then
game.ReplicatedStorage.OrbsMultiplier.Value = 3
local Minutes = game.ReplicatedStorage.TwoTimesOrbsMinutes
local Seconds = game.ReplicatedStorage.TwoTimesOrbsSeconds
Minutes.Value = game.Players.LocalPlayer.TimeLeft.ThreeTimesOrbsMinutes.Value
Seconds.Value = game.Players.LocalPlayer.TimeLeft.ThreeTimesOrbsSeconds.Value
if breaking == false then
breaking = true
while wait() do
breaking = true
repeat
Seconds.Value -= 1
wait(1)
until Seconds.Value == 0
if Seconds.Value == 0 then
Minutes.Value -= 1
wait(1)
Seconds.Value = 60
end
if Minutes.Value and Seconds.Value == 0 then
break
end
end
game.ReplicatedStorage.OrbsMultiplier.Value = 1
breaking = false
end
elseif game.Players.LocalPlayer:WaitForChild("AmountOwned").TimesThreeOrbs.Value == 0 then
print("is 0")
end
game.ReplicatedStorage.BoostPurchased.OnClientEvent:Connect(function(boostName)
print("hello")
if boostName == "TimesTwoOrbs" then
game.ReplicatedStorage.BoostAdder:FireServer(boostName)
script.Parent.Parent.Use.AmountAbleToUse.Value += 1
end
end)
local Minutes = game.ReplicatedStorage.TwoTimesOrbsMinutes
local Seconds = game.ReplicatedStorage.TwoTimesOrbsSeconds
script.Parent.Parent.Use.MouseButton1Click:Connect(function()
game.ReplicatedStorage.OrbsMultiplier.Value = 3
print("hi")
if script.Parent.Parent.Use.AmountAbleToUse.Value > 0 then
script.Parent.Parent.Use.AmountAbleToUse.Value -= 1
game.ReplicatedStorage.BoostSubtracter:FireServer()
if Seconds.Value == 0 then
Seconds.Value = 60
Minutes.Value += 9
elseif Seconds.Value <= 60 and Seconds.Value > 0 then
Minutes.Value += 10
end
if breaking == false then
breaking = true
while wait() do
breaking = true
repeat
Seconds.Value -= 1
wait(1)
until Seconds.Value == 0
if Seconds.Value == 0 then
Minutes.Value -= 1
wait(1)
Seconds.Value = 60
end
if Minutes.Value and Seconds.Value == 0 then
break
end
end
game.ReplicatedStorage.OrbsMultiplier.Value = 1
breaking = false
end
end
end)
game.Players.PlayerRemoving:Connect(function()
game.ReplicatedStorage.BoostTimeSave:FireServer(game.ReplicatedStorage.TwoTimesOrbsMinutes, game.ReplicatedStorage.TwoTimesOrbsSeconds)
end)
Client isnt save, do all the value changing stuff from the server.
Exploiters can easily change those number values if its on client, exploiters can fire that remote event too.