So i have already created some admin commands and they have Admin check so only me can use them and they working, i am succesfully created time script and displaying time into label, but i can't figure out for 3 days how to make admin chat command to just change Multiple variable to another number by it to speed up time.
local TimeUpdate = game:GetService("ReplicatedStorage"):FindFirstChild("TimeUpdate")
local utils = require(game.ServerScriptService.AdminCommands.SpecialDescription:FindFirstChild("CommandUtils"))
local Players = utils.Players
local TimeCounter = {}
TimeCounter.Multiple = 1
TimeCounter.TotalTime = 0
TimeCounter.Minutes = 0
TimeCounter.Hours = 0
TimeCounter.Days = 0
TimeCounter.Months = 0
TimeCounter.Years = 0
while true do
TimeCounter.TotalTime = TimeCounter.TotalTime + TimeCounter.Multiple
TimeCounter.Minutes = TimeCounter.Minutes + TimeCounter.Multiple
if TimeCounter.Minutes >= 60 then
TimeCounter.Hours = TimeCounter.Hours + math.floor(TimeCounter.Minutes / 60)
TimeCounter.Minutes = TimeCounter.Minutes % 60
end
if TimeCounter.Hours >= 24 then
TimeCounter.Days = TimeCounter.Days + math.floor(TimeCounter.Hours / 24)
TimeCounter.Hours = TimeCounter.Hours % 24
end
if TimeCounter.Days >= 30 then
TimeCounter.Months = TimeCounter.Months + math.floor(TimeCounter.Days / 30)
TimeCounter.Days = TimeCounter.Days % 30
end
if TimeCounter.Months >= 12 then
TimeCounter.Years = TimeCounter.Years + math.floor(TimeCounter.Months / 12)
TimeCounter.Months = TimeCounter.Months % 12
end
TimeUpdate:FireAllClients(TimeCounter.Years, TimeCounter.Months, TimeCounter.Days, TimeCounter.Hours, TimeCounter.Minutes)
wait(1)
end
** You are now Level 1! **