Hey Devs,
(Credits for this Script to a guy on YouTube (forgot his name))
Part = script.Parent
DataStore = game:GetService("DataStoreService"):GetDataStore("RankRewards2")
Debounce = true
function PlayerAdded(Player)
local Time = DataStore:GetAsync(Player.UserId)
if not Time or (os.time() - Time) > 86400 then
game.ReplicatedStorage.Network.UpdateChests:FireClient(Player, "Update")
else
game.ReplicatedStorage.Network.UpdateChests:FireClient(Player, "Brake")
end
end
function Touched(Hit)
local Humanoid = Hit.Parent:FindFirstChild("Humanoid")
if Humanoid then
local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
if Debounce == true then
if Player:IsInGroup(13278651) then
Debounce = false
if Player ~= nil then
local Time = DataStore:GetAsync(Player.UserId)
if not Time or (os.time() - Time) > 86400 then
DataStore:SetAsync(Player.UserId, os.time())
game.ReplicatedStorage.Network.UpdateChests:FireClient(Player, "Brake")
print("Player Redeemed!")
else
print("Not Ready Yet!")
end
end
Debounce = true
else
print("You are not in our group!")
end
end
end
end
game.Players.PlayerAdded:Connect(PlayerAdded)
Part.Touched:Connect(Touched)
This script is a free model tho. The model has a billboard gui and (as I wanted it) it just stops at 0 time the problem is it doesn’t says how long the player has to wait… it just say Ready or Not Ready
Here is the local script:
game.ReplicatedStorage.Network.UpdateChests.OnClientEvent:Connect(function(Type)
if Type == "Brake" then
game.Workspace.Activations.GroupRewards.Show.Other.Text = "NOT READY!"
elseif Type == "Update" then
game.Workspace.Activations.GroupRewards.Show.Other.Text = "READY!"
end
end)
is there a way that you make a timer 00:00:00 which goes down?