NokiMo
__ess__
__ess__

patreon


Claw machine mini-game is now COMPLETED and available for download!

The claw machine mini-game I mentioned earlier is now completed and available for download in this post. I also made a tutorial PDF which goes into some of the functionality of the mini-game so you can learn more about it. 😊

Documenting and explaining the code takes a bit more effort and time to do, so I'm posting this script in the Voting tier, which is accessible by anyone in the Voting tier or higher.

The claw machine script works pretty much the same as in real-life in terms of mechanics. You input coins according to the cost of using the machine by using the "c" key, and then get to control the claw arm with the arrow keys on the keyboard.

To attempt at grabbing an item you press the "x" key. The prize is picked with a function that randomly picks an item from a prize list, depending on how likely it is to be picked. The likelihood is based on "weights" using the Python random function called "choices". I've have linked to information sources about this function in the PDF.

Study the code and read the PDF so you can learn more how it works and then go ahead and customize it you your needs. For help with customizing the script with extra functionality, I have the Script Support tier. Send me a message before joining and explain what you'd like to have done so I can let you know if I can help you with it.

If you still have questions about this script, feel free to leave them in the comments of this post or by messaging me.

If you enjoy this script, do leave a comment and a like on this post to let me know. Feedback is invaluable and helps me when making more mini-games and informative content on my Patreon. Thank you!

Updates

V.1.0.1 (2025-07-25) - I've renamed the "claw_machine_won" screen to "claw_machine_result" and added a parameter "result" to it, which should be supplied the value "won" or "lost". This is so you can use this screen for showing the user both if they won or lost. The PDF tutorial has been updated for this as well.

Claw machine mini-game is now COMPLETED and available for download!

Comments

Just tested it out, it works beautifully :) looking forward to future work x you just keep getting better and better

Melanie

You are amazing, ess !

ClΓ©lie G


Related Creators