Creating a Crate/Spin System

I’ve constantly thought about how-to do this, and made similar things (Not Including Spinning) Because honestly, I was completely oblivious; to where, you could show only portions of a Gui (Besides Sprite Sheets). Basically, I had no freaking clue that Clip Descendants could do this. Lol.

Thanks a lot!

1 Like

Would you make a system that works with this like an inventory system or a skin/weapon system?

1 Like

While it’s not completely supported, you should probably factor the ArePaidRandomItemsRestricted key from the return of GetPolicyInfoForPolicyAsync.

It’s future proofing for when they actually implement it, since lootboxes are prohibited in some countries, ie: Belgium

2 Likes

@TheBigC10

This may be something I explore in the future, thanks for the suggestion.


@FilteredDev

Lootboxes/spinners aren’t strictly prohibited, it’s the paid factor behind them that is. This tutorial focuses on the functioning and design behind a spinner, as apposed to its implementation, therefore ArePaidRandomItemsRestricted isn’t something I plan to include.

1 Like

Hello! I really like this method, but I have faced a problem here: The leaderstats aren’t DataStored, (meaning that the cash remaining, items and inventory won’t save after you leave the game) and when I add my own DataStored leaderstats with the same name it loads the number 10 or 15 in the 3 leaderstats. I hope you can help me fix that!

This tutorial is purely on the functioning and design behind a spinner, as apposed to saving the values used and generated within it.

I’m looking to release a module to assist with data saving, loading, etc in the upcoming months; for the time being you’ll have to create your own datastore system or explore pre-made ones such as DataStore2.

1 Like

I’m kinda confused as to what the variable spinDe is supposed to be. Should it be true?

(It’s a debounce I’m guessing)


EDIT:
Ok so I’m skipping ahead and I found this:

I want the player to be able to get them infinite amount of times. How would I do that?

There might be things where I want to change it, so please help!

EDIT 2: Oh wait.

do I just get rid of that line then?

1 Like

Loving this system! Well made and works just how i would want it to. Keep up the amazing work!

What about if you want to use this system and add multiple crates with different items?

Still need help on this. If you are still replying to this please tell me how I am supposed to do this! It’s been about 2 months!

1 Like
2 Likes

How could i add more crates? An older reply about that doesn’t seem to work for me

4 Likes

hello there! i know im really late here, but i wanted to ask a quite important question, Is there any way to make the Crate/Spin System give tools instead of just Decals? Would be appreciated if i can get an answer! Thank You.

3 Likes

How would make it so that it rewards the player, a tool to the starter pack/Backpack instead of a value in leaderstats? Sorry I’m new to this and your tutorial is the only one out there that actually make sense.

Yeah same here , if you somehow found a way could , you also tell me how? thank you.

Define Player.Bacpack. Clone your tool. Make clone parent to Player.Backpack

1 Like

Thank you for your reply, ill try this now.
I have another question, seeing how this script gets the name of the object like for example “Bank”
How would you script it so that they are rewarded all the children of “Bank”, so like the tools in a folder named “Bank” are rewarded?


local ServerStorage = game:GetService("ServerStorage") --// I remember Crate/Spin script is on server so please do this in server

local Bank = ServerStorage:WaitForChild("Bank")

--// FindFirstChild is to check if this Model Exist.
if Bank:FindFirstChild(ToolName) then
   local Tool =  Bank:FindFirstChild(ToolName):Clone()
   local  Backpack = player.Backpack
   Tool.Parent = Backpack

else
   warn("There is no tool with this name that exist")
end
2 Likes

Thank you so much… your first reply worked and I’ll try this one, thank you once again.

1 Like

Sounds like fun! I am going to check out the different crates and see what’s inside. :slightly_smiling_face: