Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[Susupension]]


	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 1.5			-- Suspension length (in studs)
	Tune.FPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 1.5			-- Suspension length (in studs)
	Tune.RPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
--[[
	[Horizontal and Vertical limits for head and body tracking.]
	[Setting to 0 negates tracking, setting to 1 is normal tracking, and setting to anything higher than 1 goes past real life head/body rotation capabilities.]
--]]


local HeadHorFactor = 0.9
local HeadVertFactor = 0.6
local BodyHorFactor = 0.8
local BodyVertFactor = 0.6
-- METHODS


function Tracker:_preventMultiFrameUpdates(methodName, ...)
	-- This prevents the funtion being called twice within a single frame
	-- If called more than once, the function will initally be delayed again until the next frame, then all others cancelled
	self._preventMultiDetails = self._preventMultiDetails or {}
	local detail = self._preventMultiDetails[methodName]
	if not detail then
		detail = {
			calling = false,
			callsThisFrame = 0,
			updatedThisFrame = false,
		}
		self._preventMultiDetails[methodName] = detail
	end

	detail.callsThisFrame += 1
	if detail.callsThisFrame == 1 then
		local args = table.pack(...)
		task.defer(function()
			local newCallsThisFrame = detail.callsThisFrame
			detail.callsThisFrame = 0
			if newCallsThisFrame > 1 then
				self[methodName](self, unpack(args))
			end
		end)
		return false
	end
	return true
end

function Tracker:update()
	if self:_preventMultiFrameUpdates("update") then
		return
	end
	
	self.totalVolume = 0
	self.parts = {}
	self.partToItem = {}
	self.items = {}
	
	-- This tracks the bodyparts of a character
	for character, _ in pairs(self.characters) do
		local charSize = Tracker.getCharacterSize(character)
		if not charSize then
			continue
		end
		local rSize = charSize
		local charVolume = rSize.X*rSize.Y*rSize.Z
		self.totalVolume += charVolume
		
		local characterJanitor = self.janitor:add(Janitor.new(), "destroy", "trackCharacterParts-"..self.name)
		local function updateTrackerOnParentChanged(instance)
			characterJanitor:add(instance.AncestryChanged:Connect(function()
				if not instance:IsDescendantOf(game) then
					if instance.Parent == nil and characterJanitor ~= nil then
						characterJanitor:destroy()
						characterJanitor = nil
						self:update()
					end
				end
			end), "Disconnect")
		end

		for _, part in pairs(character:GetChildren()) do
			if part:IsA("BasePart") and not Tracker.bodyPartsToIgnore[part.Name] then
				self.partToItem[part] = character
				table.insert(self.parts, part)
				updateTrackerOnParentChanged(part)
			end
		end
		updateTrackerOnParentChanged(character)
		table.insert(self.items, character)
	end

	-- This tracks any additional baseParts
	for additionalPart, _ in pairs(self.baseParts) do
		local rSize = additionalPart.Size
		local partVolume = rSize.X*rSize.Y*rSize.Z
		self.totalVolume += partVolume
		self.partToItem[additionalPart] = additionalPart
		table.insert(self.parts, additionalPart)
		table.insert(self.items, additionalPart)
	end
	
	-- This creates the whitelist so that
	self.whitelistParams = OverlapParams.new()
	self.whitelistParams.FilterType = Enum.RaycastFilterType.Whitelist
	self.whitelistParams.MaxParts = #self.parts
	self.whitelistParams.FilterDescendantsInstances = self.parts
end



return Tracker
--script.Parent.Speed.MouseButton1Click:connect(function()
--	if currentUnits==#UNITS then
--		currentUnits = 1
--	else
--		currentUnits = currentUnits+1
--	end
--	for i,v in pairs(script.Parent.Spd.G:GetChildren()) do
--		v.Visible=v.Name==UNITS[currentUnits].units or v.Name=="Needle" or v.Name=="lns"
--	end
--	script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units
--end)



mouse.KeyDown:connect(function(key)
	if key=="v" then
		script.Parent.Visible=not script.Parent.Visible
	end
end)

script.Parent.Parent.Values.Gear.Changed:Connect(function()
	local gearText = script.Parent.Parent.Values.Gear.Value
	if gearText == 0 then 
		gearText = "N"
		car.Body.Dash.D.G.Tac.Gear.Text = "N"
		car.DriveSeat.Filter:FireServer('reverse',false)
	elseif gearText == -1 then
		gearText = "R"
		car.Body.Dash.D.G.Tac.Gear.Text = "R"
		car.DriveSeat.Filter:FireServer('reverse',true)
	end
	car.Body.Dash.D.G.Tac.Gear.Text = gearText
	car.Body.Dash.D.G.TacB.Gear.Text = gearText
	script.Parent.Tac.G.Gear.Text = gearText
end)

while wait() do
	local speed = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude)
	local kph = math.floor(UNITS[2].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude)
	for i, v in pairs(script.Parent.Tac.G:GetChildren()) do
		if v:IsA("Frame") and v.Name ~= "Unit" then
			local rt = math.abs(script.Parent.Tac.G.Needle.AbsoluteRotation - (v.AbsoluteRotation))
			v.Num.TextSize = math.max(18,(18 - (((rt/4)^2)-18)))
		end
	end
	for i, u in pairs(script.Parent.Spd.G:GetChildren()) do
		for j,v in pairs(u:GetChildren()) do
			if v:IsA("Frame") and v.Name ~= "Unit" then
				local st = math.abs(script.Parent.Spd.G.Needle.AbsoluteRotation - (v.AbsoluteRotation))
				if v:FindFirstChild("Num") then
					v.Num.TextSize = math.max(16,(16 - (((st/4)^2)-16)))
				end
			end
		end
	end
	car.Body.Dash.S.G.HB.S.HP.Text = (math.floor(script.Parent.Parent.Values.Horsepower.Value*0.75))
	car.Body.Dash.S.G.HB.S.Spd.Text = kph
end
--[[function ForEach(parent,func)
	if type(parent)=='table' then
		for _,i in pairs(parent) do
			func(i)
		end
	else
		for _,i in pairs(parent:GetChildren()) do
			func(i)
		end
	end
end]]



function MakeValue(class,name,value,parent)
	local temp = Instance.new(class)
	temp.Name = name
	temp.Value = value
	temp.Parent = parent
	return temp
end
--Constructor and destructor


function spiketrap:New(object)
	--Initialize meta reference
	local self = setmetatable({}, {__index = spiketrap})

	--Use object information
	self.object = object
	self.root = object.PrimaryPart

	--Attach functions
	self.touch_player = TouchPlayer

	return self
end

function spiketrap:Destroy()

end

return spiketrap
---------------------------------



local tool = script.Parent
local player = game.Players.LocalPlayer

local DB = false
tool.Selected:connect(function(mouse)
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function()
		if not DB then
			DB = true
			script.Parent.Click:FireServer()
			mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
			wait(RechargeTime)
			DB = false
			mouse.Icon = "rbxasset://textures\\GunCursor.png"
		end
	end)
end)
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,VRecoil = {13,17}				--- Vertical Recoil
	,HRecoil = {6,8}				--- Horizontal Recoil
	,AimRecover = .75				---- Between 0 & 1
	
	,RecoilPunch = .15
	,VPunchBase = 2.75				--- Vertical Punch
	,HPunchBase = 1.35				--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless
	
	,AimRecoilReduction = 5 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0.2
	,MinRecoilPower = .5
	,MaxRecoilPower = 3.5
	,RecoilPowerStepAmount = .25
	
	,MinSpread = 1.25				--- Min bullet spread value | Studs
	,MaxSpread = 40					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 0.75
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0.05				--- Weapon Base Sway | Studs
	,MaxSway =	1.5					--- Max sway value based on player stamina | Studs
------------------------------------------------------------------------------------------------------------------------------
--// Module



local module = {};

for _, class in next, {"TextLabel", "TextBox", "TextButton", "TextReplace"} do
	module[string.sub(class, 5)] = function(child)
		return customFont.new("A", class == "TextReplace" and child or class, class == "TextButton" or (class == "TextReplace" and child:IsA("TextButton")));
	end;
end;

wait(); -- top bar can mess with stuff if fonts called instantly

return module;
-- show and hide animations


local function show()
	UITween.fade(welcomeFrame1, 0, 2, 0)
	UITween.size(welcomeFrame1, frameSizeStart, 0.4, 0, false)
	UITween.size(welcomeBg, bgSizeStart, 0.6, 0, false)
	UITween.fade(welcomeFrame2, 0, 2, 0)
	UITween.size(welcomeFrame2, frame2SizeStart, 0.4, 0, false)
	wait(0.25)
	UITween.turnOn(welcomeUIPointLight, 1, 2)
	UITween.fade(welcomeBg, 0.6, 2, 0)
	UITween.size(welcomeFrame1, frameSizeMid, 0.4, 0, false)
	UITween.size(welcomeFrame2, frame2SizeMid, 0.4, 0, false)
	UITween.size(welcomeBg, bgSizeStart, 0.4, 0, false)
	wait(0.25)
	UITween.size(welcomeFrame1, frameSizeEnd, 0.4, 0, false)
	UITween.size(welcomeFrame2, frame2SizeEnd, 0.4, 0, false)
	UITween.size(welcomeBg, bgSizeMid, 0.4, 0, false)
	UITween.turnOn(welcomeUIGlow, 2, 0.5)
	--UITween.turnOn(welcomeConsoleGlow, 2, 0.5)
	wait(0.25)
	UITween.size(welcomeFrame1, frameSizeEnd, 0.4, 0, false)
	UITween.size(welcomeBg, bgSizeEnd, 0.4, 0, false)
	UITween.fade(welcomeGrid, 0.8, 0.5, 0)
	UITween.fade(btnLeft, 0, 2, 0)
	UITween.fade(btnRight, 0, 2, 0)
	UITween.fade(lobbyScreen1, 0, 2, 0)
	welcomeMenuIsShowing = true	
end

local function hide()
	UITween.fade(lobbyScreen1, 1, 0.5, 0)
	UITween.fade(lobbyScreen2, 1, 0.5, 0)
	UITween.fade(lobbyScreen3, 1, 0.5, 0)
	UITween.fade(btnLeft, 1, 0.5, 0)
	UITween.fade(btnRight, 1, 0.5, 0)
	UITween.fade(welcomeGrid, 1, 0.5, 0)
	UITween.turnOn(welcomeUIGlow, 0, 0.5)
	--UITween.turnOn(welcomeConsoleGlow, 0, 0.5)
	UITween.turnOn(welcomeUIPointLight, 0, 0.5)
	UITween.size(welcomeBg, bgSizeEnd, 0.4, 0, false)
	UITween.size(welcomeBg, bgSizeMid, 0.4, 0, false)
	wait(0.25)
	UITween.size(welcomeBg, bgSizeMid, 0.4, 0, false)
	UITween.size(welcomeFrame1, frameSizeEnd, 0.4, 0, false)
	UITween.size(welcomeFrame1, frameSizeMid, 0.4, 0, false)
	UITween.size(welcomeFrame2, frame2SizeEnd, 0.4, 0, false)
	UITween.size(welcomeFrame2, frame2SizeMid, 0.4, 0, false)
	wait(0.25)
	UITween.size(welcomeBg, bgSizeStart, 0.4, 0, false)
	UITween.fade(welcomeBg, 1, 2, 0)
	wait(0.25)
	UITween.size(welcomeFrame1, frameSizeStart, 0.4, 0, false)
	UITween.fade(welcomeFrame1, 1, 2, 0)
	UITween.size(welcomeFrame2, frame2SizeStart, 0.4, 0, false)
	UITween.fade(welcomeFrame2, 1, 2, 0)
	welcomeMenuIsShowing = false
end
-- Barrier visualization variables


local barrierPartsFolder = workspace:WaitForChild("BarrierParts")
local barrierPartInfos = {}
local NUMBER_OF_LARGEST_SUBDIVISIONS = 40 -- initial number of barrierParts
local BARRIER_HEIGHT = 2048
local BARRIER_THICKNESS = 0.05
local FRACTION_OF_RADIUS_BEFORE_SPLITTING = 0.5 -- this is the fraction of the current storm radius that an initial barrierPart will split.
												-- following subdivisions will split based on SPLIT_FACTOR
local SPLIT_FACTOR = 0.75 -- this should always be less than 1. The lower the value, the closer the player must be for a barrierPart to split
local MAX_SPLIT_LEVEL = 7 -- max number of times an initial barrierPart can split
local MIN_BARRIERPART_WIDTH = 4
local TRANSPARENCY_FALLOFF_RANGE = NumberRange.new(0, 3000)
local BARRIERPART_COLOR = Color3.fromRGB(195, 14, 255)
--[[
	Connects the events for UI state.

	Returns a Rodux Signal class. This has the same API as RBXScriptSignal but
	lowercase. For example:

	```lua
	local store = Rodux.Store.new(reducer)
	local conn = uiStateEvents.connect(store)

	conn:disconnect()
	```
]]


