--Randomizing a math.random
math.randomseed(os.time())
              --The setup of coins 
local spin_cost = 100
local coins = math.random(100,500)
 if coins >= 100 then 
   repeat 
        coins = coins - spin_cost
    print("Doing a spin, you have "..coins)
   local count_spin = 1
        count_spin = count_spin + 1
    until coins < spin_cost
    --the inventory and skin 
local skin_gun = math.random(1,3)
local A = math.random(1,3)
local inventory = {"Shotgun", "Pistol", "Rifle"}
              --the skin
local skin = {"Red", "Blue", "Purple"}
for P = 1, #inventory do
end 
for I = 1, #skin do
end 
    if A == 1 then 
        print("You have "..inventory[A])
print("skin is "..skin[skin_gun])
elseif A == 2 then 
        print("You have "..inventory[A])
    print("skin is "..skin[skin_gun])
else 
  print ("You have " ..inventory[A])
print("skin is "..skin[skin_gun])
    end 
end 
            

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: