billcost = io.read('*n') --[[billcost is the variable for original cost.--]]
if(billcost >= 5000 and billcost < 10000)--[[checking if original cost is more than 5000 and
 less than 10000--]]
then
    newcost = billcost-500 --[[making variable newcost to keep discount added amount.--]]
    print('The amount that you have to pay is Rs.',newcost)
elseif(billcost >= 10000 and billcost < 15000)--[[checking if original cost is more than 10000
    and less than 15000--]]
then
    newcost = billcost-750--[[updating variable newcost to keep discount added amount.--]]
    print('The amount that you have to pay is Rs.',newcost)
elseif(billcost >= 15000)--[[Checking if original cost is more than 15000.--]]
then
    newcost = billcost-1000--[[updating variable newcost to keep discount added amount.--]]
    print('The amount that you have to pay is Rs.',newcost)
else--[[updating variable newcost to keep discount added amount.--]]
    newcost = billcost
    print('The amount that you have to pay is Rs.',newcost)
end

Embed on website

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