You are on page 1of 2

local accuracy = 0.

00
local totalNotesHit = 0
function onCreatePost()
setProperty('totalNotesHit', 0)
setProperty('scoreTxt.visible', false)
if getPropertyFromClass('ClientPrefs', 'downScroll') == false then
setProperty('botplayTxt.y', 536)
elseif getPropertyFromClass('ClientPrefs', 'downScroll') == true then
setProperty('botplayTxt.y', 126)
end
end
function onCreate()
setProperty('totalNotesHit', 0)
makeLuaText('oldScore', 'Score:' .. score .. ' | Combo Breaks:' .. misses ..
' | Accuracy:' .. truncateFloat(getProperty('ratingPercent'), 2) .. '% ' .. ' |
' .. getProperty('ratingName'), getProperty('healthBarBG.width'), 390, 300)
setTextSize('oldScore', 16)
addLuaText('oldScore')
if getPropertyFromClass('ClientPrefs', 'downScroll') == false then
setProperty('oldScore.y', 670)
elseif getPropertyFromClass('ClientPrefs', 'downScroll') == true then
setProperty('oldScore.y', 106)
end
end
function onRecalculateRating()
setTextString('oldScore', 'Score:' .. score .. ' | Combo Breaks:' .. misses
.. ' | Accuracy:' .. truncateFloat(getProperty('ratingPercent'), 2) .. '% ' .. ' |
' .. getProperty('ratingName'))
setProperty('oldScore.y', 700)
end

function truncateFloat(number, precision)


num = number
num = num * math.pow(10, precision)
return num
end

local totalPlayed = 1

function updateAccuracy()
totalPlayed = totalPlayed + 1
setProperty(getProperty('ratingPercent'), Math.max(0,
getProperty('totalNotesHit') / totalPlayed * 100))
end
function onUpdate()
if downscroll then -- downscroll only
setProperty('oldScore.y', 106)
end
if ratingName == '?' then
setRatingName('N/A') --When there are no notes
end
if ratingName == 'You Suck!' then
setRatingName('D') --From 0% to 19% of accuracy
end
if ratingName == 'Shit' then
setRatingName('D') --From 20% to 39% of accuracy
end
if ratingName == 'Bad' then
setRatingName('C') --From 40% to 49% of accuracy
end
if ratingName == 'Bruh' then
setRatingName('C') --From 50% to 59% of accuracy
end
if ratingName == 'Meh' then
setRatingName('B') --From 60% to 68% of accuracy
end
if ratingName == 'Nice' then
setRatingName('B') --69% of accuracy :bruh:
end
if ratingName == 'Good' then
setRatingName('A') --From 70% to 79% of accuracy
end
if ratingName == 'Great' then
setRatingName('AA') --From 80% to 89% of accuracy
end
if ratingName == 'Sick!' then
setRatingName('AAA') --From 90% to 99% of accuracy
end
if ratingName == 'Perfect!!' then
setRatingName('MFC') --100% of accuracy
end
if ratingName == '?' and botPlay == true then
setRatingName('N/A') --When the botplay is activated
end
end

You might also like