i am working on OMG script for very long work i know how to run it style it and move objects it but i cant script it i am giving you an lua can you please make it script for me i dont know how to make it
function omg_script33()
abpartition11 = createObject(2591, 429.79998779297, 2548.3000488281, 17.89999961853, 0, 0, 0)
omgMoveabpartition11(1)
abpartition12 = createObject(2591, 429.79998779297, 2544.8000488281, 17.89999961853, 0, 0, 180)
omgMoveabpartition12(1)
end
function omgMoveabpartition11(point)
if point == 1 then
moveObject(abpartition11, 5000, 429.79998779297, 2551.8999023438, 17.89999961853, 0, 0, 0)
setTimer(omgMoveabpartition11, 5000, 1, 2)
elseif point == 2 then
moveObject(abpartition11, 5000, 429.79998779297, 2548.3000488281, 17.89999961853, 0, 0, 0)
setTimer(omgMoveabpartition11, 5000, 1, 1)
end
end
function omgMoveabpartition12(point)
if point == 1 then
moveObject(abpartition12, 5000, 429.89999389648, 2541.1999511719, 17.89999961853, 0, 0, 0)
setTimer(omgMoveabpartition12, 5000, 1, 2)
elseif point == 2 then
moveObject(abpartition12, 5000, 429.79998779297, 2544.8000488281, 17.89999961853, 0, 0, 0)
setTimer(omgMoveabpartition12, 5000, 1, 1)
end
end
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), omg_script33)
can you make it like if player comes near it it opens and if player goes away from it it closes pleasecan you help me