I have this script that I want to make give the player an item when they click it(only if they have the gamepass), and yes I'm sure there could be some way that you could use for i = 1.60 +1 do for the countdown but I typed it all out instead.
local gamepass = script:WaitForChild("4835177") --the gamepass id
)
local item = game:GetService("ReplicatedStorage"):WaitForChild("Bloxy Cola")
local service = game:GetService("GamePassService")
local db = true
script.Parent.MouseClick:Connect(function(hit) -- idk if i should use hit here
if service:PlayerHasPass(player,gamepass.Value) then -- if they have the gamepass
item:Clone().Parent = player.Backpack
wait(1)
script.Parent.BillboardGui.TextBox.Text = "60"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "59"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "58"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "57"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "56"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "55"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "54"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "53"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "52"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "51"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "50"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "49"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "48"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "47"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "46"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "45"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "44"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "43"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "42"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "41"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "40"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "39"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "38"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "37"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "36"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "35"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "34"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "33"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "32"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "31"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "30"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "29"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "28"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "27"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "26"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "25"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "24"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "23"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "22"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "21"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "20"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "19"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "18"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "17"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "16"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "15"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "14"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "13"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "12"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "11"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "10"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "9"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "8"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "7"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "6"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "5"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "4"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "3"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "2"
wait(1)
script.Parent.BillboardGui.TextBox.Text = "1"
wait(1)
script.Parent.BillboardGui.TextBox.Text = " "
script.Parent.Transparency=1
wait(1)
script.Parent.Transparency=0
db = true
end
end

1 comment
But why would you type it all out? There's literally no benefit. for i = 60, 1, -1 do script.Parent.BillboardGui.Textbok.Text = tostring(i) wait(1) end