This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function switch( expr, default ) | |
| return function( check ) | |
| for name, func in pairs(check) do | |
| if expr == name then return func() end | |
| end | |
| if default then | |
| assert(type(default) == "function", "default must be a function") | |
| return default() | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local explode = function(div,str,replstr,includeDiv) | |
| if (div=='') then return false end | |
| local pos,arr = 0,{} | |
| for st,sp in function() return string.find(str,div,pos,false) end do | |
| tableinsert(arr,string.sub(replstr or str,pos,st-1+(includeDiv and #div or 0))) | |
| pos = sp + 1 | |
| end | |
| tableinsert(arr,string.sub(replstr or str,pos)) | |
| return arr | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --[[ | |
| Breakout!! for CC | |
| By EldidiStroyrr | |
| get with: | |
| pastebin get LTRYaSKt breakout | |
| std pb LTRYaSKt breakout | |
| TODO | |
| -fix flickering | |
| -make cooler |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --[[ | |
| Breakout!! for CC | |
| By EldidiStroyrr | |
| get with: | |
| pastebin get LTRYaSKt breakout | |
| std pb LTRYaSKt breakout | |
| TODO | |
| -make cooler | |
| --]] |