> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fluxstudios.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Factory Reset

> Step-by-step on how to reset your Orbit easily.

<Steps>
  <Step title="Reset Datastores">
    Orbit uses multiple Datastores to save Data. \
    To fully reset these, run following commands:

    Reset Setup Data

    ```luau theme={null}
    game:GetService("DataStoreService"):GetDataStore("Orbit"):SetAsync("Internal", {})
    ```

    Reset Authorization Data

    ```luau theme={null}
    game:GetService("DataStoreService"):GetDataStore("Orbit"):SetAsync("auth", {})
    ```

    Reset Corrupted Server Codes

    ```luau theme={null}
    game:GetService("DataStoreService"):GetDataStore("Orbit"):SetAsync("ServerCodes", {})
    ```

    Reset Audit Logs

    ```luau theme={null}
    game:GetService("DataStoreService"):GetDataStore("Orbit"):SetAsync("History", {})
    ```

    Reset Banned List

    ```luau theme={null}
    game:GetService("DataStoreService"):GetDataStore("Orbit", "Bans"):SetAsync("Banned", {})
    ```
  </Step>

  <Step title="Reset Orbit">
    Resetting Orbit is easy, just remove the Orbit Script and replace it with a clean version.
  </Step>

  <Step title="Resetting Config Data">
    This is a bit more trickier, due to Datastore Reasons.\
    In order to remove all Config Data, run this (yes i found this on the devforum):

    ```luau theme={null}
    local DataStoreService = game:GetService("DataStoreService")
    local list = {"OrbitSettings", "OrbitSettings_Global"}
    for _, x in list do
    	local DataStore = DataStoreService:GetDataStore(x)
    	local Success, Pages = pcall(function()
    		return DataStore:ListKeysAsync()
    	end)
    	while task.wait() do
    		local Items = Pages:GetCurrentPage()
    		for _, Data in ipairs(Items) do
    			local Key = Data.KeyName
    			DataStore:RemoveAsync(Key)
    		end
    		if Pages.IsFinished then break else Pages:AdvanceToNextPageAsync() end
    	end
    end
    ```
  </Step>
</Steps>
