Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ::compbeg::
- local component = require("component")
- local gpu = component.gpu
- local colors = require("colors")
- local width, height = gpu.getResolution()
- local text = "Project Axium"
- gpu.setBackground(0x000000)
- print("Project Axium 0.02")
- os.sleep(1)
- ::beg::
- os.execute("cls")
- print("what is the Hero's name")
- local name = io.read("*l")
- local health = 100
- local damage = 1
- local critC = 10
- local missC = 5
- local ress = 1
- local CordX = 0
- local CordZ = 0
- local Cname = "error"
- local Chealth = 1
- local Cdamage = 1
- local exp = 0
- local nedexp = 0
- local option = 0
- local randoN = 0
- local chosenN = 0
- local Tdamage = 0
- local coins = 0
- local firebcoold = 0
- nedexp = nedexp + 1
- --mobs!
- local slimeN = "Slime"
- local slimeH = 10
- local slimeA = 1
- local bunnyN = "Bunny"
- local bunnyH = 15
- local bunnyA = 3
- local skeletonN = "Skeleton"
- local skeletonH = 20
- local skeletonA = 5
- local witchN = "Witch"
- local witchH = 20
- local witchA = 8
- local ghostN = "ghost"
- local ghostH = 3
- local ghostA = 15
- local babydN = "Baby Dragon"
- local babydH = 100
- local babydA = 50
- local option2 = 0
- local option3 = 0
- local burning = 0
- ::home::
- local endsceneC = math.random(0, 100)
- local runchance = math.random(1, 4)
- local Rmob = math.random(0, 100)
- local mobspawnC = math.random(0, 100)
- gpu.setBackground(0x005050)
- if exp >= nedexp then
- goto lvlup
- end
- os.execute("cls")
- print("Welcome " .. name .. "!")
- print("Stats:")
- print("coins = " .. coins)
- print("X = " .. CordX .. " Z = " .. CordZ)
- print("Health = " .. health .. " Damage = " .. damage)
- print("Crit chance = " .. critC .. "% miss chance = " .. missC .. "%")
- print("resistance = " .. ress)
- print("XP = " .. exp .. " of " .. nedexp)
- print("")
- print("what would you like to do?")
- print("1) move")
- print("2) inventory")
- option = io.read("*l")
- if option == "1" then
- goto move
- elseif option == "2" then
- goto inventory
- elseif option == "adminOV" then
- goto adminpanel
- else
- goto home
- end
- ::adminpanel::
- gpu.setBackground(0x000000)
- os.execute("cls")
- print("1) add exp")
- print("2) add damage")
- print("3) add health")
- print("4) add resistance")
- print("5) add coins")
- print("6) change coords")
- print("7) back")
- option = io.read("*l")
- if option == "1" then
- print("how much?")
- option = io.read("*n")
- exp = exp + option
- elseif option == "2" then
- print("how much?")
- option = io.read("*n")
- damage = damage + option
- elseif option == "3" then
- print("how much")
- option = io.read("*n")
- health = health + option
- elseif option == "4" then
- print("how much?")
- print("hint: dont go crazy. max 10")
- option = io.read("*n")
- ress = ress + option
- elseif option == "5" then
- print("how much?")
- option = io.read("*n")
- coins = coins + option
- elseif option == "6" then
- print("CordX =")
- option = io.read("*n")
- CordX = option
- print("CordZ =")
- option = io.read("*n")
- CordZ = option
- elseif option == "7" then
- goto home
- end
- goto adminpanel
- ::move::
- coins = coins + 1
- os.execute("cls")
- print("what direction would you like to go?")
- print("1) north -Z")
- print("2) east +X")
- print("3) south +Z")
- print("4) west -Z")
- option = io.read("*l")
- if option == "1" then
- CordZ = CordZ - 1
- goto chance
- elseif option == "2" then
- CordX = CordX + 1
- goto chance
- elseif option == "3" then
- CordZ = CordZ + 1
- goto chance
- elseif option == "4" then
- CordX = CordX - 1
- elseif option == "adminOV" then
- print("which mob should appear next?")
- print("1)slime 2)bunny 3)witch")
- print("4)ghost 5)baby dragon")
- option2 = io.read("*l")
- if option2 == "1" then
- Rmob = 39
- elseif option2 == "2" then
- Rmob = 41
- elseif option2 == "3" then
- Rmob = 71
- print("trigger end scene?")
- print("Y/n")
- option = io.read("*l")
- if option == n then
- print("oof")
- else
- endsceneC = 49
- end
- elseif option2 == "4" then
- Rmob = 91
- elseif option2 == "5" then
- Rmob = 96
- end
- mobspawnC = 100
- goto move
- else
- goto move
- end
- ::chance::
- if CordX == 100 and CordZ == 100 then
- os.execute("cls")
- print("you have entered the village of cento")
- print("what would you like to do?")
- print("1) shop")
- print("2) go to a doctors")
- print("3) visit a rune master")
- print("4) leave")
- option = io.read("*l")
- if option == "1" then
- os.execute("cls")
- print("what would you like to buy?")
- print("1) damage upgrades")
- print("2) back")
- option2 = io.read("*l")
- if option2 == "1" then
- print("that'l be 400 coins")
- print("y/n")
- option3 = io.read("*l")
- if option3 == "y" then
- if coins >= 400 then
- print("alrighty then")
- os.sleep(2)
- coins = coins - 400
- damage = damage + 1
- else
- print("you aint got enugh lad, sorry")
- os.sleep(2)
- end
- end
- goto chance
- elseif option2 == "2" then
- goto chance
- else
- goto chance
- end
- elseif option == "2" then
- os.execute("cls")
- print("do you need some potions?")
- print("im afraid their 200 dollars a piece")
- print("y/n")
- option2 = io.read("*l")
- if option2 == "y" then
- if coins >= 200 then
- print("commin right up")
- os.sleep(2)
- coins = coins - 200
- health = health + 20
- else
- print("oh sorry, but you only have " .. coins)
- os.sleep(2)
- end
- elseif option2 == "n" then
- goto chance
- end
- goto chance
- elseif option == "3" then
- os.execute("cls")
- print("you came for runes, right?")
- print("that'l be 800 coins")
- print("hope that aint a problem")
- print("y/n")
- option2 = io.read("*l")
- if option2 == "y" then
- if coins >= 800 then
- print("whatever, heres your rune")
- os.sleep(3)
- ress = ress + 1
- goto chance
- else
- print("what are you trying to scam me with")
- print("only " .. coins .. " coins!?")
- print("get outa here!")
- os.sleep(4)
- goto chance
- end
- else
- goto chance
- end
- else
- os.execute("cls")
- print("what direction would you like to go?")
- print("1) north -Z")
- print("2) east +X")
- print("3) south +Z")
- print("4) west -Z")
- option = io.read("*l")
- if option == "1" then
- CordZ = CordZ - 1
- elseif option == "2" then
- CordX = CordX + 1
- elseif option == "3" then
- CordZ = CordZ + 1
- elseif option == "4" then
- CordX = CordX - 1
- end
- goto home
- end
- end
- --mob appear chance
- if mobspawnC >= 50 then
- print("50!")
- if Rmob <= 40 then
- Cname = slimeN
- Chealth = slimeH
- Cdamage = slimeA
- CThealth = Chealth
- print(Cname)
- print(Chealth)
- print(Cdamage)
- goto battle
- elseif Rmob >= 41 and Rmob <= 70 then
- Cname = bunnyN
- Chealth = bunnyH
- Cdamage = bunnyA
- CThealth = Chealth
- goto battle
- elseif Rmob <= 80 and Rmob >= 71 then
- Cname = witchN
- Chealth = witchH
- Cdamage = witchA
- CThealth = Chealth
- goto battle
- elseif Rmob <= 94 and Rmob >= 81 then
- Cname = ghostN
- Chealth = ghostH
- Cdamage = ghostA
- CThealth = Chealth
- goto battle
- elseif Rmob >= 95 then
- Cname = babydN
- Chealth = babydH
- Cdamage = babydA
- CThealth = Chealth
- goto battle
- end
- else
- goto home
- end
- ::battle::
- randoN = math.random(0, 10)
- gpu.setBackground(0xff2020)
- os.execute("cls")
- if health <= 0 then
- gpu.setBackground(0xff0303)
- os.sleep(0.5)
- print("you have died!")
- os.sleep(2)
- print("thats sad")
- os.sleep(2)
- print("final coins = " .. coins)
- print("press enter to leave")
- option = io.read("*l")
- goto compbeg
- end
- print(Cname .. " Has appeared")
- print("health = " .. Chealth)
- print("damage = " .. Cdamage)
- if burning >= 1 then
- print("BURNING!")
- end
- print("")
- print(name)
- print("health = " .. health)
- print("damage = " .. damage)
- print("")
- print("what will you do")
- print("1) attack")
- print("2) run")
- option = io.read("*l")
- if option == "1" then
- print("select type of attack")
- print("1) light")
- print("2) heavy(sometimes backfires)")
- print("3) fireball")
- option2 = io.read("*l")
- if option2 == "1" then
- --attack chance
- if math.random(0, 1000) <= 5 then
- print("attack failed")
- os.sleep(2)
- goto obattle
- end
- Chealth = Chealth - damage
- print("attack successfull")
- os.sleep(2)
- if math.random(0, 100) <= 10 then
- print("The attack did more damage than expected!")
- print("you did twice the ammount of damage!")
- os.sleep(2)
- Chealth = Chealth - damage
- end
- if randoN >= 5 then
- print("your sword suddenly became very light")
- print("you attack twice")
- os.sleep(2)
- Chealth = Chealth - damage
- end
- if Chealth <= 0 then
- goto endbattle
- end
- elseif option2 == "2" then
- print("choose a number betwwen 1-10")
- chosenN = io.read("*n")
- if chosenN >= 11 then
- print("error to high of number")
- os.sleep(2)
- goto battle
- end
- randoN = randoN - 2
- chosenN = chosenN - randoN
- if chosenN - chosenN == 0 then
- print("")
- else
- chosenN = chosenN * -1
- end
- if chosenN >= 0 and chosenN <= 1 then
- os.execute("cls")
- print("you swung you sword but did no damage!")
- os.sleep(1)
- print("instead you brok your wrist!")
- print("-10 health!")
- health = health - 10
- os.sleep(2)
- elseif chosenN >= 2 and chosenN <= 4 then
- os.execute("cls")
- Tdamage = 1 * damage
- print("you did " .. Tdamage .. " damage")
- elseif chosenN >= 5 and chosenN <= 8 then
- os.execute("cls")
- Tdamage = 2 * damage
- print("you did " .. Tdamage .. " damage")
- elseif chosenN >= 9 and chosenN <= 10 then
- os.execute("cls")
- Tdamage = 3 * damage
- print("you did " .. Tdamage .. " damage")
- else
- print("now thats alot of damage!")
- Tdamage = 4 * damage
- print("you did " .. Tdamage .. " damage")
- os.sleep(3)
- end
- Chealth = Chealth - Tdamage
- if Chealth <= 0 then
- goto endbattle
- end
- elseif option2 == "3" then
- if firebcoold >= 1 then
- print("you are out of mana!")
- print("please wait to regain mana!")
- os.sleep(3)
- goto home
- end
- print("you cast fireball!")
- os.sleep(1)
- burning = damage * 2
- print("the enemy wil burn for " .. burning .. " turns")
- print("you do " .. damage / 2 .. " damage")
- os.sleep(3)
- firebcoold = 3
- end
- goto obattle
- elseif option == "2" then
- goto Attackrun
- elseif option == "adminOV" then
- Chealth = Chealth - Chealth
- if Chealth == 0 then
- goto endbattle
- end
- else
- goto battle
- end
- ::obattle::
- if burning >= 1 then
- print("the enemy is on fire! -" .. damage .. " health!")
- Chealth = Chealth - damage
- end
- if firebcoold >= 1 then
- firebcoold = firebcoold - 1
- end
- print("The " .. Cname .. " is trying to attack ")
- os.sleep(2)
- if math.random(1, 4) <= 2 then
- print("The attack landed!")
- print(Cdamage .. " damage!")
- health = health - Cdamage / ress
- os.sleep(2)
- else
- print("the attack failed!")
- os.sleep(1)
- end
- goto battle
- ::Attackrun::
- if Cname == babydN and randoN >= 2 then
- print("the baby dragon breathes fire on you")
- os.sleep(2)
- print("-10 health")
- os.sleep(1)
- health = health - 10
- goto obattle
- elseif Cname == babydN then
- print("you got away")
- os.sleep(1)
- print("somehow....")
- os.sleep(3)
- goto home
- end
- if math.random(0, 3) <= 1 then
- os.execute("cls")
- print("you have succsesfully ran away!")
- os.sleep(2)
- goto home
- else
- os.execute("cls")
- print("you failed to run away!")
- if runchance == 1 then
- print("while running away you stubbed your toe!")
- print("-1 health")
- health = health - 1 / ress
- elseif runchance == 2 then
- print("while running away the " .. Cname .. " hit you from behind!")
- print("-2 health!")
- health = health - 2 / ress
- end
- os.sleep(2)
- goto battle
- end
- ::endbattle::
- gpu.setBackground(0x949235)
- os.execute("cls")
- print("you win!")
- print("you got 10 coins")
- exp = exp + CThealth / 10
- coins = coins + 10
- print("you earned " .. exp .. " xp!")
- print("XP = " .. exp .. " of " .. nedexp)
- os.sleep(2)
- ::lvlup::
- gpu.setBackground(0x949235)
- os.execute("cls")
- if exp >= nedexp then
- print("you have leveled up!")
- print("1) increase health")
- print("2) increase damage")
- option = io.read("*l")
- if option == "1" then
- os.execute("cls")
- print("adding 10 health")
- health = health + 10
- print("health is now " .. health)
- os.sleep(2)
- elseif option == "2" then
- os.execute("cls")
- print("adding 1 damage!")
- damage = damage + 1
- print("damage is now " .. damage)
- os.sleep(2)
- else
- goto lvlup
- end
- exp = exp - nedexp
- nedexp = nedexp + 1
- end
- if Cname == witchN and endsceneC <= 50 then
- os.execute("cls")
- gpu.setBackground(0x0042b5)
- os.execute("cls")
- print("while leaving the battle field you stumble across a glowing rune")
- os.sleep(3)
- print("it feels like its calling to you....")
- os.sleep(3)
- print("do you take it?")
- print("Y/n")
- option = io.read("*l")
- if option == n then
- goto home
- else
- ress = ress + 1
- os.execute("cls")
- print("you reach for the glowing object")
- os.sleep(3)
- print("you can hear a humming sound comming from it")
- os.sleep(3)
- os.execute("cls")
- gpu.setBackground(0xb5001e)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0x000000)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0xb5001e)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0x000000)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0xb5001e)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0x000000)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0xb5001e)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0x000000)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0xb5001e)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0x000000)
- os.execute("cls")
- os.sleep(0.5)
- gpu.setBackground(0xffffff)
- os.execute("cls")
- os.sleep(2)
- gpu.setBackground(0x0042b5)
- os.execute("cls")
- print("your resistance has gone up!")
- os.sleep(5)
- end
- end
- goto home
- ::inventory::
- ::theend::
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement