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.

1 Like