Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

HOW THE HECC DO I ADD A DATASTORE TO MY SCRIPT IDK ABOUT CODING?

Asked by 3 years ago
Edited 3 years ago

sorry for being rude but i have asked this in my previous question on how do I add datastore well I don't know scripting I know nothing about it so please can you guys help me?

the script

local Chest = game.Workspace.Chest

local Chest2 = game.Workspace.CHEST2

local Lower = Chest2.NameTag.Lowertext

local debounce = false

local dailyreward = 250

Lower.Text = dailyreward

game.Players.PlayerAdded:Connect(function(plr)
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = plr

    local cash = Instance.new("IntValue")
    cash.Name = "Gold"
    cash.Value = 50
    cash.Parent = leaderstats

    Chest.Touched:Connect(function()
        if not debounce then
            debounce = true
            cash.Value = cash.Value + dailyreward
            for v = 60, 0, -1 do
                for b = 60, 0, -1 do
                    Lower.Text = "Come Back In "..v.." Minutes, "..b.." Seconds!"
                    wait(1)
                end
            end
            debounce = false
            Lower.Text = dailyreward
        end
    end)
end)

1 answer

Log in to vote
1
Answered by
MattVSNNL 620 Moderation Voter
3 years ago

Try watching this

https://www.youtube.com/watch?v=n1UpT2csAzo

Ad

Answer this question