Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local print = epoe.Print
- local max = Vector(1,1,1) * 32768
- local function HashToPos(pos)
- pos = pos + max
- pos = pos * 2
- local x = math.floor(pos.x)
- local y = math.floor(pos.y)
- local z = math.floor(pos.z)
- return tonumber(string.format("0x%x%x%x", x, y, z))
- end
- local function PosToHas(num)
- local x = bit.band(num, 0xffff00000000) / 2
- local y = bit.band(num, 0x0000ffff0000) / 2
- local z = bit.band(num, 0x00000000ffff) / 2
- return Vector(x, y, z) - max
- end
- local num = HashToPos(here)
- local vec = PosToHas(num)
- print(here)
- print(num)
- print(vec)
Advertisement
Add Comment
Please, Sign In to add comment