Yeah actually, I’ve never used messaging service and I was actually told to use MemoryStoreService which is just NOT working in the slightest. Basically Im using profileservice to capture all the ID’s of the devproducts which are like increase1, increase2, decrease1, decrease2 etc. and then after that I have no idea how to modify the actual value of the time because I don’t know where to store the variable local startTime = 1730683364, which is the end date. Would I store it in each players data, and then update to each player when someone buys?
also in my for loop for the actual counter how am I going to change each players timer, since I cannot obtain the player from the while loop, the startTime variable would have to be global and not a value in the players here is the code i cannot figure out:
while task.wait(1) do
print("RUNN")
local currentTime = os.time()
local timeLeft = startTime - currentTime -- I DONT KNOW WHAT TO DO HERE
print(globalTime)
local DaysLeft = math.floor((timeLeft / 60 / 60 / 24) % (365 + 0.2425))
local HoursLeft = math.floor((timeLeft / 60 / 60) % 24)
local MinutesLeft = math.floor((timeLeft / 60) % 60)
local SecondsLeft = math.floor(timeLeft % 60)
if currentTime >= startTime then
else
updateTime:FireAllClients(DaysLeft, HoursLeft, MinutesLeft, SecondsLeft, timeLeft)
end--]]
end
Another note is that I have a table of all the ID’s like I said but how can I obtain the players startTime value from the while loop?? Here is the SETTINGS table for the devproducts:
local SETTINGS = {
StartingSeconds = {
Increased = 0,
Decreased = 0,
startTime = 1730683364
},
Products = {
[2472101755] = function(profile)
profile.Data.Increased += 25
profile.Data.startTime += 25
end,
[2472106415] = function(profile)
profile.Data.Increased += 100
profile.Data.startTime += 100
end,
[2472115238] = function(profile)
profile.Data.Increased += 300
profile.Data.startTime += 300
end,
[2472119822] = function(profile)
profile.Data.Increased += 600
profile.Data.startTime += 600
end,
[2472125669] = function(profile)
profile.Data.Increased += 1500
profile.Data.startTime += 1500
end,
[2472132196] = function(profile)
profile.Data.Increased += 3000
profile.Data.startTime += 3000
end,
[2472142197] = function(profile)
profile.Data.Increased += 18000
profile.Data.startTime += 18000
end,
[2472151759] = function(profile)
profile.Data.Increased += 180000
profile.Data.startTime += 180000
end,
[2472158993] = function(profile)
profile.Data.Increased += 432000
profile.Data.startTime += 432000
end,
[2471670746] = function(profile)
profile.Data.Increased -= 10
profile.Data.startTime -= 10
end,
[2471679653] = function(profile)
profile.Data.Increased -= 40
profile.Data.startTime -= 40
end,
[2471687269] = function(profile)
profile.Data.Increased -= 120
profile.Data.startTime -= 120
end,
[2471697038] = function(profile)
profile.Data.Increased -= 240
profile.Data.startTime -= 240
end,
[2471706809] = function(profile)
profile.Data.Increased -= 600
profile.Data.startTime -= 600
end,
[2471729978] = function(profile)
profile.Data.Increased -= 1200
profile.Data.startTime -= 1200
end,
[2471744372] = function(profile)
profile.Data.Increased -= 7200
profile.Data.startTime -= 7200
end,
[2471760329] = function(profile)
profile.Data.Increased -= 72000
profile.Data.startTime -= 72000
end,
[2471771714] = function(profile)
profile.Data.Decreased -= 172800
profile.Data.startTime -= 172800
end,
},
PurchaseIdLog = 50,
}