Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local oev=...
- local pe,qe,c=os.pullEventRaw,os.queueEvent,os.clock
- local l,t={lastYield=c()}
- if oev~=false and oev~=0 then
- function os.pullEventRaw(...)-- Just so you don't yield too much
- local y={pe(...)}
- l.lastYield=c()
- return unpack(y)
- end
- end
- function yin()--The whole point of the util; Call with `YIN()`
- t=c()
- if t-l.lastYield>=6.5 then
- qe("") pe()
- l.lastYield=t
- return true
- end
- end
- _G.YIN=setmetatable({},{__index=l,__call=yin,__metatable=false})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement