Help with alt detection

Before you say anything yes i know it is possible to bypass this.

I am making a simple alt detection system that uses the players clock and os time to log a players CPU start time when their banned but when making the system i was never able to get it down to the millisecond everytime i run it it only works with the whole numbers i tried turning the decimals into a whole number and then doing the stuff that way but it still didn’t work, here is the code to calculate it

local clock = os.clock()
local time = os.time()

print('Clock - '..math.abs(math.floor(clock) - time))
print('Dec - '..math.abs(math.floor(clock - math.floor(clock)) - time))
print(math.abs(clock - time))

The first print is the calculation for the whole number in the player clock
The second one is showing that if you do the same thing but using the decimals it doesn’t stay the same unlike the whole numbers and the last one shows both put together

Sorry for the messy post

2 Likes

I’m pretty sure you’re issue is that you’re taking any decimals off the values with math.floor.

If you want to round a number to 3 decimal places try this

print('Difference = ', math.abs(((math.round(clock * 1000) / 1000) - ((math.round(time * 1000) / 1000)))

You should replace math.floor with math.round to get more accurate rounding since math.floor(9.9999) would equal 9.

I see where your getting the decimals but the point of this is to subtract the clock time from the os time to get the players CPU start time, I want it to be able to detect down to the milisecond and the whole numbers do but when I enable the decimals they are not constant their always changing

In the picture you can see the whole numbers are pretty much constant but the decimals are not how can I fix this

1 Like

How are you using this for “alt detection” exactly?

When you ban someone you take the players cpu start time, by putting that into a list u can check when someone else joins if they have the same start time it knows your an alt

highly unlikely for someone to have the same start time but that’s y I’m trying to get it down to the milisecond so that its 100% accurate

If your curious if it works or not you can check it out here

This even works when you shut off your PC if you have a windows PC, there are only a few ways around it

So after some testing and researching, I’ve came to the conclusion that it’s not possible because the os.clock() function in lua provides a time measurement in seconds with a lower resolution, rather than millisecond precision. This is due to roblox nothing you can really do about it.

I know this isn’t the answer you wish you heard but I’m pretty sure it’s not possible.

3 Likes

Crazy thing is that just 40 smthn minutes ago (from the time I’m writing this) they just released a new API (isVerified).

Now I know most players on Roblox prolly aren’t verified (myself included), you could use it for alt acc detection but you’d lose out on a lot of players.

2 Likes

That’s actually really cool and I may use it in the future. It’s also even better that roblox made it so you can only link a specific ID to a specific roblox account. Though, majority of players like you said aren’t verified. So this could be kinda problematic, especially for younger audience games where they may not have ID’s. Nevertheless, definitely still cool!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.