It encrypts the orignal value and hashes this encrypted value after this. Good look to cheat.. :)
Code: Select all
type anticheat
value as integer
key as integer
hash as integer
declare sub set (v as integer)
declare function get as integer
end type
sub anticheat.set (v as integer)
key = int(rnd*999999999)
value = v xor key
hash = key + value
end sub
function anticheat.get as integer
if hash = key + value then
return value xor key
else
return 0
end if
end function
'###example starts here###
dim as anticheat score
score.set 10000
Print "CHEAT ME! INCRASE WITH + / DECRASE WITH -"
do
locate 2
print score.get
select case input(1)
case "+"
score.set score.get + 1
case "-"
score.set score.get - 1
case else
exit do
end select
loop