# Configuring Your AutoPro

Need your doors open faster? Yes, we have that.


Your default configuration module, found under AutoPro -> Settings, is structured as follows:

--[[    
    ___         __        ____                     ___ 
   /   | __  __/ /_____  / __ \_________     _   _|__ \
  / /| |/ / / / __/ __ \/ /_/ / ___/ __ \   | | / /_/ /
 / ___ / /_/ / /_/ /_/ / ____/ /  / /_/ /   | |/ / __/ 
/_/  |_\__,_/\__/\____/_/   /_/   \____/    |___/____/ 
                                                       
            Whitehill AutoPro Version 2
            
Version 2 brings some new controllers to AutoPro, as well
as upgrades to the existing controllers. It also allows 
the usage of one controller on multiple doors, as well as 
bringing swing and custom doors natively to AutoPro for the 
first time.      
]]--

local Settings = {
	-- / Door Settings / --	
	["StartupMode"] = "Normal",
	["OpenTime"] = 5,
	
	-- / Sliding / --
	["Slide - MovementTime"] = 1.5,
	["Slide - WinterMovementTime"] = 1.5,
	["Slide - DoorEasingStyle"] = Enum.EasingStyle.Quad,
	["Slide - DoorEasingDirection"] = Enum.EasingDirection.InOut,
	
	-- / Swing / --
	["Swing - TargetAngle"] = 85,
	["Swing - OpeningDoorSpeed"] = 1.5,
	["Swing - ClosingDoorSpeed"] = 1.5,
	
	-- / Custom / --
	["Custom - Open"] = function()
		return false
	end,
	["Custom - Close"] = function()
		return false
	end,
	
	-- / Whitelist Settings / --
	["AuthorisedPeople"] = {
		112672616, -- AlexG_1337
		199830788, -- Coco_Beagle
	}, 
	["AuthorisedGroups"] = {
		["5150453"] = {255, 254, 253}, -- Whitehill
	}
}
return Settings

# Syntax

# General

# StartupMode

This will be the default mode of the doors upon game start.

What do these mean?

  • Normal: Automatic door operation, open/closes normally.
  • Hold: The door will be constantly open.
  • Exit: Only allows foot traffic to exit, not enter. A one-way mode of operation.
  • Lock: Doesn't allow any foot traffic. Locked stage.

Example:

["StartupMode"] = "Hold"

# OpenTime

Defines how long the door will stay open after opening, after this delay, the door will close.


Example:

["OpenTime"] = 8

# Sliding Doors

# MovementTime

How long will the door take to open/close when winter mode is disabled.


Example:

["Slide - MovementTime"] = 1

How long will the door take to open/close when winter mode is enabled.


Example:

["Slide - WinterMovementTime"] = 1.25

# DoorEasingStyle

The Easing Style to apply to the door during movement.


Example:

["Slide - DoorEasingStyle"] = Enum.EasingStyle.Sine

# DoorEasingDirection

The Easing Style to apply to the door during movement.


Example:

["Slide - DoorEasingDirection"] = Enum.EasingDirection.Out

# Swing Doors

# TargetAngle

How far will the door open in degrees from its default position.


Example:

["Swing - TargetAngle"] = 95

# OpeningDoorSpeed

How long will the door take to open fully.


Example:

["Swing - OpeningDoorSpeed"] = 1.25

# ClosingDoorSpeed

How long will the door take to close fully.


Example:

["Swing - ClosingDoorSpeed"] = 1.75

# Custom Functions

# Open

In this function you put your own additional functionality to happen when the door opens.


Example:

["Custom - Open"] = function()
	print(`The door at "{script.Parent:GetFullName()}" has opened!`)
	
	return false
end

# Close

In this function you put your own additional functionality to happen when the door closes.


Example:

["Custom - Open"] = function()
	print(`The door at "{script.Parent:GetFullName()}" has closed!`)
	
	return false
end

# Whitelisting

# AuthorisedPeople

A list of User IDs to allow the use of the controller.


Example:

["AuthorisedPeople"] = {
	123456789, 
	987654321,
} 

# AuthorisedGroups

A dictionary of Community IDs (formerly Group IDs), and their selected Rank IDs, to allow the use of the controller.


Example:

["AuthorisedGroups"] = {
	["123456789"] = {50, 150, 255}
}

# Finalizing

Now, using the examples provided, a complete module will look as follows:

local Settings = {
	-- / Door Settings / --	
	["StartupMode"] = "Hold",
	["OpenTime"] = 8,
	
	-- / Sliding / --
	["Slide - MovementTime"] = 1,
	["Slide - WinterMovementTime"] = 1.25,
	["Slide - DoorEasingStyle"] = Enum.EasingStyle.Sine,
	["Slide - DoorEasingDirection"] = Enum.EasingDirection.Out,
	
	-- / Swing / --
	["Swing - TargetAngle"] = 95,
	["Swing - OpeningDoorSpeed"] = 1.25,
	["Swing - ClosingDoorSpeed"] = 1.75,
	
	-- / Custom / --
	["Custom - Open"] = function()
		print(`The door at "{script.Parent:GetFullName()}" has opened!`)
		
		return false
	end,
	["Custom - Close"] = function()
		print(`The door at "{script.Parent:GetFullName()}" has closed!`)
		
		return false
	end,
	
	-- / Whitelist Settings / --
	["AuthorisedPeople"] = {
		123456789, 
		987654321,
	}, 
	["AuthorisedGroups"] = {
		["123456789"] = {50, 150, 255},
	}
}
return Settings