Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Variabels
- local x = 0
- local y = 0
- local z = 0
- -- Util Functions
- -- Functions
- function save()
- file = io.open("loc", "w+")
- while file==nil do end
- file.write("x: "+tostring(x))
- file.write("y: "+tostring(y))
- file.write("z: "+tostring(z))
- end
- function load()
- file = io.open("loc", "r")
- while file==nil do end
- for i in file.lines() do
- if string.starts(i, "x: ") then
- x = string.sub(i, 3)
- elseif string.starts(i, "y: ") then
- y = string.sub(i, 3)
- elseif string.starts(i, "z: ") then
- z = string.sub(i, 3)
- end
- end
- end
- -- Loop
- save()
- load()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement