Gift System | A very simple Gift System

Very simple GIFY SYSTEM

UPDATED
:package: giftsystem_dev_updated.rbxl (79.1 KB) :package:

Preview:

thank me later L o l :joy: :sparkling_heart: :sunglasses:

3 Likes

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”

:x: Wait

  • wait() is 1/30
  • task.wait() 1/framerate (~ 60fps)

:x: 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.
image

the ui is not scale properly too. You should use functions.

5 Likes

if you don’t explain what it actually is, we’re going to assume it’s literal garbage (judging by above post, it is)

3 Likes

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

2 Likes

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…)

2 Likes

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?

1 Like

I’m not saying that this is stolen with complete certainty. I’m just warning people that your track record isn’t the cleanest.

2 Likes
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

1 Like

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.

2 Likes