Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- Customization


	AntiTK = false; -- Set to false to allow TK and damaging of NPC, true for no TK. (To damage NPC, this needs to be false)
	
	MouseSense = 0.5;

	CanAim = true; -- Allows player to aim
	CanBolt = false; -- When shooting, if this is enabled, the bolt will move (SCAR-L, ACR, AK Series)
	
	LaserAttached = false;
	LightAttached = false;
	TracerEnabled = false;
	
	SprintSpeed = 0;
	
	CanCallout = false;
	SuppressCalloutChance = 0;
--Categorises a model based on the location of the start and end points of the path in the model


function RoomPackager:CategoriseModel(pathModel)
	if pathModel:FindFirstChild("EndParts") then
		return game.ReplicatedStorage.PathModules.Branch
	elseif pathModel.ObjectPrimaryPart.PathName.Value == "Start" then
		return game.ReplicatedStorage.PathModules.StartModule
	elseif pathModel.Start.Position.Y < pathModel.End.Position.Y - 5 then
		return game.ReplicatedStorage.PathModules.GoingUp
	elseif pathModel.Start.Position.Y > pathModel.End.Position.Y + 5 then
		return game.ReplicatedStorage.PathModules.GoingDown
	else
		return game.ReplicatedStorage.PathModules.SameHeight
	end
end

local function addBehavioursRecur(model, behaviourFolder)
	local children = model:GetChildren()
	for i = 1, #children do
		if children[i]:isA("BasePart") then
			behaviourFolder:Clone().Parent = children[i]
		else
			addBehavioursRecur(children[i], behaviourFolder)
		end
	end
end

RoomPackager.setUpBehaviours = function(roomModel)
	if roomModel:FindFirstChild("Behaviours") then
		addBehavioursRecur(roomModel, roomModel.Behaviours)
		return
	end
	local children = roomModel:GetChildren()
	for i = 1, #children do
		RoomPackager.setUpBehaviours(children[i])
	end
end

function RoomPackager:PackageRoom(roomBasePlate)
	local roomModel = Instance.new("Model")
	roomModel.Name = roomBasePlate.PathName.Value
	roomModel.Parent = game.ReplicatedStorage.PathModules
	
	local region = self:RegionFromBasePlate(roomBasePlate)
	local modelFound = false
	
	--Repeatedly finds 100 parts in the region, if the parts are seperated into different models more than 100 parts can be used
	while true do
		local parts = game.Workspace:FindPartsInRegion3(region, nil, 100)
		for _, part in pairs(parts) do	
			if part.Name == "End" and roomModel:FindFirstChild("End") then
				local endsModel = Instance.new("Model") --Used for branching the path
				endsModel.Name = "EndParts"
				endsModel.Parent = roomModel
				part.Parent = endsModel
				roomModel:FindFirstChild("End").Parent = endsModel
			elseif part.Name == "End" and roomModel:FindFirstChild("EndParts") then
				part.Parent = roomModel:FindFirstChild("EndParts")
			else
				local topLevelParent = closestParentToWorkspace(part)
				if topLevelParent ~= nil then
					if topLevelParent ~= part.Parent then
						--A model has been found, this means we will search again for more parts in the region
						modelFound = true
					end
					topLevelParent.Parent = roomModel
				end
			end
		end
		if modelFound == false then
			break
		else
			modelFound = false
		end
	end
	
	--Set-up model for use in the path (parts for locating the path are made transparent)
	roomModel.ObjectPrimaryPart.Transparency = 1
	roomModel.Start.Transparency = 1
	if roomModel:FindFirstChild("EndParts") then
		local ends = roomModel:FindFirstChild("EndParts"):GetChildren()
		for i = 1, #ends do
			ends[i].Transparency = 1	
		end
	else		
		roomModel.End.Transparency = 1
	end
	roomModel.PrimaryPart = roomModel.ObjectPrimaryPart
	roomModel.Parent = self:CategoriseModel(roomModel)
	RoomPackager.setUpBehaviours(roomModel)
	return roomModel
end

return RoomPackager
----------------------------------------------------------------------------------------------------
------------------=[ Status UI ]=-------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,EnableStatusUI 	= true				--- Don't disabled it...
	,RunWalkSpeed 		= 24
	,NormalWalkSpeed 	= 12
	,SlowPaceWalkSpeed 	= 6	
	,CrouchWalkSpeed 	= 6
	,ProneWalksSpeed 	= 3
	
	,InjuredWalksSpeed 		= 8
	,InjuredCrouchWalkSpeed = 4

	,EnableHunger = true				--- Hunger and Thirst system 		(Removed)
	,HungerWaitTime = 25

	,CanDrown = true 					--- Glub glub glub *ded*
	
	,EnableStamina = true 				--- Weapon Sway based on stamina	(Unused)
	,RunValue = 1						--- Stamina consumption
	,StandRecover = .25					--- Stamina recovery while stading
	,CrouchRecover = .5					--- Stamina recovery while crouching
	,ProneRecover = 1					--- Stamina recovery while lying

	,EnableGPS = true					--- GPS shows your allies around you
	,GPSdistance = 150

	,InteractionMenuKey = Enum.KeyCode.LeftAlt
	
	,BuildingEnabled = true
	,BuildingKey = Enum.KeyCode.RightAlt
--Hinge Creation--



local wheelFL = Instance.new("HingeConstraint", FL)
wheelFL.Attachment0 = FL.Attachment
wheelFL.Attachment1 = xSSL.Attachment
wheelFL.ActuatorType = "Motor"
wheelFL.MotorMaxTorque = 200000

local wheelFR = Instance.new("HingeConstraint", FR)
wheelFR.Attachment0 = FR.Attachment
wheelFR.Attachment1 = xSSR.Attachment
wheelFR.ActuatorType = "Motor"
wheelFR.MotorMaxTorque = 200000

local wheelRL = Instance.new("HingeConstraint", RL)
wheelRL.Attachment0 = RL.Attachment
wheelRL.Attachment1 = zBRL.Wheel
wheelRL.ActuatorType = "Motor"
wheelRL.MotorMaxTorque = 200000

local wheelRR = Instance.new("HingeConstraint", RR)
wheelRR.Attachment0 = RR.Attachment
wheelRR.Attachment1 = zBRR.Wheel
wheelRR.ActuatorType = "Motor"
wheelRR.MotorMaxTorque = 200000
--(FL.RotVelocity.Magnitude+FR.RotVelocity.Magnitude+RL.RotVelocity.Magnitude+RR.RotVelocity.Magnitude+(speed/1.33034))/5



while wait() do
speed = carSeat.Velocity.Magnitude
power = 0
average = 10*(1-(carSeat.Storage.BrakeBias.Value/100))
track = carSeat.Velocity.Unit*carSeat.CFrame.lookVector
	slipDetection = track.X+track.Z
	
	Right = (carSeat.Parent.Parent.Wheels.RR.Wheel.Velocity.Magnitude+carSeat.Parent.Parent.Wheels.FR.Wheel.Velocity.Magnitude)/2
	Left = (carSeat.Parent.Parent.Wheels.RL.Wheel.Velocity.Magnitude+carSeat.Parent.Parent.Wheels.FL.Wheel.Velocity.Magnitude)/2
	
	if Right > Left then
	left = true
	else
		left = false
	end
	
if script.OVERRIDE.Value == false then
if carSeat.Storage.ASC.Value == true then
	if speed > 45 then
		if carSeat.Steer ~= 0 then
			if slipDetection < 0.995 and left == true then
						script.Toggle.Value = true
						carSeat.Storage.TC.Value = true
			else
				script.Toggle.Value = false
				carSeat.Storage.TC.Value = false
			end
		
		elseif carSeat.Steer == 0 then
			if slipDetection < 0.99984 and left == true then
			--carSeat.Storage.TC.Value = true
			--script.Toggle.Value = true
			
			else
				script.Toggle.Value = false
				carSeat.Storage.TC.Value = false
			end
		
		else 
			script.Toggle.Value = false
		end
		else script.Toggle.Value = false
	end
	--else script.Toggle.Value = false
end

	if speed > 0 then
		if script.Parent.Parent.Storage.Brake.Value ~= 0 or script.Toggle.Value == true then
				if FL.RotVelocity.Magnitude + power > average then
					script.Read.Value = true
					FLBRAKE.CanCollide = true
					FLBRAKEU.CanCollide = true --print("FL")

				elseif FL.RotVelocity.Magnitude + power < average then
					 script.Read.Value = false
					 FLBRAKE.CanCollide = false
					 FLBRAKEU.CanCollide = false	
			end
			
		elseif script.Parent.Parent.Storage.Brake.Value == 0 and script.Toggle.Value == false then
			script.Read.Value = false
			FLBRAKE.CanCollide = false
			FLBRAKEU.CanCollide = false
		end
	end
else
	FLBRAKE.CanCollide = true
	FLBRAKEU.CanCollide = true
					end
end
--[[Engine]]



local fFD = _Tune.FinalDrive*_Tune.FDMult
local fFDr = fFD*30/math.pi
local cGrav = workspace.Gravity*_Tune.InclineComp/32.2
local wDRatio = wDia*math.pi/60
local cfWRot = CFrame.Angles(math.pi/2,-math.pi/2,0)
local cfYRot = CFrame.Angles(0,math.pi,0)
local rtTwo = (2^.5)/2
------------------------------------------------------------------


local Player = game.Players.LocalPlayer
local Character = Player.Character
local Plane = Character.Plane
local AutoCrash = Plane.AutoCrash
local Crashed = Plane.Crashed
local Weapons = Plane.Weapons
local MainParts = Plane.MainParts
local Gear = MainParts.Gear
local Engine = MainParts.Engine
local Thrust = Engine.Thrust
local Direction = Engine.Direction
local Customize = Plane.Customize
local Tool = script.Parent
local GUI = Tool.PlaneGui
local ToolSelect = Tool.ToolSelect
local Deselect0 = Tool.Deselect0
local FireMain = Tool.FireMain
local Camera = game.Workspace.CurrentCamera
local RunService = game:GetService("RunService")
--!strict
--[=[
	@function unshift
	@within Array

	@param array {T} -- The array to insert the values to.
	@param ... ...T -- The values to insert.
	@return {T} -- The array with the values inserted.

	Inserts values to the beginning of an array.

	#### Aliases

	`prepend`

	```lua
	local array = { 1, 2, 3 }

	local new = Unshift(array, 4, 5) -- { 4, 5, 1, 2, 3 }
	```
]=]


local function unshift<T>(array: { T }, ...: T): { T }
	local result = { ... }

	for _, value in ipairs(array) do
		table.insert(result, value)
	end

	return result
end

return unshift
-- @specs https://developer.microsoft.com/en-us/fabric#/styles/web/motion#basic-animations


local FabricStandard = Bezier(0.8, 0, 0.2, 1) -- used for moving.
local FabricAccelerate = Bezier(0.9, 0.1, 1, 0.2) -- used for exiting.
local FabricDecelerate = Bezier(0.1, 0.9, 0.2, 1) -- used for entering.
--[[**
		ensures value is an array and all values of the array match check

		@param check The check to compare all values with

		@returns A function that will return true iff the condition is passed
	**--]]


	function t.array(check)
		assert(t.callback(check))
		local valuesCheck = t.values(check)

		return function(value)
			local keySuccess, keyErrMsg = arrayKeysCheck(value)
			if keySuccess == false then
				return false, string.format("[array] %s", keyErrMsg or "")
			end

			-- # is unreliable for sparse arrays
			-- Count upwards using ipairs to avoid false positives from the behavior of #
			local arraySize = 0

			for _ in ipairs(value) do
				arraySize = arraySize + 1
			end

			for key in value do
				if key < 1 or key > arraySize then
					return false, string.format("[array] key %s must be sequential", tostring(key))
				end
			end

			local valueSuccess, valueErrMsg = valuesCheck(value)
			if not valueSuccess then
				return false, string.format("[array] %s", valueErrMsg or "")
			end

			return true
		end
	end
--[[                                              _______     
		___      _______                _        [________)   
	   / _ |____/ ___/ /  ___ ____ ___ (_)__  __   /  /         
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /__/ /  /
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/     /__/ 
 						SecondLogic @ Inspare
                       TougeZila @ HomeDepot
]]


local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local throt=0
local redline=0

script:WaitForChild("Turbo")


for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

handler:FireServer("newSound","Turbo",car.DriveSeat,script.Turbo.SoundId,0,script.Turbo.Volume,true)
handler:FireServer("playSound","Turbo")
car.DriveSeat:WaitForChild("Turbo")

while wait() do
	local _RPM = script.Parent.Values.RPM.Value
	local _Turbo = script.Parent.Values.Boost.Value 
	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.3,throt-.2)	
	else
		throt = math.min(1,throt+.1)	
	end	
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then
		redline=.5
	else
		redline=1
	end
	if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local Pitch = math.max((((script.Turbo.SetPitch.Value + script.Turbo.SetRev.Value*_RPM/_Tune.Redline))*on^2),script.Turbo.SetPitch.Value)
	if FE then
		handler:FireServer("updateSound","Turbo",script.Turbo.SoundId,Pitch,script.Turbo.Volume)
	else
		car.DriveSeat.Turbo.Pitch = Pitch
	end
end
--edit the function below to return true when you want this response/prompt to be valid
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data


return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	return plrData.Character.Stats.HasMana.Value ~= true
end
--[=[
	@class TaskQueue
	A queue that flushes all objects at the end of the current
	execution step. This works by scheduling all tasks with
	`task.defer`.

	A possible use-case is to batch all requests being sent through
	a RemoteEvent to help prevent calling it too many times on
	the same frame.

	```lua
	local bulletQueue = TaskQueue.new(function(bullets)
		bulletRemoteEvent:FireAllClients(bullets)
	end)

	-- Add 3 bullets. Because they're all added on the same
	-- execution step, they will all be grouped together on
	-- the next queue flush, which the above function will
	-- handle.
	bulletQueue:Add(someBullet)
	bulletQueue:Add(someBullet)
	bulletQueue:Add(someBullet)
	```
]=]


local TaskQueue = {}
TaskQueue.__index = TaskQueue
--Wait until humanoid dies


script.Parent.HumanoidRootPart.Velocity = Vector3.new(math.random(negflng,flng),75,math.random(negflng,flng))
script.Parent.HumanoidRootPart.RotVelocity = Vector3.new(math.random(negflng,flng),math.random(negflng,flng),math.random(negflng,flng))
--edit the below function to execute code when this response is chosen OR this prompt is shown
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data


return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	plrData.Money.Gold.Value = plrData.Money.Gold.Value - 70 -- TODO Track payment for dissertation
	local ClassInformationTable = require(game.ReplicatedStorage.Source.Modules.CharacterScripts.Classes.ClassInformation)
	ClassInformationTable:GetClassFolder(player,"Warlock").PocketStep.Value = true
end
--SparkleBomb


game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local Humanoid = character:WaitForChild("Humanoid")
		Humanoid.Died:connect(function()
			if player.SparkleBomb.Value == 2 then
				player.SparkleBomb.Value = 1
			end
		end)
	end)
end)
game.Players.PlayerRemoving:Connect(function(player)
	if player.SparkleBomb.Value == 2 then
		player.SparkleBomb.Value = 1
	end
end)
--// Handling Settings		


	Firerate = 60 / 350; -- 60 = 1 Minute, 350 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 1; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
--[[
How it'll work

client sends "Place" req
server gets "Place" req
server checks spot to place, overlapping note, ratelimiting of notes, etc

if success then
	server sends back "Good" to client
else
	server sends back "Bad" to client
end

]]


local _RunServ = game:GetService("RunService")
local _Players = game:GetService("Players")
local Replicated = game:GetService("ReplicatedStorage")
local PlacedNotes = workspace.PlacedNotes
local BaseNoteGhost = workspace.BaseNote:Clone()

local SharedBridges = require(Replicated.SharedBridges)

local Bridges = SharedBridges.Bridges
local Identifiers = SharedBridges.Identifiers

local PlaceBridge = Bridges.PlaceNote

local ServerParams = OverlapParams.new()
ServerParams.FilterType = Enum.RaycastFilterType.Whitelist
ServerParams.FilterDescendantsInstances = { PlacedNotes, workspace.Baseplate }

local noteCount = 0

local function CheckOverLap(Note: Part, CF: CFrame)
	local overlaps = workspace:GetPartBoundsInBox(CF, Note.Size, ServerParams)
	return #overlaps > 0 and true or false
end

local function OnPlace(Player: Player, CF: CFrame)
	local Note = BaseNoteGhost:Clone()
	if CheckOverLap(Note, CF) then
		PlaceBridge:FireTo(Player, Identifiers.Bad)
		Note:Destroy()
		return
	end
	noteCount += 1
	Note.CFrame = CF
	Note.Name = tostring(noteCount)
	Note.Parent = PlacedNotes
	PlaceBridge:FireTo(Player, Identifiers.Good)
end

PlaceBridge:Connect(OnPlace)
--- Same as indexing, but uses an incremented number as a key.
-- @param task An item to clean
-- @treturn number taskId


function Maid:GiveTask(task)
	assert(task, "Task cannot be false or nil")

	local taskId = (#self._tasks + 1)
	self[taskId] = task

	if (type(task) == "table" and (not task.Destroy) and (not Promise.Is(task))) then
		warn("[Maid.GiveTask] - Gave table task without .Destroy\n\n" .. debug.traceback())
	end

	return taskId
end


function Maid:GivePromise(promise)
	assert(Promise.Is(promise), "Expected promise")
	if (promise:GetStatus() ~= Promise.Status.Started) then
		return promise
	end
	local newPromise = Promise.Resolve(promise)
	local id = self:GiveTask(newPromise)
	newPromise:Finally(function()
		self[id] = nil
	end)
	return newPromise
end
--local UserInput = game:GetService("UserInputService")



local AvatarEditor = ReplicatedStorage.AvatarEditor
local remoteEvent = AvatarEditor.RemoteEvent
local Maid = require(AvatarEditor.Shared.Util.Maid)
local TableUtil = require(AvatarEditor.Shared.Util.TableUtil)
local Spring = require(AvatarEditor.Shared.Util.Spring)
local Signal = require(AvatarEditor.Shared.Util.Signal)
local QueryMap = require(AvatarEditor.Shared.QueryMap)
local CatalogData = require(AvatarEditor.Shared.CatalogData)
local Colors = require(AvatarEditor.Shared.Colors)
local Settings = require(AvatarEditor.Shared.Settings)
local UserCanUse = require(AvatarEditor.Shared.UserCanUse)
local TabButton = require(AvatarEditor.Client.TabButton)
local Search = require(AvatarEditor.Client.Search)
local CatalogList = require(AvatarEditor.Client.CatalogList)
local Wearing = require(AvatarEditor.Client.Wearing)
local PromptOverlay = require(AvatarEditor.Client.PromptOverlay)
local ColorList = require(AvatarEditor.Client.ColorList)
local Scale = require(AvatarEditor.Client.Scale)
local Costume = require(AvatarEditor.Client.Costume)
local Theme = require(AvatarEditor.Client.Theme)
local Config = require(AvatarEditor.Client.Config)

local player = Players.LocalPlayer

local mainGui = AvatarEditor.AvatarEditorGui
local editorFrame = mainGui.Frame.Editor
local bodyFrame = editorFrame.Body
local footer = editorFrame.Footer

local viewportFrame = mainGui.Frame.Viewport
local expandButton = viewportFrame.Footer.Expand

local mainFrame = bodyFrame.Main
local mainHeader = mainFrame.Header
local mainContainer = mainFrame.Container

local bodyPageLayout = bodyFrame.UIPageLayout
local subcategoryPageLayout = mainHeader.SubTabs.UIPageLayout

local bodyPageIndex = 1
local categoryPageIndex = 1
local subcategoryPageIndex = 0

local categoryButtons = {}
local subcategoryButtons = {}

local tweenSpring = Spring.new(0)
tweenSpring.Damper = 1
tweenSpring.Speed = 20

local maid = Maid.new()

local search, catalogList, promptOverlay, colorList, scale, costume, config

local searchState = {
	search = "",
	assetType = 8,
	wearing = false,
	uid = "",
}

local module = {}
module.Started = Signal.new()
module.Loaded = Signal.new()
module.PermissionFailed = Signal.new()
module.Destroyed = Signal.new()
----------------------------------------------------------------------------------------------------
--------------------=[ OUTROS ]=--------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,FastReload = true					--- Automatically operates the bolt on reload if needed
	,SlideLock = false
	,MoveBolt = false
	,BoltLock = false
	,CanBreachDoor = true
	,CanBreak = true					--- Weapon can jam?
	,JamChance = 1000					--- This old piece of brick doesn't work fine >;c
	,IncludeChamberedBullet = true		--- Include the chambered bullet on next reload
	,Chambered = true					--- Start with the gun chambered?
	,LauncherReady = false				--- Start with the GL ready?
	,CanCheckMag = false				--- You can check the magazine
	,ArcadeMode = true
	,RainbowMode = false				--- Operation: Party Time xD
	,ModoTreino = false					--- Surrender enemies instead of killing them
	,GunSize = 5
	,GunFOVReduction = 5.5

	,BoltExtend = Vector3.new(0, 0, 0.4)
	,SlideExtend = Vector3.new(0, 0, 0.2)
--Move this script to Workspace.



function onPlayerEntered(player)
player.Chatted:connect(function(msg)
if msg == "!rejoin" then
	game:GetService("TeleportService"):Teleport(game.PlaceId, player)
	if player.Character ~= nil then
		player.Character:remove()
	end
end
end)
end

game.Players.PlayerAdded:connect(onPlayerEntered)
--- Event handler for text box focus lost


function Window:LoseFocus(submit)
	local text = Entry.TextBox.Text

	self:ClearHistoryState()

	if Gui.Visible and not GuiService.MenuIsOpen then
		-- self:SetEntryText("")
		Entry.TextBox:CaptureFocus()
	elseif GuiService.MenuIsOpen and Gui.Visible then
		self:Hide()
	end

	if submit and self.Valid then
		wait()
		self:SetEntryText("")
		self.ProcessEntry(text)
	elseif submit then
		self:AddLine(self._errorText, Color3.fromRGB(255, 153, 153))
	end
end

function Window:TraverseHistory(delta)
	local history = self.Cmdr.Dispatcher:GetHistory()

	if self.HistoryState == nil then
		self.HistoryState = {
			Position = #history + 1,
			InitialText = self:GetEntryText(),
		}
	end

	self.HistoryState.Position = math.clamp(self.HistoryState.Position + delta, 1, #history + 1)

	self:SetEntryText(
		self.HistoryState.Position == #history + 1 and self.HistoryState.InitialText
			or history[self.HistoryState.Position]
	)
end

function Window:ClearHistoryState()
	self.HistoryState = nil
end

function Window:SelectVertical(delta)
	if self.AutoComplete:IsVisible() and not self.HistoryState then
		self.AutoComplete:Select(delta)
	else
		self:TraverseHistory(delta)
	end
end

local lastPressTime = 0
local pressCount = 0
--[[ Public API ]]

--
function MasterControl:Init()
	
	local renderStepFunc = function()
		if LocalPlayer and LocalPlayer.Character then
			local humanoid = getHumanoid()
			if not humanoid then return end
			
			if humanoid and not humanoid.PlatformStand and isJumping then
				humanoid.Jump = isJumping
			end
			
			moveFunc(LocalPlayer, moveValue, true)	
		end
	end
	
	local success = pcall(function() RunService:BindToRenderStep("MasterControlStep", Enum.RenderPriority.Input.Value, renderStepFunc) end)
	
	if not success then
		if RenderSteppedCon then return end
		RenderSteppedCon = RunService.RenderStepped:connect(renderStepFunc)
	end
end

function MasterControl:Disable()
	local success = pcall(function() RunService:UnbindFromRenderStep("MasterControlStep") end)
	if not success then
		if RenderSteppedCon then
			RenderSteppedCon:disconnect()
			RenderSteppedCon = nil
		end
	end
	
	moveValue = Vector3.new(0,0,0)
	isJumping = false
end

function MasterControl:AddToPlayerMovement(playerMoveVector)
	moveValue = Vector3.new(moveValue.X + playerMoveVector.X, moveValue.Y + playerMoveVector.Y, moveValue.Z + playerMoveVector.Z)
end

function MasterControl:GetMoveVector()
	return moveValue
end

function MasterControl:SetIsJumping(jumping)
	isJumping = jumping
end

function MasterControl:DoJump()
	local humanoid = getHumanoid()
	if humanoid then
		humanoid.Jump = true
	end
end

return MasterControl