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


local Libraries = Tool:WaitForChild 'Libraries'
local Support = require(Libraries:WaitForChild 'SupportLibrary')

local PaintHistoryRecord = {}
PaintHistoryRecord.__index = PaintHistoryRecord

function PaintHistoryRecord.new()
    local self = setmetatable({}, PaintHistoryRecord)

    -- Include selection
    self.Selection = Support.CloneTable(Core.Selection.Items)
    self.Parts = Support.CloneTable(Core.Selection.Parts)

    -- Initialize color data
    self.InitialColor = Support.GetMemberMap(self.Parts, 'Color')
    self.TargetColor = nil

    -- Initialize union data
    self.InitialUnionColoring = {}
    for _, Part in pairs(self.Parts) do
        if Part:IsA 'UnionOperation' then
            self.InitialUnionColoring[Part] = Part.UsePartColor
        end
    end

    -- Return new record
    return self
end

function PaintHistoryRecord:Unapply()
    local Changes = {}

    -- Assemble change list
    for _, Part in ipairs(self.Parts) do
        table.insert(Changes, {
            Part = Part,
            Color = self.InitialColor[Part],
            UnionColoring = self.InitialUnionColoring[Part]
        })
    end

    -- Push changes
    Core.SyncAPI:Invoke('SyncColor', Changes)

    -- Restore selection
    Core.Selection.Replace(self.Selection)
end

function PaintHistoryRecord:Apply(KeepSelection)
    local Changes = {}

    -- Assemble change list
    for _, Part in ipairs(self.Parts) do
        table.insert(Changes, {
            Part = Part,
            Color = self.TargetColor,
            UnionColoring = true
        })
    end

    -- Push changes
    Core.SyncAPI:Invoke('SyncColor', Changes)

    -- Restore selection
    if not KeepSelection then
        Core.Selection.Replace(self.Selection)
    end
end

return PaintHistoryRecord
--Objects


local Chassis = require(script.Parent.ChassisModule)
Chassis.InitializeSeats()
local driverScript = script.Parent:WaitForChild("Driver")
local root = script.Parent.Parent

local driverSeat = Chassis.GetDriverSeat()
local AdditionalSeats = Chassis.GetPassengerSeats()
local LocalSeatingScript = script:WaitForChild("LocalVehicleSeatingScript")
-- Basic settings


local FOOTSTEP_PLACEMENT_RATE = 0.4
local GROUND_DETECTION_DISTANCE = 3.1

local plr = game.Players.LocalPlayer

game.ReplicatedStorage.Interactions.Client.Perks.ShowFootsteps.OnClientEvent:connect(function(plrs)
	
	-- Make sure character is alive
	if plr.Character ~= nil then
	
		-- Set up detection part for each player
		local ignore = plr.PlayerScripts.Functions.GetRayIgnoreList:Invoke()
		for _, i in pairs(plrs) do
			local thisChr = i.Character
			if thisChr:FindFirstChild("HumanoidRootPart") and i ~= plr then
				local left = false
				local waitTime = FOOTSTEP_PLACEMENT_RATE
				local color = Color3.fromHSV(math.random(), 1, 1)
				spawn(function()
					while wait(waitTime) do
						
						-- Check if detection part is gone or owner is gone
						if thisChr.Parent == nil or thisChr:FindFirstChild("HumanoidRootPart") == nil then
							break
						end
						
						-- Check if should place a foot step
						local ray = Ray.new(thisChr.HumanoidRootPart.Position, Vector3.new(0, -GROUND_DETECTION_DISTANCE, 0))
						local hit, hitPos = workspace:FindPartOnRayWithIgnoreList(ray, ignore, false, true)
						if hit ~= nil and thisChr.HumanoidRootPart.Velocity.Magnitude > 1 then
							
							-- Tell the owner to place a footstep
							local cfr
							if left then
								cfr = thisChr.HumanoidRootPart.CFrame * CFrame.new(-0.5, -2.95, 0)
								left = false
							else
								cfr = thisChr.HumanoidRootPart.CFrame * CFrame.new(0.5, -2.95, 0)
								left = true
							end
							plr.PlayerScripts.Functions.PlaceFootstep:Fire(cfr, color, thisChr.Humanoid)
							
							-- Set wait time to be the placement rate
							waitTime = FOOTSTEP_PLACEMENT_RATE
						
						else
							
							-- Set wait time to be quick
							waitTime = 0.033
							
						end
						
					end
				end)
			end
		end
		
	end
	
end)
--[[
	
	Grabs gamepass info - cleaner alternative to GetProductInfo. Caches and may potentially yield.
	
	Functions.GetGamepassInfo(
		id, 					<-- |REQ|	ID of gamepass. (w/o link)
	)
	
--]]





return function(id)
	--- Check cache
	if not cachedGamepassInfo[id] then
		--- Get product info
		local productInfo = _L.Services.MarketplaceService:GetProductInfo(id, Enum.InfoType.GamePass)
		
		--- Update cache
		if productInfo then
			cachedGamepassInfo[id] = productInfo
		end
		
		--
		return productInfo
	else
		
		--- Return cache
		return cachedGamepassInfo[id]
	end
end
--// This module is only used to generate and update a list of non-custom commands for the webpanel and will not operate under normal circumstances



return function(Vargs, GetEnv)
	local env = GetEnv(nil, {script = script})
	setfenv(1, env)

	local server = Vargs.Server;
	local service = Vargs.Service;

	local Settings = server.Settings
	local Functions, Commands, Admin, Anti, Core, HTTP, Logs, Remote, Process, Variables, Deps =
		server.Functions, server.Commands, server.Admin, server.Anti, server.Core, server.HTTP, server.Logs, server.Remote, server.Process, server.Variables, server.Deps

	--if true then return end --// fully disabled
	service.TrackTask("Thread: WEBPANEL_JSON_UPDATE", function()
		task.wait(1)
		local enabled = rawget(_G,"ADONISWEB_CMD_JSON_DOUPDATE");
		local secret = rawget(_G,"ADONISWEB_CMD_JSON_SECRET");
		local endpoint = rawget(_G,"ADONISWEB_CMD_JSON_ENDPOINT");
		if not enabled or not secret or not endpoint then return end

		print("WEB ENABLED DO UPDATE");

		if Core.DebugMode and enabled then
			print("DEBUG DO LAUNCH ENABLED");
			task.wait(5)

			local list = {};
			local HTTP = service.HttpService;
			local Encode = Functions.Base64Encode
			local Decode = Functions.Base64Decode

			for i,cmd in Commands do
				table.insert(list, {
					Index = i;
					Prefix = cmd.Prefix;
					Commands = cmd.Commands;
					Arguments = cmd.Args;
					AdminLevel = cmd.AdminLevel;
					Hidden = cmd.Hidden or false;
					NoFilter = cmd.NoFilter or false;
				})
			end

			--warn("COMMANDS LIST JSON: ");
			--print(`\n\n{HTTP:JSONEncode(list)}\n\n`);
			--print("ENCODED")
			--// LAUNCH IT
			print("LAUNCHING")
			local success, res = pcall(HTTP.RequestAsync, HTTP, {
				Url = endpoint;
				Method = "POST";
				Headers = {
					["Content-Type"] = "application/json",
					["Secret"] = secret
				};

				Body = HTTP:JSONEncode({
					["data"] = Encode(HTTP:JSONEncode(list))
				})
			});

			print("LAUNCHED TO WEBPANEL")
			print("RESPONSE BELOW")
			print(`SUCCESS: {success}\nRESPONSE:\n{(res and HTTP.JSONEncode(res)) or res}`)
		end
	end)
end
--[[**
	ensures value is a number where min <= value

	@param min The minimum to use

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


function t.numberMin(min)
	return function(value)
		local success = t.number(value)
		if not success then
			return false
		end

		if value >= min then
			return true
		else
			return false
		end
	end
end
--[[
	Races a set of Promises and returns the first one that resolves,
	cancelling the others.
]]


function Promise.race(promises)
	assert(type(promises) == "table", string.format(ERROR_NON_LIST, "Promise.race"))

	for i, promise in pairs(promises) do
		assert(Promise.is(promise), string.format(ERROR_NON_PROMISE_IN_LIST, "Promise.race", tostring(i)))
	end

	return Promise._new(debug.traceback(nil, 2), function(resolve, reject, onCancel)
		local newPromises = {}
		local finished = false

		local function cancel()
			for _, promise in ipairs(newPromises) do
				promise:cancel()
			end
		end

		local function finalize(callback)
			return function (...)
				cancel()
				finished = true
				return callback(...)
			end
		end

		if onCancel(finalize(reject)) then
			return
		end

		for i, promise in ipairs(promises) do
			newPromises[i] = promise:andThen(finalize(resolve), finalize(reject))
		end

		if finished then
			cancel()
		end
	end)
end
Promise.Race = Promise.race
-- Test selectors (when unsupported)


return {
	supportsTestSelectors = false,
	findFiberRoot = shim,
	getBoundingRect = shim,
	getTextContent = shim,
	isHiddenSubtree = shim,
	matchAccessibilityRole = shim,
	setFocusIfFocusable = shim,
	setupIntersectionObserver = shim,
}
--local r2 = cr.Misc.FR.Door.Ind


local b1 = lt.LEFT
local b2 = lt.RIGHT
local b3 = lt.TB
local lw = lt.B
local lww = lt.L
local lwww = lt.L2
local hi = lt.HB
local rb = lt.RB
local rv = lt.Reverse

local left = false
local right = false
local hazards = false
local reverse = false
local headlt = false
local highlt = false
local relay = false
local brake = false

function DealWithInput(input,processed)
	if (processed) then return end
	if input.KeyCode == Enum.KeyCode.S or input.KeyCode == Enum.KeyCode.Down then --Brake
		if input.UserInputState == Enum.UserInputState.Begin then
			brake=true
			b3.BrickColor = BrickColor.new("Really red")
			b3.Material = Enum.Material.Neon
			if not left then
				b1.BrickColor = BrickColor.new("Really Red")
				b1.Material = Enum.Material.Neon
			end
			if not right then
				b2.BrickColor = BrickColor.new("Really Red")
				b2.Material = Enum.Material.Neon
			end
		elseif input.UserInputState == Enum.UserInputState.End then
			brake=false
			b3.BrickColor = BrickColor.new("Crimson")
			b3.Material = Enum.Material.SmoothPlastic
			if ((not left) and (not hazards) and (not brake)) then
			b1.BrickColor = BrickColor.new("Pearl")
			b1.Material = Enum.Material.SmoothPlastic
			else
--//Functions


function CarColor ()
for i,v in pairs(Car.Body.Color:GetChildren()) do
v.Color = Stats.Color.Value
end
for i,vv in pairs(Car.Misc.Arka_Kapaklar:GetChildren()) do
if vv:IsA("BasePart") then
vv.Color = Stats.Color.Value
end
end
end

function CheckFuel ()
if oldpos == nil then
oldpos = MainP.Position
else
newpos = MainP.Position
-- Public Methods



function GJK:IsColliding()
	local direction = (self.CentroidA - self.CentroidB).Unit
	local simplex = {self.SupportA(self.SetA, direction) - self.SupportB(self.SetB, -direction)}
	
	direction = -direction
	
	for i = 1, MAX_TRIES do
		table.insert(simplex, self.SupportA(self.SetA, direction) - self.SupportB(self.SetB, -direction))
		
		if (simplex[#simplex]:Dot(direction) <= 0) then
			return false
		else
			local passed, newDirection = containsOrigin(self, simplex, direction)
			
			if (passed) then
				return true
			end
			
			direction = newDirection
		end
	end
	
	return false
end
--[[Engine]]


	--Torque Curve
               Tune.Horsepower		= 730		--	[TORQUE CURVE VISUAL]
               Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
               Tune.PeakRPM		= 7500		--		Use sliders to manipulate values
               Tune.Redline		= 9000		--		Copy and paste slider values into the respective tune values
               Tune.EqPoint		= 5500
               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)
-- ANIMATION



function Joint(Name, Part0, Part1, C0, C1, MaxVelocity)
	local Motor = Instance.new("Motor")

	Motor.C0 = C0
	Motor.C1 = C1
	Motor.MaxVelocity = MaxVelocity
	Motor.Name = Name
	Motor.Parent = Part0
	Motor.Part0 = Part0
	Motor.Part1 = Part1
end
--	print(animName .. " " .. idx .. " [" .. origRoll .. "]")


	
	local anim = animTable[animName][idx].anim

	-- switch animation		
	if (anim ~= currentAnimInstance) then
		
		if (currentAnimTrack ~= nil) then
			currentAnimTrack:Stop(transitionTime)
			currentAnimTrack:Destroy()
		end

		if (runAnimTrack ~= nil) then
			runAnimTrack:Stop(transitionTime)
			runAnimTrack:Destroy()
		end

		currentAnimSpeed = 1.0
	
		-- load it to the humanoid; get AnimationTrack
		currentAnimTrack = humanoid:LoadAnimation(anim)
		 
		-- play the animation
		currentAnimTrack:Play(transitionTime)
		currentAnim = animName
		currentAnimInstance = anim

		-- set up keyframe name triggers
		if (currentAnimKeyframeHandler ~= nil) then
			currentAnimKeyframeHandler:disconnect()
		end
		currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
		
		-- check to see if we need to blend a walk/run animation
		if animName == "walk" then
			local runAnimName = "run"
			local runIdx = rollAnimation(runAnimName)

			runAnimTrack = humanoid:LoadAnimation(animTable[runAnimName][runIdx].anim)		 
			runAnimTrack:Play(transitionTime)		
			
			if (runAnimKeyframeHandler ~= nil) then
				runAnimKeyframeHandler:disconnect()
			end
			runAnimKeyframeHandler = runAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)	
		end
	end

end
--// Recoil Settings	


	gunrecoil = -0.5; -- How much the gun recoils backwards when not aiming
	camrecoil = 0.43; -- How much the camera flicks when not aiming
	AimGunRecoil = -0.4; -- How much the gun recoils backwards when aiming
	AimCamRecoil = 0.31; -- How much the camera flicks when aiming
	
	CamShake = 10; -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING
	AimCamShake = 8; -- THIS IS ALSO NEW!!!!
	
	Kickback = 3.4; -- Upward gun rotation when not aiming
	AimKickback = 2.2; -- Upward gun rotation when aiming
--- Skill


local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local Mouse = plr:GetMouse()
local Debounce = true
Player = game.Players.LocalPlayer
Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://4835590095"

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.X and Debounce == true and Tool.Equip.Value == true and Tool.Active.Value == "None" then
		Debounce = false
		Tool.Active.Value = "SunaTornadoBig"
		wait(0.1)
		Track1 = Player.Character.Humanoid:LoadAnimation(Animation)
		Track1:Play()
		wait(0.15)
		script.Fire:FireServer(plr)
	local hum =  Player.Character.Humanoid
	for i = 1,30 do
		wait()
		hum.CameraOffset = Vector3.new(
			math.random(-1,1),
			math.random(-1,1),
			math.random(-1,1)
		)
	end
	hum.CameraOffset = Vector3.new(0,0,0)
	    wait(0.15)
		Tool.Active.Value = "None"
		wait(2)
		Debounce = true
	end
end)
--------------------------------------------------------------------------------------------------------------------------------------



function PressH(key)				
	if (key== "h") then
if (Activate==false) then
	for _,v in ipairs(game.Players.LocalPlayer.Character.Helmet:GetChildren()) do
  		if v.ClassName == "Part" or v.ClassName=="UnionOperation" or v.ClassName=="WedgePart" then
	    game.Players.LocalPlayer.Character.Helmet.LS.Light.Enabled=false  
	    game.Players.LocalPlayer.Character.Helmet.Flashlight.Material = "SmoothPlastic" 
			v.Transparency=1
     		end
		end	
	for _,v in ipairs(game.Players.LocalPlayer.Character:GetChildren()) do
  		if v.ClassName == "Hat"   then     
			v.Handle.Transparency=0
     		end
	end	
	game.Players.LocalPlayer.Character.Head.Transparency = 0
Activate = true
elseif (Activate==true) then
	for _,v in ipairs(game.Players.LocalPlayer.Character:GetChildren()) do
  		if v.ClassName == "Hat"   then     
			v.Handle.Transparency=1
     		end
		end		
	for _,v in ipairs(game.Players.LocalPlayer.Character.Helmet:GetChildren()) do
  		if v.ClassName == "Part" or v.ClassName=="UnionOperation" or v.ClassName=="WedgePart"  then     
			v.Transparency=0
     		end
	    end	
game.Players.LocalPlayer.Character.Helmet.Middle.Transparency=1
game.Players.LocalPlayer.Character.Head.Transparency = 1
	Activate=false
		end
	end
end
Mouse.KeyDown:connect(PressH)
--print("anti-sleep activate")
--[===[
while script.Parent do
	local waitTime = wait()
	if waitTime > 0.0000001 and IsCoupled.Value then --insurance
		LastPositions[NumberPositions]=nil
		table.insert(LastPositions,1,coupler.Position)
		local AveragePosition = Vector3.new()
		for i = 1, #LastPositions do
			AveragePosition = AveragePosition + LastPositions[i]/#LastPositions
		end
		local RateOfChangeOfAveragePosition = (AveragePosition-LastAveragePosition).magnitude/waitTime
		if LastRateOfChangeOfAveragePosition < WakeupThreshold and RateOfChangeOfAveragePosition >= WakeupThreshold then

			if not PGS and RateOfChangeOfAveragePosition > WakeupThreshold then
				for _,k in pairs (coupler.Parent.Parent:GetChildren()) do --this assumes the draft gear itself is welded to the train
					
					if k:IsA("BasePart") then
						if k:CanAwaken() then
							k:Awake()
						end
						break
					end
				end
			end
		end
		LastRateOfChangeOfAveragePosition = RateOfChangeOfAveragePosition
		LastAveragePosition = AveragePosition
	end
end
]===]
--[[Weight and CG]]


	Tune.Weight			= 3400		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		14		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- 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
-- move back UI --





Events.BringTitle.Event:Connect(function()
	moveTitle = tweenService:Create(Title, movementTitle, titleEnd)
	moveSolo = tweenService:Create(PlaySolo, movementSolo, soloEnd)
	moveCustomize = tweenService:Create(Customize, movementCustomize, customizeEnd)
	moveAchievements = tweenService:Create(Achievements, movementAchievements, achievementsEnd)
	moveSettings = tweenService:Create(Settings, movementSettings, settingsEnd)
	moveBack = tweenService:Create(Back, movementBack, backEnd)
	
	moveTitle:Play()
	moveSolo:Play()
	moveCustomize:Play()
	moveAchievements:Play()
	moveSettings:Play()
	moveBack:Play()
	
	achievementEnabled.Value = true
	customizeEnabled.Value = true
	soloEnabled.Value = true
	settingsEnabled.Value = true
	backEnabled.Value = false
end)

Events.RemoveTitle.Event:Connect(function()
	moveTitle = tweenService:Create(Title, movementTitle, titleStart)
	moveSolo = tweenService:Create(PlaySolo, movementSolo, soloStart)
	moveCustomize = tweenService:Create(Customize, movementCustomize, customizeStart)
	moveAchievements = tweenService:Create(Achievements, movementAchievements, achievementsStart)
	moveSettings = tweenService:Create(Settings, movementSettings, settingsStart)
	moveBack = tweenService:Create(Back, movementBack, backStart)
	
	moveTitle:Play()
	moveSolo:Play()
	moveCustomize:Play()
	moveAchievements:Play()
	moveSettings:Play()
	moveBack:Play()
	
	achievementEnabled.Value = false
	customizeEnabled.Value = false
	soloEnabled.Value = false
	settingsEnabled.Value = false
	backEnabled.Value = true
end)
-------- CONFIG
-- ENABLERS (do not touch yet)


local Popups_Enabled = false  -- Enables popups. (refer to "Instructions" for installation)

local Sequential_Indicators = false -- Enables sequential indicators. (refer to "Instructions" for installation)

local Sequential_Segments = 3 -- How many segments your indicators use. (don't use if Sequential_Indicators is false)

local Trunk_Lights = false -- Enables rear, brake, and reverse lights on trunk. (they will still work inside of the main model)

local Plate_Lights = false -- Enables license plate lights.

local Interior_Lights = false -- Enables interior lights. (Not Working Yet)

local Mirror_Indicators = false --Enables indicators on mirrors. (Not Working yet)

local Dashboard_Indicators = false -- Enables dashboard indicators. (refer to "Instrucitons" for setup) (Not Working Yet)
--[[
	 Builds a map that allows us to find Attachment0/Attachment1 when we have the other,
		and keep track of the joint that connects them. Format is
		{
			["WaistRigAttachment"] = {
				Joint = UpperTorso.Waist<Motor6D>,
				Attachment0 = LowerTorso.WaistRigAttachment<Attachment>,
				Attachment1 = UpperToros.WaistRigAttachment<Attachment>,
			},
			...
		}
--]]


function buildAttachmentMap(character)
	local attachmentMap = {}
	
	-- NOTE: GetConnectedParts doesn't work until parts have been parented to Workspace, so
	-- we can't use it (unless we want to have that silly restriction for creating ragdolls)
	for _,part in pairs(character:GetChildren()) do
		if part:IsA("BasePart") then
			for _,attachment in pairs(part:GetChildren()) do
				if attachment:IsA("Attachment") then
					local jointName = attachment.Name:match("^(.+)RigAttachment$")
					local joint = jointName and attachment.Parent:FindFirstChild(jointName) or nil
					
					if joint then
						attachmentMap[attachment.Name] = {
							Joint = joint,
							Attachment0=joint.Part0[attachment.Name]; 
							Attachment1=joint.Part1[attachment.Name];
						}
					end
				end
			end
		end
	end
	
	return attachmentMap
end

return function(humanoid)
	local character = humanoid.Parent
	
	-- Trying to recover from broken joints is not fun. It's impossible to reattach things like
	-- armor and tools in a generic way that works across all games, so we just prevent that
	-- from happening in the first place.
	humanoid.BreakJointsOnDeath = false
	
	-- Roblox decided to make the ghost HumanoidRootPart CanCollide=true for some reason, so
	-- we correct this and disable collisions. This prevents the invisible part from colliding
	-- with the world and ruining the physics simulation (e.g preventing a roundish torso from
	-- rolling)
	local rootPart = character:FindFirstChild("HumanoidRootPart")
	if rootPart then
		rootPart.CanCollide = false
	end
	
	local player = game.Players:GetPlayerFromCharacter(character)

	local attachmentMap = buildAttachmentMap(character)
	local ragdollConstraints = buildConstraints(attachmentMap)
	local collisionFilters = buildCollisionFilters(attachmentMap, character.PrimaryPart)

	collisionFilters.Parent = ragdollConstraints
	ragdollConstraints.Parent = character
	
	game:GetService("CollectionService"):AddTag(humanoid, "Ragdoll")
end
-- Don't edit below unless you know what you're doing.



local O = 1
function onClicked() 
if O == 1 then
	O = 2
	One()

elseif O == 2 then
	O = 3
    Two()

elseif O == 3 then
	O = 1
    Three()
end
end

script.Parent.MouseButton1Down:connect(onClicked)
--// Functions \\--


function PartSetup (center,Name)
center.Parent = workspace.CurrentCamera
center.Size = Vector3.new(7, 5, 0.05)
center.Anchored = false
center.CanCollide = false
center.Name = Name.."Menu"
center.CustomPhysicalProperties=  PhysicalProperties.new(0, 0, 0)
center.Transparency = .8
center.BrickColor = BrickColor.White()
center.Material = Enum.Material.Neon
end
function WeldSetup (centerWeld,center,C0info)
centerWeld.Part0 = workspace:WaitForChild(Player.Name).HumanoidRootPart
centerWeld.Part1 = center
centerWeld.C0 = CFrame.new(0,1.5,-5)
centerWeld.Parent = workspace:WaitForChild(Player.Name).HumanoidRootPart
end
--[[
	Returns first value (success), and packs all following values.
]]


local function packResult(success, ...)
	return success, select("#", ...), { ... }
end


local function makeErrorHandler(traceback)
	assert(traceback ~= nil)

	return function(err)
		-- If the error object is already a table, forward it directly.
		-- Should we extend the error here and add our own trace?

		if type(err) == "table" then
			return err
		end

		return Error.new({
			error = err,
			kind = Error.Kind.ExecutionError,
			trace = debug.traceback(tostring(err), 2),
			context = "Promise created at:\n\n" .. traceback,
		})
	end
end