function uiStatesEvents.connect(store)
	return store.changed:connect(function(newState: reducer.State, oldState: reducer.State)
		-- 3 booleans, one for each of the UI states
		local oldClosedState = not oldState.ui.merchBoothOpen
		local oldCatalogState = oldState.ui.merchBoothOpen and oldState.ui.viewedItemId == nil
		local oldItemState = oldState.ui.merchBoothOpen and oldState.ui.viewedItemId ~= nil

		local newClosedState = not newState.ui.merchBoothOpen
		local newCatalogState = newState.ui.merchBoothOpen and newState.ui.viewedItemId == nil
		local newItemState = newState.ui.merchBoothOpen and newState.ui.viewedItemId ~= nil

		if not oldClosedState and newClosedState then
			uiStatesEvents.merchBoothClosed:Fire()
		end
		if oldClosedState and not newClosedState then
			uiStatesEvents.merchBoothOpened:Fire()
		end

		if not oldCatalogState and newCatalogState then
			uiStatesEvents.catalogViewOpened:Fire()
		end
		if oldCatalogState and not newCatalogState then
			uiStatesEvents.catalogViewClosed:Fire()
		end

		if not oldItemState and newItemState then
			uiStatesEvents.itemViewOpened:Fire(newState.ui.viewedItemId)
		end
		if oldItemState and not newItemState then
			uiStatesEvents.itemViewClosed:Fire(oldState.ui.viewedItemId)
		end
	end)
end

return uiStatesEvents
--	elseif loca == 10 then
--		if sel == 1 then
--			light("solar")
--		elseif sel == 2 then
--			light("lunar")
--		elseif sel == 3 then
--			light("aurora")
--		elseif sel == 4 then
--			light("clarity")
--		elseif sel == 5 then
--			home()
--		end


	end
	names()
	wait()
	hov(sel)
end)

inf.up.MouseButton1Click:connect(function()
	sel = math.max(sel-1,min)
	inf.Main.Select.Hover:TweenPosition(UDim2.new(0, 0, (sel/5)-.2, 0),"InOut","Quad",.5,true)
	hov(sel)
end)

inf.dn.MouseButton1Click:connect(function()
	sel = math.min(sel+1,max)
	inf.Main.Select.Hover:TweenPosition(UDim2.new(0, 0, (sel/5)-.2, 0),"InOut","Quad",.5,true)
	hov(sel)
end)

inf.Music.mg.Input.FocusLost:connect(function(t)
	if t == true then
		if loca == 6 then
			inf.Main.Background.Image = "rbxassetid://"..(inf.Music.mg.Input.Text)
			wait()
			inf.Music.mg.Input.Text = "ENTER ID"
			input(false)
		end
	else
		inf.Music.mg.Input.Text = "ENTER ID"
		input(false)
	end
end)
-- Ajedi32



speed = 0.25

door1 = script.Parent.SlidingDoor1
door2 = script.Parent.SlidingDoor2
open = script.open

function stateChanged()
	if open.Value then
		for i=1,(door1.Size.z/speed) + 1 do
			wait()
			door1.CFrame = door1.CFrame - (door1.CFrame.lookVector * speed)
			door2.CFrame = door2.CFrame - (door2.CFrame.lookVector * speed)
		end
	else
		for i=1,(door1.Size.z/speed) + 1 do
			wait()
			door1.CFrame = door1.CFrame + (door1.CFrame.lookVector * speed)
			door2.CFrame = door2.CFrame + (door2.CFrame.lookVector * speed)
		end
	end
end

open.Changed:connect(stateChanged)
--[[position and movement]]

--
while wait() do
	local closestPlayer, smallestMagnitude = nil,math.huge
	for _, player in pairs(game.Players:GetPlayers()) do
		local distance = player:DistanceFromCharacter(script.Parent.HumanoidRootPart.Position)
		if distance < smallestMagnitude then
			smallestMagnitude = distance
			closestPlayer = player
			if closestPlayer and closestPlayer.Character and closestPlayer.Character:FindFirstChild("HumanoidRootPart") then
				script.Parent.BenHumanoid:MoveTo(closestPlayer.Character.HumanoidRootPart.Position)
			end
		end
	end
end
-----------------------------------------------------------------------------------------------



ItemID = 90423800 -- The ID of the Gamepass/T-Shirt.
OpenTime = 0 -- The time the door is open for.
OpenTrans = 1 -- The transparency of the door when it is open.
CloseTrans = 1 -- The transparency of the door when it is closed.
BuyGUI = true -- Set to false to stop the BuyGUI appearing.
KillOnTouch = false -- Set to false to stop players being killed when they touch it.
--[[Susupension]]


	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= true			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Black"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
-- local emptyObject = require(CurrentModule.utils).emptyObject



local utils = Object.freeze(Object.assign({}, matcherUtils, {
	iterableEquality = iterableEquality,
	subsetEquality = subsetEquality,
}))

local AsymmetricMatcher = {}
AsymmetricMatcher.__index = AsymmetricMatcher
function AsymmetricMatcher.new(sample: any, inverse: boolean?)
	local self = {
		sample = sample,
		inverse = if inverse == nil then false else inverse,
		["$$typeof"] = Symbol.for_("jest.asymmetricMatcher"),
	}

	setmetatable(self, AsymmetricMatcher)
	return self
end

type State_ = MatcherState
function AsymmetricMatcher:getMatcherContext(): State_
	return Object.assign({}, getState(), {
		equals = equals,
		isNot = self.inverse,
		utils = utils,
	})
end
--



if Util.isPlayerBot(localPlayer) then
	print("Configuring player as bot")
end

require(script.Parent:WaitForChild("PlayerModule"):WaitForChild("ControlModule"))

local PlayerBehaviorManager = require(ReplicatedStorage.PlayerBehaviorManager)
PlayerBehaviorManager.init()

local DamageHandler = require(ReplicatedStorage.DamageHandler)
DamageHandler.setup()

require(ReplicatedStorage.Libraries.BTDebugger)
--unfreeze the character


for i = 1, #iceParts do
	local C = iceParts[i]:GetChildren()
    for ii = 1, #C do
        if C[ii].className == "Weld" then
            C[ii]:Destroy()
        end
    end
	local dir = (iceParts[i].Position - iceParts[i].CFrame.p + Vector3.new(0, 1, 0)).unit
	iceParts[i].Velocity = (dir + Vector3.new(math.random() - 0.5, 1, math.random() - 0.5)) * 20
	iceParts[i].RotVelocity = (dir + Vector3.new(math.random() - 0.5, math.random() - 0.5, math.random() - 0.5)) * 10
	local force = Instance.new("BodyForce")
	force.Force = dir * 50 * iceParts[i]:GetMass()
	force.Parent = iceParts[i]
	task.delay(0.25, function() force:Destroy() end)
end

for i, v in pairs(welds) do
	if v then
		v:Destroy()
	end
end

EnableMove()

IceShatter = Instance.new("Sound")
IceShatter.Name = "IceShatter"
IceShatter.SoundId = "rbxassetid://"..shatterSounds[math.random(1, #shatterSounds)]
IceShatter.Parent = Head
IceShatter.PlaybackSpeed = 1
IceShatter.Volume = 1.5
game.Debris:AddItem(IceShatter, 10)
task.delay(0, function() IceShatter:Play() end)
IceShatter.Ended:Connect(function()
	if script then
		script:Destroy()
	end
end)
-- this script removes its parent from the workspace after 29 to 30 seconds



function rnd1()
	local i = math.random(-5000,5000)*.001
	return i
end

function rnd2()
	local i = math.random(-12500,12500)*.001
	return i
end

function rnd3()
	local i = math.random(12500,25000)*.001
	return i
end

wait(1+math.random(20000,20000)*.001)
script.Parent:BreakJoints()
script.Parent.CanCollide = false
script.Parent.Velocity = Vector3.new(rnd2(),rnd3(),rnd2())
script.Parent.RotVelocity = Vector3.new(rnd1(),rnd2(),rnd1())
for i = 0, 1, .1 do
	wait()
	script.Parent.Transparency = i
end
script.Parent.Parent = nil
-- Return the number of common items that follow in forward direction.
-- The length of what Myers paper calls a “snake” in a forward path.


local function countCommonItemsF(aIndex: number, aEnd: number, bIndex: number, bEnd: number, isCommon: IsCommon): number
	local nCommon = 0
	while aIndex < aEnd and bIndex < bEnd and isCommon(aIndex, bIndex) do
		aIndex += 1
		bIndex += 1
		nCommon += 1
	end
	return nCommon
end