Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Show all Bully's environment (Global Variables)
- This is for modding purpose only. Ignore this if you don't know.
- What this script do is to show all Bully's global variables.
- Because Anniversary Edition & Scholarship Edition of Bully version has some variables that doesn't exist in other edition.
- Toggle UI: [X] (SE), or zoom out (AE)
- Navigation:
- - Next: [Right arrow] (SE), or jump button (AE)
- - Previous: [Left arrow] (SE), or weapon select button (AE)
- Fast scroll:
- - AE: hold jump button & move analog up, down, left, or right
- - SE: hold left or right arrow
- Change display option to show key or value only: zoom in (AE)
- ]]
- function main()
- while not SystemIsReady() do
- Wait(0)
- end
- -- Localization:
- local len = _G.table.getn
- local str = _G.tostring
- -- Create & insert:
- shared.GLOBAL_VAR = {s = 1, show = false, showKeyOnly = true}
- for k, v in pairs(_G) do
- shared.GLOBAL_VAR[len(shared.GLOBAL_VAR)+1] = {str(k), str(v)}
- end
- -- Sort the table in ascending order:
- table.sort(shared.GLOBAL_VAR, function(a, b)
- return a[1] < b[1]
- end)
- shared.ScholarshipEdition = type(_G["ClassMusicSetPlayers"]) == "function" -- To detect whether the user playing on AE or SE version of Bully game.
- local scroll = GetTimer()
- if not shared.ScholarshipEdition then
- scroll = nil
- end
- local FastScroll
- FastScroll = function(buttonId, controller)
- if shared.ScholarshipEdition then
- if IsButtonPressed(buttonId, controller) then
- if GetTimer() >= scroll+500 then
- return true
- end
- end
- if IsButtonBeingReleased(buttonId, controller) then
- scroll = GetTimer()
- end
- return false
- else
- if IsButtonHeld(8, 0) then
- if GetStickValue(16, 0) >= 0.5 or GetStickValue(17, 0) >= 0.5 then
- return "NavUp"
- elseif GetStickValue(16, 0) <= -0.5 or GetStickValue(17, 0) <= -0.5 then
- return "NavDwn"
- end
- --return true
- end
- return false
- end
- --return
- end
- local print
- print = function(text, size) -- size: 1(big); 2(small)
- if shared.ScholarshipEdition then
- TextPrintString(text, 0.1, size)
- else
- _G[size == 1 and "MinigameSetChapterCompletion" or "MinigameSetAnnouncement"](size == 1 and ''--[[yellow text]] or str(text), size == 1 and str(text) or true, size == 1 and true or nil, size == 1 and 0 or nil)
- end
- end
- -- testing:
- --PlayerSetEnableFirstPerson(true) -- nothing
- --CameraSetSpeed(math.random(100)) -- nothing
- --[[TextPrintString(GetLanguage(), 3, 1) -- 0
- Wait(3000)]]
- --[[while not IsButtonBeingPressed(14, 0) do
- Wait(0)
- if IsButtonBeingPressed(3, 0) then
- local fontStyle = math.random(50)
- TextPrintString(fontStyle, 3, 1)
- LoadFontStyle(fontStyle)
- end
- end]]
- while not (not (not (not (not (not (not (not (not (not true))))))))) do
- Wait(0)
- if IsButtonBeingPressed(shared.ScholarshipEdition and 14 or 3, 0) then
- shared.GLOBAL_VAR.show = not shared.GLOBAL_VAR.show
- if not shared.GLOBAL_VAR.show then
- print('', 1)
- print('', 2)
- MinigameReleaseCompletion()
- shared.GLOBAL_VAR.showKeyOnly = true
- end
- end
- if shared.GLOBAL_VAR.show then
- if IsButtonBeingPressed(shared.ScholarshipEdition and 0 or 8, 0) or FastScroll(0, 0) == true or FastScroll(nil, nil) == "NavUp" then
- shared.GLOBAL_VAR.s = shared.GLOBAL_VAR.s - 1
- if shared.GLOBAL_VAR.s < 1 then
- shared.GLOBAL_VAR.s = len(shared.GLOBAL_VAR)
- end
- elseif IsButtonBeingPressed(shared.ScholarshipEdition and 1 or 11, 0) or FastScroll(1, 0) == true or FastScroll(nil, nil) == "NavDwn" then
- shared.GLOBAL_VAR.s = shared.GLOBAL_VAR.s + 1
- if shared.GLOBAL_VAR.s > len(shared.GLOBAL_VAR) then
- shared.GLOBAL_VAR.s = 1
- end
- end
- if shared.ScholarshipEdition then
- print("Key: " .. shared.GLOBAL_VAR[shared.GLOBAL_VAR.s][1] .. "\nValue: " .. shared.GLOBAL_VAR[shared.GLOBAL_VAR.s][2], 1)
- print(shared.GLOBAL_VAR.s, 2)
- else
- if IsButtonBeingPressed(2, 0) then
- shared.GLOBAL_VAR.showKeyOnly = not shared.GLOBAL_VAR.showKeyOnly
- end
- print((shared.GLOBAL_VAR.showKeyOnly and shared.GLOBAL_VAR.s .. "\n" or '') .. shared.GLOBAL_VAR[shared.GLOBAL_VAR.s][shared.GLOBAL_VAR.showKeyOnly and 1 or 2], 2)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement