Whenever you press the "Buy" button it purchases everything multiple times but what I am trying to make it do is purchase something one time only and then remove the "Buy" button.
Here are some screenshots and a GIF for better visual understanding:
https://gyazo.com/06de0f72058726c034ea09ee15eac2f8 https://gyazo.com/af16c0e1354b9db5d441cf4fa62efab3 https://gyazo.com/b234238bae1304c13224bf3f95f0601e
mosski123 is right adding a debounce will fix your problem
in the mousebutton 1 down
local x = false if x == false --purchase item x = true end -- if you want them to buy it again later just set it back to false