Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I'm not sure if it'll let me post the source here as well but:

```lua

print("[PatreonUnlock] Mod script is loading...")

local hasHooked = false

RegisterHook("/Script/Engine.PlayerController:ClientRestart", function(self, newPawn)

    if hasHooked then return end

    local gameInstance = FindFirstOf("globalParameters_C")

    

    if gameInstance and gameInstance:IsValid() then

        hasHooked = true

        print("[PatreonUnlock] Found globalParameters_C!")

    -- disable vars

        gameInstance.isFreeVersion = false

        gameInstance.censorEnabled = false

        

    -- inform game

        gameInstance:validPatreonKey(true, 0, "Unlock")

        gameInstance:lastKeyValidAction(true, 0, "Unlock")

        gameInstance:userFinishedKeyThings(true)

        print("[PatreonUnlock] Proactive unlock applied.")

    -- ui stuff

        RegisterHook("/Game/TU/globalParameters.globalParameters_C:checkUniqueKey", function(hookedSelf, showInputKeyIfNotValid)

            print("[PatreonUnlock] Check key fired (likely button clicked) - claiming success...")

            hookedSelf:validPatreonKey(true, 0, "Unlock")

            hookedSelf:lastKeyValidAction(true, 0, "Unlock")

            hookedSelf:userFinishedKeyThings(true)

        end)

        RegisterHook("/Game/TU/globalParameters.globalParameters_C:incorrectOptionSelected", function(hookedSelf, Value, Index, Command)

            print("[PatreonUnlock] Game tried to reject the key - overriding...")

            

            hookedSelf:validPatreonKey(true, 0, "Unlock")

            hookedSelf:lastKeyValidAction(true, 0, "Unlock")

            hookedSelf:userFinishedKeyThings(true)

        end)

        print("[PatreonUnlock] All hooks successfully registered.")

    end

end)
```