Very simple GIFY SYSTEM
UPDATED
giftsystem_dev_updated.rbxl (79.1 KB)
Preview:
What is this bro
game.Players.PlayerAdded:Connect(function(plr)
local plrgui = plr.PlayerGui
local totalclaimed = 0
local FreeGifts = plrgui:WaitForChild("ScreenGui").GiftsFrame
for i, v in pairs(FreeGifts.GiftsButtons:GetChildren()) do
if v:IsA("ImageButton") then
coroutine.wrap(function()
FreeGifts.TotalClaimed.Text = totalclaimed.."/9"
for i = v.ReqTime.Value, 0, -1 do
v.Timer.Text = tostring(math.floor(i/60))..":"..tostring(math.floor(i%60))
wait(1)
if i == 0 then
v.Timer.Text = "Claim!"
v.MouseButton1Click:Connect(function()
if i == 0 and v.isClaimed.Value == false then
v.isClaimed.Value = true
totalclaimed += 1
local typething = v.Type.Value
plr.leaderstats:FindFirstChild(typething).Value += v.Amount.Value
typething = nil
v.Timer.Visible = false
v.Claimed.Visible = true
FreeGifts.TotalClaimed.Text = totalclaimed.."/9"
if totalclaimed == 9 then
FreeGifts.TotalClaimed.Text = "Rejoin to restart gifts!"
end
end
end)
end
end
end)()
end
end
end)
You shouldnāt use on server side āplayerguiā and ābuttons connectionsā
Wait
pairs
you should do something like this:
for _, _, in workspace:GetChildren() do
-- something here
end
The indentation level is too big and and the timer is horrible, you could convert 0:1
to 0:01
.
the ui is not scale properly too. You should use functions.
if you donāt explain what it actually is, weāre going to assume itās literal garbage (judging by above post, it is)
Apologies for the inconvenience, But I didnāt make the Gui, My friend made it
I will use task.wait() next time
I will not use pairs/ipairs next time
I will put sounds on SoundService next time
I forgot to Auto scale the gui my self
I agree, not to mention this is likely reuploaded. The OP has been caught multiple times reuploading open source/free resources.
Here is one of those instances.
(I actually donāt know how this guy is STILL allowed to postā¦)
Iām pretty sure that one I was the fault, but IāM SURE IāM MADE THIS WITH MY FRIEND OR MY EYES LYING?
Iām not saying that this is stolen with complete certainty. Iām just warning people that your track record isnāt the cleanest.
game.Players.PlayerAdded:Connect(function(plr)
local plrgui = plr.PlayerGui
local totalclaimed = 0
local FreeGifts = plrgui:WaitForChild("ScreenGui").GiftsFrame
for _, v in ipairs(FreeGifts.GiftsButtons:GetChildren()) do
if v:IsA("ImageButton") then
coroutine.wrap(function()
FreeGifts.TotalClaimed.Text = totalclaimed.."/9"
for i = v.ReqTime.Value, 0, -1 do
v.Timer.Text = string.format("%d:%02d", math.floor(i/60), i%60)
task.wait(1)
if i == 0 then
v.Timer.Text = "Claim!"
v.MouseButton1Click:Connect(function()
if v.isClaimed.Value == false then
v.isClaimed.Value = true
totalclaimed += 1
local typething = v.Type.Value
plr.leaderstats:FindFirstChild(typething).Value += v.Amount.Value
typething = nil
v.Timer.Visible = false
v.Claimed.Visible = true
FreeGifts.TotalClaimed.Text = totalclaimed.."/9"
if totalclaimed == 9 then
FreeGifts.TotalClaimed.Text = "Rejoin to restart gifts!"
end
end
end)
end
end
end)()
end
end
end)
fixed it
I know, thatās my fault, Iām sorry to hear that
āsorry to hear that i love stealing from people and claiming it as my ownā
Iām sorry for stealing peopleās work and claiming that I made it, I know I made a problem
redownload for new update, thanks for nothing guys
Thank you so much for this! Really good module! Looking forward to this!
sarcasm
Rather than showing your ego, you should be sorry for what you did. You should actually be ashamed at such a moment, rather, you are showing your ego. I salute your confidence.
I understand as well, thanks, no one thanked me before
Donāt be ungrateful.
You need to make actual quality content if you want people to like you. You canāt just go making random stuff that wonāt benefit most people on the forums. You need to try impress the people. Mainly done by keeping your ego down. Youāll probably learn later on.