Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local choice = prompt("Player:","choice",table.unpack(getLoadedPlayers()))
- local x,y,z = getPlayerPos(choice)
- local x1,y1,z1 = getPlayerPos()
- local x = tonumber(x)
- if x == nil then
- local x = 0
- end
- local x1 = tonumber(x1)
- if x1 == nil then
- local x1 = 0
- end
- local y = tonumber(y)
- if y == nil then
- local y = 0
- end
- local y1 = tonumber(y1)
- if y1 == nil then
- local y1 = 0
- end
- local z = tonumber(z)
- if z == nil then
- local z = 0
- end
- local z1 = tonumber(z1)
- if z1 == nil then
- local z1 = 0
- end
- local num = x - x1
- local num = num * num
- local num2 = y - y1
- local num2 = num2 * num2
- local num3 = z - z1
- local num3 = num3 * num3
- local num4 = num + num2 + num3
- local num5 = math.sqrt(num4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement