Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[Weight and CG]]


	Tune.Weight			= 4387		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3		,
	 --[[Length]]		10		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .6		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
-- Register singletons


for _, instance in pairs(ReplicatedStorage.SingletonComponents:GetChildren()) do
	recsCore:addSingleton(require(instance))
end

recsCore:registerComponentsInInstance(ReplicatedStorage.SharedComponents)
recsCore:registerComponentsInInstance(ReplicatedStorage.Components)
recsCore:registerSystemsInInstance(ReplicatedStorage.SharedSystems)
recsCore:registerSystemsInInstance(ReplicatedStorage.Systems)
recsCore:registerSteppers(Steppers)
recsCore:start()
-- 1Topcop



bin = script.Parent

openTime = 1
closeTime = 0

openState = bin.DoorScript.open

function touch(hit)
	if hit.Parent == nil then return end
	local p = game.Players:playerFromCharacter(hit.Parent)
	if p ~= nil then
		if openState.Value then
			cTime = openTime -- Prolong open time
		else
			openState.Value = true
			cTime = openTime
			while cTime > 0 do
				wait(0.1)
				cTime = cTime - 0.1
			end
			openState.Value = false
		end
	end
end

bin.trigger1.Touched:connect(touch)
bin.trigger2.Touched:connect(touch)
--- 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)) then
		warn("[Maid.GiveTask] - Gave table task without .Destroy\n\n" .. debug.traceback())
	end

	return taskId
end
-- Connecter les événements pour les effets de mouvement


game:GetService("UserInputService").InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.Space then
		addRecoil(Vector3.new(0, 0, -2))
	end
end)

game:GetService("RunService").RenderStepped:Connect(function()
	addSwing(Vector3.new(math.sin(workspace.DistributedGameTime * 2) * 0.01, 0, 0))
	if humanoid and humanoid.Health > 0 then
		updateCamera()
	end
end)
--cam.FieldOfView = 80


local part = Instance.new("Part")
part.Anchored = true
part.CanCollide = false
part.Transparency = 0.5
part.BrickColor = BrickColor.new("Pastel light blue")
part.TopSurface = "Smooth"
part.BottomSurface = "Smooth"
part.formFactor = "Custom"
part.Size = Vector3.new(.2,1.2,.2)
local mesh = Instance.new("BlockMesh")
mesh.Scale = Vector3.new(.4,2,.4)
mesh.Parent = part
wait()

while true do
for i = 1, amount do
	wait(.03)
	local drop = part:Clone()
---------------------------------------------------



This = script.Parent
Elevator = This.Parent.Parent.Parent
CustomLabel = require(Elevator.CustomLabel)
Characters = require(script.Characters)

CustomText = CustomLabel["CUSTOMFLOORLABEL"]

Elevator:WaitForChild("Floor").Changed:connect(function(floor)
	--custom indicator code--
	ChangeFloor(tostring(floor))
end)

function ChangeFloor(SF)
	if CustomText[tonumber(SF)] then
		SF = CustomText[tonumber(SF)]
	end
	SetDisplay(1,(string.len(SF) == 2 and SF:sub(1,1) or "NIL"))		
	SetDisplay(2,(string.len(SF) == 2 and SF:sub(2,2) or SF))
end



function SetDisplay(ID,CHAR)
	if This.Display:FindFirstChild("DIG"..ID) and Characters[CHAR] ~= nil then
		for i,l in pairs(Characters[CHAR]) do 
			for r=1,16 do	
				This.Display["DIG"..ID]["D"..r].BrickColor = (l:sub(r,r) == "1" and BrickColor.new(ActiveColour) or BrickColor.new(InactiveColour))
				This.Display["DIG"..ID]["D"..r].Material = (l:sub(r,r) == "1" and "Neon" or "SmoothPlastic")
			end
		end
	end
end
-- Tweening storm position/radius variables


local stormPosTweenValue = Instance.new("Vector3Value")
stormPosTweenValue.Parent = script
local stormPosTween = nil
local stormPosSetToState = false
local stormRadiusTweenValue = Instance.new("NumberValue")
stormRadiusTweenValue.Parent = script
local stormRadiusTween = nil
local stormRadiusSetToState = false

local _baseLighting = {}
local _stormLighting = {
	FogStart = 50,
	FogEnd = 500,
	Brightness = 0,
	ExposureCompensation = -1.9,
}

for k, _ in pairs(_stormLighting) do
	_baseLighting[k] = Lighting[k]
end

local function _getAdjustedTime(time)
	return time * _DEBUG_TIME_SCALE + _DEBUG_START_TIME
end

local function _onStateUpdate(state)
	_state = state
end
------------- Settings



local Lighting = game.Lighting
local TweenService = game:GetService("TweenService")

function day()
	TweenService:Create(Lighting, TweenInfo.new(Speed), {ClockTime = 12}):Play()
	TweenService:Create(Lighting, TweenInfo.new(Speed), {Brightness = 3.05}):Play()
	TweenService:Create(Lighting, TweenInfo.new(Speed), {Ambient = Color3.fromRGB(106, 130, 186)}):Play()
	TweenService:Create(Lighting, TweenInfo.new(Speed), {ColorShift_Bottom = Color3.fromRGB(0,0,0)}):Play()
end

function night()
	TweenService:Create(Lighting, TweenInfo.new(Speed), {ClockTime = 0}):Play()
	TweenService:Create(Lighting, TweenInfo.new(Speed), {Brightness = 0.4}):Play()
	TweenService:Create(Lighting, TweenInfo.new(Speed), {Ambient = Color3.fromRGB(0,0,0)}):Play()
	TweenService:Create(Lighting, TweenInfo.new(Speed), {ColorShift_Bottom = Color3.fromRGB(0,0,0)}):Play()
end

while true do
	day()
	wait(DayDuration60)
	night()
	wait(NightDuration60)
end
--[[Drivetrain Initialize]]



	local Drive={}
	
	--Power Front Wheels
	--if _Tune.Config == "FWD" or _Tune.Config == "AWD" then
		--for i,v in pairs(car.Wheels:GetChildren()) do
			--if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
				--table.insert(Drive,v)
			--end
		--end
	--end
	
	--Power Rear Wheels
	if _Tune.Config == "RWD" or _Tune.Config == "AWD" then
		for i,v in pairs(car.Wheels:GetChildren()) do
			if v.Name=="RL" or v.Name=="RR" or v.Name=="R" then
				table.insert(Drive,v)
			end
		end
	end
	
	--Determine Wheel Size
	local wDia = 0
	for i,v in pairs(Drive) do
		if v.Size.x>wDia then wDia = v.Size.x end
	end
	
	--Pre-Toggled PBrake
	for i,v in pairs(car.Wheels:GetChildren()) do
		if v["#AV"]:IsA("BodyAngularVelocity") then
			if math.abs(v["#AV"].maxTorque.Magnitude-PBrakeForce)<1 then
				_PBrake=true
			end
		else
			if math.abs(v["#AV"].MotorMaxTorque-PBrakeForce)<1 then
				_PBrake=true
			end
		end
	end
-- An hour in seconds


local RESHOWING_FREQUENCY = 1440*1440


function calculateShowTimes()
	local timeUntilNextShow = nil
	local timeIntoShow = nil
	local currentTime = DateTime.now().UnixTimestampMillis/1000
	local timeUntilFirstShow = FIRST_EVER_SHOW - currentTime
	if timeUntilFirstShow > 0 then
		timeUntilNextShow = timeUntilFirstShow
	else
		timeUntilNextShow = timeUntilFirstShow % RESHOWING_FREQUENCY
		timeIntoShow = RESHOWING_FREQUENCY - timeUntilNextShow
	end
	return timeUntilNextShow, timeIntoShow
end


function loadPreShowVenue()
	-- The PreShowVenue scene length needs to be adjusted to match the time until the next show.
	local timeUntilNextShow, timeIntoShow = calculateShowTimes()
	PSV_SCENE:SetAttribute("TimeLength", timeUntilNextShow)
	EventSequencer.loadScene(PSV_SCENE.Name)
end
------------------------------------------------------------------------
-- move on to next line
------------------------------------------------------------------------


function luaX:currIsNewline(ls)
  return ls.current == "\n" or ls.current == "\r"
end

function luaX:inclinenumber(ls)
  local old = ls.current
  -- lua_assert(currIsNewline(ls))
  self:nextc(ls)  -- skip '\n' or '\r'
  if self:currIsNewline(ls) and ls.current ~= old then
    self:nextc(ls)  -- skip '\n\r' or '\r\n'
  end
  ls.linenumber = ls.linenumber + 1
  if ls.linenumber >= self.MAX_INT then
    self:syntaxerror(ls, "chunk has too many lines")
  end
end
--Edited by Stickmasterluke


local p = game.Players.LocalPlayer
local c = game.Workspace:WaitForChild(p.Name)
local m = p:GetMouse()
Tool=script.Parent
local part = Instance.new("Part")
part.CanCollide = false
part.Transparency = 1
part.Name = "Aim"
part.Anchored = true
part.Size = Vector3.new(.1,.1,.1)
part.CFrame = c.Torso.CFrame*CFrame.new(0,0,0)
part.Parent = c.Torso
delay(0,function()
	while wait(0.1) do
		part.CFrame = c.Torso.CFrame*CFrame.new(0,0,-3)
		part.CFrame = CFrame.new(part.Position, m.Hit.p)
	end
end)

enabled = true
function onButton1Down(mouse)
	if not enabled then
		return
	end

	enabled = false
	mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"

	wait(.5)
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	enabled = true

end

function onEquippedLocal(mouse)
	if mouse == nil then
		print("Mouse not found")
		return 
	end
	
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end


Tool.Equipped:connect(onEquippedLocal)
--[[NOTICE: This only works if you have an atmosphere in Lighting. 
If you don't, feel free to delete this script and put the {"Fog"} script in ServerScriptService.

--Put me in ServerScriptService and you're set! -ethanleung101]]



while true do
	wait(60)--wait()
	game.Lighting.Atmosphere.Density = 0.35 --makes the game foggy (must add atmosphere in Lighting to make it work)
	wait(120)
	game.Lighting.Atmosphere.Density = 0.2 --returns to normal
	wait(240)
end
--!strict


local Array = script.Parent.Parent
local LuauPolyfill = Array.Parent
local types = require(LuauPolyfill.types)
type Object = types.Object
type Array<T> = types.Array<T>
type Map<K, V> = types.Map<K, V>
type mapFn<T, U> = (element: T, index: number) -> U
type mapFnWithThisArg<T, U> = (thisArg: any, element: T, index: number) -> U

return function<T, U>(
	value: Map<any, any>,
	mapFn: (mapFn<T, U> | mapFnWithThisArg<T, U>)?,
	thisArg: Object?
	-- FIXME Luau: need overloading so the return type on this is more sane and doesn't require manual casts
): Array<U> | Array<T> | Array<string>
	local array = {}

	if mapFn then
		array = {}
		for i, v in value :: any do
			if thisArg ~= nil then
				(array :: Array<U>)[i] = (mapFn :: mapFnWithThisArg<T, U>)(thisArg, v, i)
			else
				(array :: Array<U>)[i] = (mapFn :: mapFn<T, U>)(v, i)
			end
		end
	else
		array = {}
		for i, v in value :: any do
			(array :: Array<T>)[i] = v
		end
	end

	return array
end
-- Provide functionality to the local API endpoint instance


SyncAPI.OnInvoke = function (...)

	-- Route requests to server endpoint if in filter mode
	if IsFilterModeEnabled() then
		return ServerEndpoint:InvokeServer(...);

	-- Perform requests locally if working locally
	else
		SyncModule = require(SyncAPI:WaitForChild 'SyncModule');
		return SyncModule.PerformAction(Game.Players.LocalPlayer, ...);
	end;

end;
--!strict


export type Error = { name: string, message: string, stack: string? }

local Error = {}

local DEFAULT_NAME = "Error"
Error.__index = Error
Error.__tostring = function(self)
	-- Luau FIXME: I can't cast to Error or Object here: Type 'Object' could not be converted into '{ @metatable *unknown*, {|  |} }'
	return getmetatable(Error :: any).__tostring(self)
end

function Error.new(message: string?): Error
	return (
		setmetatable({
			name = DEFAULT_NAME,
			message = message or "",
			stack = debug.traceback(nil, 2),
		}, Error) :: any
	) :: Error
end

return setmetatable(Error, {
	__call = function(_, ...)
		local inst = Error.new(...)
		inst.stack = debug.traceback(nil, 2)
		return inst
	end,
	__tostring = function(self)
		if self.name ~= nil then
			if self.message and self.message ~= "" then
				return string.format("%s: %s", tostring(self.name), tostring(self.message))
			end
			return tostring(self.name)
		end
		return tostring(DEFAULT_NAME)
	end,
})
--// bolekinds



local plr = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent

script.Parent.MouseButton1Click:Connect(function()
	if plr.YouCash.Value >= 500 and game.ServerStorage.ServerData.CatBed.Value == false then
		script.Parent.Parent.Parent.Ching:Play()
		plr.YouCash.Value -= 500
		game.ServerStorage.ServerData.CatBed.Value = true
	end
end)
--// All global vars will be wiped/replaced except script



return function(data, env)
	if env then
		setfenv(1, env)
	end
	
	local playergui = service.PlayerGui
	local gui = client.UI.Prepare(script.Parent.Parent)
	local label = gui.LABEL
	local str = data.Message
	local topbar = client.UI.Get("TopBar")
	
	client.UI.Remove("Notif",script.Parent.Parent)
	
	local log  = {
		Type = "Notif";
		Title = "Notif";
		Message = str;
		Icon = "rbxassetid://7501175708";
		Time = os.date("%X");
		Function = nil;
	}

	table.insert(client.Variables.CommunicationsHistory, log) 
	service.Events.CommsPanel:Fire(log)

	
	if str and type(str)=="string" then
		label.Text = str
		label.Position = UDim2.new(0, 0, 0, ((topbar and 40) or 0) - 35)
		gTable:Ready()
	else
		gui:Destroy()
	end
end
-- dependencies : (dictionary<string, table>) a map of requirements
-- dependencies.networking : (table) an object that implements POST and returns a promise


function GAReporter.new(dependencies)
	local reporter = {
		-- trackingId sends the data to the right GA property.
		trackingId = PROPERTY_ID,

		-- userId is meant to help identify recurring users,
		-- If you plan on using GAReporter on a per-client basis, you should set this value
		userId = HttpService:GenerateGUID(),

		-- clientId is meant to identify a given session that data is coming from.
		clientId = HttpService:GenerateGUID(),

		-- our HTTP handler
		_networking = dependencies.networking,
	}
	setmetatable(reporter, GAReporter)

	return reporter
end

function GAReporter:setUserId(userId)
	assert(type(userId) == "string", "userId must be a string")
	self.userId = userId
end
--[[Steering]]


	Tune.SteerInner		= 48		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 45		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .05		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .1		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 320		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 10		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree
	
	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 100000	-- Steering Aggressiveness
---------------------------------------------------



This = script.Parent
Elevator = This.Parent.Parent.Parent
CustomLabel = require(This.Parent.Parent.Parent.CustomLabel)
Characters = require(script.Characters)

CustomText = CustomLabel["CUSTOMFLOORLABEL"]

Elevator:WaitForChild("Floor").Changed:connect(function(floor)
  --custom indicator code--
  ChangeFloor(tostring(floor))
end)

function ChangeFloor(SF)
	if CustomText[tonumber(SF)] then
		SF = CustomText[tonumber(SF)]
	end
	SetDisplay(1,(string.len(SF) == 2 and SF:sub(1,1) or "NIL"))		
	SetDisplay(2,(string.len(SF) == 2 and SF:sub(2,2) or SF))
end



function SetDisplay(ID,CHAR)
	if This.Display:FindFirstChild("DIG"..ID) and Characters[CHAR] ~= nil then
 		for i,l in pairs(Characters[CHAR]) do 
			for r=1,57 do	
				This.Display["DIG"..ID]["D"..r].Transparency = (l:sub(r,r) == "1" and 0 or 0.997)
			end
		end
	end
end
-- Create component


local Dock = Roact.PureComponent:extend(script.Name)

function Dock:init()
    self.DockSize, self.SetDockSize = Roact.createBinding(UDim2.new())
end

function Dock:render()
    return new('Frame', {
        Active = true;
        AnchorPoint = Vector2.new(1, 0.5);
        BackgroundTransparency = 1;
        Position = UDim2.new(1, -10, 0.6, 0);
        Size = self.DockSize;
        ZIndex = 0;
    }, {
        Layout = new('UIListLayout', {
            Padding = UDim.new(0, 1);
            FillDirection = Enum.FillDirection.Vertical;
            HorizontalAlignment = Enum.HorizontalAlignment.Left;
            VerticalAlignment = Enum.VerticalAlignment.Top;
            SortOrder = Enum.SortOrder.LayoutOrder;
            [Roact.Ref] = function (rbx)
                if rbx then
                    self.SetDockSize(UDim2.fromOffset(rbx.AbsoluteContentSize.X, rbx.AbsoluteContentSize.Y))
                end
            end;
            [Roact.Change.AbsoluteContentSize] = function (rbx)
                self.SetDockSize(UDim2.fromOffset(rbx.AbsoluteContentSize.X, rbx.AbsoluteContentSize.Y))
            end;
        });
        ToolList = new(ToolList, {
            LayoutOrder = 0;
            Tools = self.props.Tools;
            Core = self.props.Core;
        });
        SelectionPane = new(SelectionPane, {
            LayoutOrder = 1;
            Core = self.props.Core;
        });
        AboutPane = new(AboutPane, {
            LayoutOrder = 2;
            Core = self.props.Core;
        });
    })
end

return Dock
------------------------------------------------------------------------



local pi    = math.pi
local abs   = math.abs
local clamp = math.clamp
local exp   = math.exp
local rad   = math.rad
local sign  = math.sign
local sqrt  = math.sqrt
local tan   = math.tan

local ContextActionService = game:GetService("ContextActionService")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local StarterGui = game:GetService("StarterGui")
local UserInputService = game:GetService("UserInputService")
local Workspace = game:GetService("Workspace")

local LocalPlayer = Players.LocalPlayer
if not LocalPlayer then
	Players:GetPropertyChangedSignal("LocalPlayer"):Wait()
	LocalPlayer = Players.LocalPlayer
end

local Camera = Workspace.CurrentCamera
Workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
	local newCamera = Workspace.CurrentCamera
	if newCamera then
		Camera = newCamera
	end
end)
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 100		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 800		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 8000		--		Use sliders to manipulate values
	Tune.Redline		= 9000		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 6100
	Tune.PeakSharpness	= 3.8
	Tune.CurveMult		= 0.07
	
	--Incline Compensation
	Tune.InclineComp	= 1.5		-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 450		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 150		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 0			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
--Run


local ver=require(car["A-Chassis Tune"].README)
print("//INSPARE: AC6 Loaded - Build "..ver)

while wait() do 
	Steering()
	Engine()
	if _Tune.AutoFlip then Flip() end
	
	_IsOn = script.Parent.IsOn.Value
	_InControls = script.Parent.ControlsOpen.Value
	script.Parent.Values.Gear.Value = _CGear
	script.Parent.Values.RPM.Value = _RPM
	script.Parent.Values.Horsepower.Value = _HP
	script.Parent.Values.Torque.Value = _HP * 5250 / _RPM
	script.Parent.Values.TransmissionMode.Value = _TMode
	script.Parent.Values.Throttle.Value = _GThrot
	script.Parent.Values.Brake.Value = _GBrake
	script.Parent.Values.SteerC.Value = _GSteerC*(1-math.min(car.DriveSeat.Velocity.Magnitude/_Tune.SteerDecay,1-_Tune.MinSteer))
	script.Parent.Values.SteerT.Value = _GSteerT
	script.Parent.Values.PBrake.Value = _PBrake
	script.Parent.Values.TCS.Value = _TCS
	script.Parent.Values.TCSActive.Value = _TCSActive
	script.Parent.Values.Velocity.Value = car.DriveSeat.Velocity

	if _PGear~=_CGear then
		_PGear=_CGear
		car.DriveSeat.MaxSpeed = car.DriveSeat.Velocity.Magnitude*(_Tune.Redline/_RPM) + script.Parent.Values.PSI.Value
	end
	
end
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 1500		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 900		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 8000		--		Use sliders to manipulate values
	Tune.Redline		= 8700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 6500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
-- << LOCAL FUNCTIONS >>


local defaultSettingsToAdd = {"NoticeSoundId", "NoticeVolume", "NoticePitch", "ErrorSoundId", "ErrorVolume", "ErrorPitch", "AlertSoundId", "AlertVolume", "AlertPitch", "Prefix", "SplitKey"}
local defaultSettings = {}
coroutine.wrap(function()
	if not main.initialized then
		main.client.Signals.Initialized.Event:Wait()
	end
	for i,v in pairs(defaultSettingsToAdd) do
		defaultSettings[v] = settings[v]
	end
end)()
local function getDataTemplate()
	if not main.initialized then
		main.client.Signals.Initialized.Event:Wait()
	end
	return{
		
		DataKey 		= 0;
		DataToUpdate	= true;
		Theme			= settings.Theme;
		NoticeSoundId	= settings.NoticeSoundId;
		NoticeVolume	= settings.NoticeVolume;
		NoticePitch		= settings.NoticePitch;
		ErrorSoundId	= settings.ErrorSoundId;
		ErrorVolume		= settings.ErrorVolume;
		ErrorPitch		= settings.ErrorPitch;
		AlertSoundId	= settings.AlertSoundId;
		AlertVolume		= settings.AlertVolume;
		AlertPitch		= settings.AlertPitch;
		Prefix 			= settings.Prefix;
		SplitKey		= settings.SplitKey;
		MusicList 		= settings.MusicList;
		MuteLocalSound	= false;
		PreviousServer 	= game.JobId;
		Rank 			= 0;
		SaveRank		= false;
		PermRankedBy	= 3682;
		Donor 			= false;
		Gamepasses 		= {};
		Assets 			= {};
		
		DefaultSettings = defaultSettings; --If the owner changes these Settings, then update everyones data to the new setting.
		
		Groups 			= {};
		Friends 		= {};
		CommandsActive 	= {};
		LaserColor 		= Color3.fromRGB(255,0,0);
		PromptedDonor	= false;
		AutomaticRank	= false;
		Items 			= {};
		SetupData		= false;
		
	}
end

local function dataNotToSave()
	return{
		"Groups";
		"Friend";
		"CommandsActive";
		"LaserColor";
		"PromptedDonor";
		"AutomaticRank";
		"Items";
		"SetupData"
	}
end
--- Creates or finds a hitbox object. Returns an hitbox object
-- @param required object parameter that takes in either a part or a model


function RaycastHitbox.new(object: any?)
	local hitbox: any

	if object and CollectionService:HasTag(object, DEFAULT_COLLECTION_TAG_NAME) then
		hitbox = HitboxData:_FindHitbox(object)
	else
		hitbox = setmetatable({
			RaycastParams = nil,
			DetectionMode = RaycastHitbox.DetectionMode.Default,
			HitboxRaycastPoints = {},
			HitboxPendingRemoval = false,
			HitboxStopTime = 0,
			HitboxObject = object,
			HitboxHitList = {},
			HitboxActive = false,
			Visualizer = SHOW_DEBUG_RAY_LINES,
			DebugLog = SHOW_OUTPUT_MESSAGES,
			OnUpdate = Signal:Create(),
			OnHit = Signal:Create(),
			Tag = DEFAULT_COLLECTION_TAG_NAME,
		}, HitboxData)

		hitbox:_Init()
	end

	return hitbox
end
-- (Hat Giver Script - Loaded.)



debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "Handle"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(2,2,2) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0, 0, 0)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)