Skip to content

Instantly share code, notes, and snippets.

@RouNNdeL
Last active July 10, 2024 20:48
Show Gist options
  • Save RouNNdeL/b0ea3435b09a5f8a882e1f900ebe1e36 to your computer and use it in GitHub Desktop.
Save RouNNdeL/b0ea3435b09a5f8a882e1f900ebe1e36 to your computer and use it in GitHub Desktop.
Lua script for Game Guardian for Geomatery Dash allowing to fly over a level
-- Note: Following software is presented for educational purposes only.
-- The developer shall not be held liable for any damages or legal
-- actions resulting from using the Software
function attempt_fly(start_y, set_y, speed)
gg.processPause()
gg.setRanges(gg.REGION_C_ALLOC)
gg.clearList()
gg.clearResults()
gg.searchNumber(start_y, gg.TYPE_FLOAT)
gg.searchAddress("??????40", 0xFF, gg.TYPE_FLOAT)
if gg.getResultCount() == 0 then return false end
p = gg.getResults(1)
p[1]['value'] = set_y
p[1]['freeze'] = true
p[1]['freezeType'] = gg.FREEZE_NORMAL
gg.addListItems(p)
gg.setSpeed(speed)
gg.setVisible(false)
gg.processResume()
return true
end
r = gg.getRanges()
options = gg.prompt(
{'Current height (in blocks)', 'Height to set', 'Speed to set', 'Small cube'},
{[1]=0, [2]=2700, [3]=15, [4]=false},
{[1]='number', [2]='number', [3]='number', [4]='checkbox'}
)
local begin
if options[4] then
begin = 99
else
begin = 105
end
local success = attempt_fly(begin + options[1] * 30, options[2], options[3])
if success then
print('Success')
else
print('Failure! Try changing the current height and/or cube type')
end
gg.setRanges(r)
MIT License
Copyright (c) 2019 Krzysztof "RouNdeL" Zdulski
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment