Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if bhopapi then
- warn("Bhop api is already open.")
- else
- print("Bhop api is back :partying_face: :tada:")
- local setconstant = debug.setconstant or setconstant
- local getconstants = debug.getconstants or getconstants
- local getupvalues = debug.getupvalues or getupvalues
- local setupvalues = debug.setupvalues or setupvalues
- local getinfo = debug.getinfo or getinfo
- local pcall = pcall
- local type = type
- local pairs = pairs
- local getgc = debug.getgc or getgc or get_gc_objects
- local a = is_protected_closure or function()
- return false
- end
- local b = false
- local c
- local d
- local e
- local f
- for g, h in pairs(getgc()) do
- if type(h) == "function" and not a(h) then
- pcall(
- function()
- if not b and getinfo(h)["source"]:find("Movement") then
- for i, j in pairs(getconstants(h)) do
- if j == 2.7 and c == nil then
- c = {[1] = h, [2] = i, [3] = j}
- elseif j == 18 and d == nil then
- d = {[1] = h, [2] = i, [3] = j}
- elseif j == 90 and f == nil then
- f = {[1] = h, [2] = i, [3] = j}
- end
- end
- for i, j in pairs(getupvalues(h)) do
- if (j == -50 or j == -100) and e == nil then
- e = {[1] = h, [2] = i, [3] = j}
- end
- end
- if c ~= nil and d ~= nil and f ~= nil and e ~= nil then
- b = true
- end
- end
- end
- )
- end
- end
- getgenv().setgains = function(k)
- setconstant(c[1], c[2], c[3] * (k or 1))
- end
- getgenv().setwalkspeed = function(l)
- setconstant(d[1], d[2], l or d[3])
- end
- getgenv().setfriction = function(k)
- setconstant(f[1], f[2], f[3] * (k or 1))
- end
- getgenv().setgravity = function(k)
- setupvalue(e[1], e[2], e[3] * (k or 1))
- end
- end
- getgenv().bhopapi = true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement