-- Level = (1000 * Level) + 1000
local Level = 0
local requirement = (1000 * Level) + 1000
local BaseLevel = 0
local XP = 950
local Give = io.read("*line")
if Give == 'Kill' then
XP = (XP + 100) -- can change, kill exp
print('Enemy Kill | + 100 EXP')
elseif Give == 'Assist' then
local DMG = 100 -- STC *Damage done to other player*
XP = (XP + (DMG / 2)) -- assist formula *CAN CHANGE* (IF u change it change it on line 13 aswell)
print('Enemy Assisted Kill | +' .. (DMG / 2) .. ' EXP')
else
print('No exp given') -- idk why this matters its just here
end
if XP >= requirement then
print("You have leveled up to level " .. Level + 1)
Level = Level + 1 -- accounts for the level you just leveled up to
XP = 0
end
-- output for final EXP
print('XP COUNTER : ' .. XP)
-- formula = (base + level) * (1.01 + (level/100) * level)
-- credit config
local base = 175 -- if you want you can change this but i wouldnt
local credits = (base + Level) * (1.01 + (Level/100) * Level)
print("")
print("Your credit count is " .. credits) -- displays the total credits you have
To embed this project on your website, copy the following code and paste it into your website's HTML: