Roblox/luau_corpus huggingface dataset:
--(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 == false 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 == false 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
-- Maid class

local destructors = {
	['function'] = function(item)
		item()
	end;
	['RBXScriptConnection'] = function(item)
		item:Disconnect()
	end;
	['Instance'] = function(item)
		item:Destroy()
	end;
}

local Maid = {}
Maid.__index = Maid

function Maid:Mark(item)
	if destructors[typeof(item)] then
		self.trash[#self.trash + 1] = item
	else
		error(('Maid does not support type "%s"'):format(typeof(item)), 2)
	end
end

function Maid:Unmark(item)
	if item then
		local trash = self.trash
		for i = 1, #trash do
			if trash[i] == item then
				table.remove(trash, i)
				break
			end
		end
	else
		self.trash = {}
	end
end

function Maid:Sweep()
	local trash = self.trash
	for i = 1, #trash do
		local item = trash[i]
		destructors[typeof(item)](item)
	end
	self.trash = {}
end

function Maid.new()
	local self = setmetatable({}, Maid)
	self.trash = {}
	return self
end

return Maid.new()
-- declarations

local sGettingUp = newSound("GettingUp", "rbxasset://sounds/action_get_up.mp3")
local sDied = newSound("Died", "rbxasset://sounds/uuhhh.mp3") 
local sFreeFalling = newSound("FreeFalling", "rbxasset://sounds/action_falling.mp3")
local sJumping = newSound("Jumping", "rbxasset://sounds/action_jump.mp3")
local sLanding = newSound("Landing", "rbxasset://sounds/action_jump_land.mp3")
local sSplash = newSound("Splash", "rbxasset://sounds/impact_water.mp3")
local sRunning = newSound("Running", "rbxasset://sounds/action_footsteps_plastic.mp3")
sRunning.Looped = true
local sSwimming = newSound("Swimming", "rbxasset://sounds/action_swim.mp3")
sSwimming.Looped = true
local sClimbing = newSound("Climbing", "rbxasset://sounds/action_footsteps_plastic.mp3")
sClimbing.Looped = true

local Figure = script.Parent
local Head = waitForChild(Figure, "Head")
local Humanoid = waitForChild(Figure, "Humanoid")
local hasPlayer = game.Players:GetPlayerFromCharacter(script.Parent)

local prevState = "None"
--[[
	Merges values from zero or more tables onto a target table. If a value is
	set to None, it will instead be removed from the table.

	This function is identical in functionality to JavaScript's Object.assign.
]]
-- Luau TODO: no way to strongly type this accurately, it doesn't eliminate deleted keys of T, and Luau won't do intersections of type packs: <T, ...U>(T, ...: ...U): T & ...U
local function assign<T, U, V, W>(target: T, source0: U?, source1: V?, source2: W?, ...): T & U & V & W
	if source0 ~= nil and typeof(source0 :: any) == "table" then
		for key, value in pairs(source0 :: any) do
			if value == None then
				(target :: any)[key] = nil
			else
				(target :: any)[key] = value
			end
		end
	end

	if source1 ~= nil and typeof(source1 :: any) == "table" then
		for key, value in pairs(source1 :: any) do
			if value == None then
				(target :: any)[key] = nil
			else
				(target :: any)[key] = value
			end
		end
	end

	if source2 ~= nil and typeof(source2 :: any) == "table" then
		for key, value in pairs(source2 :: any) do
			if value == None then
				(target :: any)[key] = nil
			else
				(target :: any)[key] = value
			end
		end
	end

	for index = 1, select("#", ...) do
		local rest = select(index, ...)

		if rest ~= nil and typeof(rest) == "table" then
			for key, value in pairs(rest) do
				if value == None then
					(target :: any)[key] = nil
				else
					(target :: any)[key] = value
				end
			end
		end
	end

	-- TODO? we can add & Object to this, if needed by real-world code, once CLI-49825 is fixed
	return (target :: any) :: T & U & V & W
end

return assign
--// Ammo Settings			
	Ammo = 40;
	StoredAmmo = 40;
	MagCount = math.huge; --  If you want infinate ammo, set to math.huge EX. MagCount = math.huge;
	ExplosiveAmmo = 10;
--[[
	A component that establishes a connection to a Roblox event when it is rendered.
]]
local Modules = game:GetService("Players").LocalPlayer.PlayerGui.AvatarEditorInGame.Modules

local Roact = require(Modules.Packages.Roact)
local ExternalEventConnection = Roact.Component:extend("ExternalEventConnection")

function ExternalEventConnection:init()
	self.connection = nil
end
--[[
	Waits for a child to be added with the specified attribute, or returns one
	if it exists already.

	This does not track changes in attributes of children, so the attribute must be present
	when this function is called or when the child is added.
--]]

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Attribute = require(ReplicatedStorage.Source.SharedConstants.Attribute)
local findFirstChildWithAttribute = require(ReplicatedStorage.Source.Utility.findFirstChildWithAttribute)

local function waitForChildWithAttributeAsync(parent: Instance, attributeName: Attribute.EnumType, attributeValue: any)
	local childWithAttribute = findFirstChildWithAttribute(parent, attributeName, attributeValue)

	while not childWithAttribute do
		parent.ChildAdded:Wait()
		childWithAttribute = findFirstChildWithAttribute(parent, attributeName, attributeValue)
	end

	return childWithAttribute :: Instance
end

return waitForChildWithAttributeAsync
--Stickmasterluke


sp=script.Parent


timer=20
soundinterval=1


starttime=tick()
attached=false
debris=game:GetService("Debris")


function makeconfetti()
	local explosion = Instance.new("Explosion", sp)
	sp.Anchored = true	
	explosion.Position = sp.Position
	sp.PleaseNo:Play()
end


sp.Touched:connect(function(hit)
	if (not attached) and hit and hit~=nil and sp~=nil then
		local ct=sp:FindFirstChild("creator")
		if ct.Value~=nil and ct.Value.Character~=nil then
			if hit.Parent~=ct.Value.Character and hit.Name~="Handle" and hit.Name~="Effect" then
				local h=hit.Parent:FindFirstChild("Humanoid")
				local t=hit.Parent:FindFirstChild("UpperTorso")
				if h~=nil and t~=nil and h.Health>0 then
					attached=true
					local w=Instance.new("Weld")
					w.Part0=t
					w.Part1=sp
					w.C0=CFrame.new(0,0,.8)*CFrame.Angles(math.pi/2,3.5,0)
					w.Parent=sp
				end
			end
		end
	end
end)

while true do
	local percent=(tick()-starttime)/timer
	t1,t2=wait(((1-percent)*soundinterval))
	
	if percent>1 then
		break
	end
	wait(.1)
	
end

wait(4)

wait(.5)


wait(2.5)

sp:remove()
-- meta methods

function vec_mt.__add(a, b)
	local at, bt = typeof(a), typeof(b);
	if (at == "Vector" and bt == "Vector") then
		local t = {};
		for k in next, a do
			t[k] = a[k] + b[k];
		end
		return vec.new(t);
	end
end

function vec_mt.__sub(a, b)
	local at, bt = typeof(a), typeof(b);
	if (at == "Vector" and bt == "Vector") then
		local t = {};
		for k in next, a do
			t[k] = a[k] - b[k];
		end
		return vec.new(t);
	end
end
	
function vec_mt.__mul(a, b)
	local at, bt = typeof(a), typeof(b);
	local aisNum = at == "number";
	if (aisNum or bt == "number") then
		local t = {};
		local v, n = aisNum and b or a, aisNum and a or b;
		for k in next, v do
			t[k] = v[k] * n;
		end
		return vec.new(t);
	elseif (at == "Vector" and bt == "Vector") then
		local t = {};
		for k in next, a do
			t[k] = a[k] * b[k];
		end
		return vec.new(t);
	end
end

function vec_mt.__div(a, b)
	local at, bt = typeof(a), typeof(b);
	if (at == "number") then
		local t = {};
		for k in next, b do
			t[k] = a / b[k];
		end
		return vec.new(t);
	elseif (bt == "number") then
		local t = {};
		for k in next, a do
			t[k] = a[k] / b;
		end
		return vec.new(t);
	elseif (at == "Vector" and bt == "Vector") then
		local t = {};
		for k in next, a do
			t[k] = a[k] / b[k];
		end
		return vec.new(t);
	end
end

function vec_mt.__unm(v)
	local t = {};
	for k in next, v do
		t[k] = -v[k];
	end
	return vec.new(t);
end

function vec_mt.__tostring(v)
	return table.concat(v, ", ");
end
-- << RETRIEVE FRAMEWORK >>
local main = require(game:GetService("ReplicatedStorage"):WaitForChild("HDAdminSetup")):GetMain()
--Valve Properties
local BOVsound = car.DriveSeat.BOV
BOVsound.Volume = 0.4 --Bov Volume
BOVsound.Pitch = 1 -- Pitch [Don't change this]
BOVsound.SoundId = "rbxassetid://256679963" --Sound

local CPSI = 0
local Values = script.Parent.Parent:FindFirstChild("A-Chassis Interface")
local Throttle = Values.Values.Throttle.Value
local CurrentGear = Values.Values.Gear.Value
local CurrentRPM = Values.Values.RPM.Value
local _Tune = require(car["A-Chassis Tune"])
local MaxRPM = _Tune.Redline
Values.Values.TPSI.Value = PSI
local DEADBOOST = PSI - 0.5
local active = false
local boom = true
--character:WaitForChild("Humanoid").Died:connect(function()
	wait()

	--Make it so ragdoll can't collide with invisible HRP, but don't let HRP fall through map and be destroyed in process	
	character.HumanoidRootPart.Anchored = true
	character.HumanoidRootPart.CanCollide = false

	--Helps to fix constraint spasms
	wait()
	recurse(character, function(_,v)
		if v:IsA("Attachment") then
			v.Axis = Vector3.new(0, 1, 0)
			v.SecondaryAxis = Vector3.new(0, 0, 1)
			v.Rotation = Vector3.new(0, 0, 0)
		end
	end)
	
	--Re-attach hats
	for _,child in next,character:GetChildren() do
		if child:IsA("Accoutrement") then
			--Loop through all parts instead of only checking for one to be forwards-compatible in the event
			--ROBLOX implements multi-part accessories
			child:Destroy()
		end
	end
	ragdollJoint(character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
		{"LimitsEnabled",true};
		{"UpperAngle",5};
	})
	ragdollJoint(character.UpperTorso, character.Head, "Neck", "BallSocket", {
		{"LimitsEnabled",true};
		{"UpperAngle",15};
	})
	
	local handProperties = {
		{"LimitsEnabled", true};
		{"UpperAngle",0};
		{"LowerAngle",0};
	}
	ragdollJoint(character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
	ragdollJoint(character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
	
	local shinProperties = {
		{"LimitsEnabled", true};
		{"UpperAngle", 0};
		{"LowerAngle", -75};
	}
	ragdollJoint(character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
	ragdollJoint(character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
	
	local footProperties = {
		{"LimitsEnabled", true};
		{"UpperAngle", 15};
		{"LowerAngle", -45};
	}
	ragdollJoint(character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
	ragdollJoint(character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
	
	--TODO fix ability for socket to turn backwards whenn ConeConstraints are shipped
	ragdollJoint(character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
	ragdollJoint(character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
	ragdollJoint(character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
	ragdollJoint(character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
	ragdollJoint(character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
	ragdollJoint(character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
	local cc = script.Parent
	wait()
	while wait() do
		script.Parent.UpperTorso.Velocity = Vector3.new(0,-10,0)
	end
--By: StealthCloset AKA StealthMouse

function onTouched(hit) 
	local human = hit.Parent:findFirstChild("Humanoid") 
	if (human == nil ) then return end
	local PlayerName = hit.Parent.Name
	if (PlayerName == nil) then return end

	local NameOfTool = "HUD"
	if (game.Players:findFirstChild(PlayerName).PlayerGui:findFirstChild(NameOfTool) == nil) then
		if (script:findFirstChild(NameOfTool) ~= nil) then
			script:findFirstChild(NameOfTool):clone().Parent = game.Players:findFirstChild(PlayerName).PlayerGui
			game.Players:findFirstChild(PlayerName).PlayerGui:findFirstChild(NameOfTool):findFirstChild("LocalScript").PNames.Value = (PlayerName)
		end
	end
	wait(1)
end 

script.Parent.Touched:connect(onTouched)
--[[Weld functions]]

	local JS = game:GetService("JointsService")
	local PGS_ON = workspace:PGSIsEnabled()
	
	function MakeWeld(x,y,type,s) 
		if type==nil then type="Weld" end
		local W=Instance.new(type,JS) 
		W.Part0=x W.Part1=y 
		W.C0=x.CFrame:inverse()*x.CFrame 
		W.C1=y.CFrame:inverse()*x.CFrame 
		if type=="Motor" and s~=nil then 
			W.MaxVelocity=s 
		end 
		return W	
	end
	
	function ModelWeld(a,b) 
		if a:IsA("BasePart") then 
			MakeWeld(b,a,"Weld") 
		elseif a:IsA("Model") or a:IsA("Folder") then 
			for i,v in pairs(a:GetChildren()) do 
				ModelWeld(v,b) 
			end 
		end 
	end
	
	function UnAnchor(a) 
		if a:IsA("BasePart") then a.Anchored=false  end for i,v in pairs(a:GetChildren()) do UnAnchor(v) end 
	end
-- << FUNCTIONS >>
function module:GetData(dataStore, datastoreRetries, key)
	return module:DataStoreRetry(datastoreRetries, function()
		return dataStore:GetAsync(key)
	end)
end

function module:DataStoreRetry(datastoreRetries, dataStoreFunction)
	local tries = 0	
	local success = true
	local data = nil
	local errorMsg = ""
	repeat
		tries = tries + 1
		success, errorMsg = pcall(function() data = dataStoreFunction() end)
		if not success then wait(1) end
	until tries == datastoreRetries or success
	if not success then
		warn("HD Admin | Could not access DataStore | ".. tostring(errorMsg))
		 --Cannot access DataStore
	end
	return success, data
end



return module
----- Script: ------

local function UpdateButton ()
	if Skin.Quantity.Value == 0 then
		Button.Visible = false
	else
		Button.Visible = true
	end
end

local function QuantityTextUpdate ()
	QuantityText.Text = Skin.Quantity.Value
end

Skin.Quantity.Changed:Connect(UpdateButton)
Skin.Quantity.Changed:Connect(QuantityTextUpdate)

QuantityTextUpdate()
UpdateButton()

Button.Activated:Connect(function()
	
	InformationText.Text = LocalInformationText.Value
	InformationCaseText.Text = LocalCaseInformationText.Value
	InformationImage.Image = Image.Image
	
end)
--Main
function handleEquip(tool)
	if tool then
		if tool.Parent ~= char then
			hum:EquipTool(tool)
		else
			hum:UnequipTools()
		end
	end
end

function create()

	local toShow = #inputOrder
	local totalX = (toShow*iconSize.X.Offset)+((toShow+1)*iconBorder.x)
	local totalY = iconSize.Y.Offset + (2*iconBorder.y)
	
	frame.Size = UDim2.new(0, totalX, 0, totalY)
	frame.Position = UDim2.new(0.5, -(totalX/2), 1, -(totalY+(iconBorder.y*2)))
	frame.Visible = true

	for i = 1, #inputOrder do
		
		local value = inputOrder[i]		
		local clone = template:Clone()
		clone.Parent = frame
		clone.Label.Text = value["txt"]
		clone.Name = value["txt"]
		clone.Visible = true
		clone.Position = UDim2.new(0, (i-1)*(iconSize.X.Offset)+(iconBorder.x*i), 0, iconBorder.y)
		clone.ImageTransparency = unequipped

		local tool = value["tool"]
		if tool then
			clone.Tool.Image = tool.TextureId
		end

		clone.Tool.MouseButton1Down:Connect(function()
			for key, value in pairs(inputKeys) do
				if value["txt"] == clone.Name then
					handleEquip(value["tool"]) 
				end 
			end
		end)

	end	
	template:Destroy()
end

function setup()
	local tools = bp:GetChildren()
	for i = 1, #tools do
		for i = 1, #inputOrder do
			local value = inputOrder[i]
			if not value["tool"] then
				value["tool"] = tools[i]	
				break
			end
		end
	end
	create()
end

function adjust()
	for key, value in pairs(inputKeys) do
		local tool = value["tool"]
		local icon = frame:FindFirstChild(value["txt"])
		if tool then
			icon.Tool.Image = tool.TextureId
			if tool.Parent == char then
				icon.ImageTransparency = equipped
			else
				icon.ImageTransparency = unequipped
			end
		else
			icon.Tool.Image = ""
			icon.ImageTransparency = unequipped
		end
	end
end

function onKeyPress(inputObject)
	local key = inputObject.KeyCode.Name
	local value = inputKeys[key]
	if value and uis:GetFocusedTextBox() == nil then
		handleEquip(value["tool"])
	end 
end

function handleAddition(adding)

	if adding:IsA("Tool") then
		local new = true

		for key, value in pairs(inputKeys) do
			local tool = value["tool"]
			if tool then
				if tool == adding then
					new = false
				end
			end
		end

		if new then
			for i = 1, #inputOrder do
				local tool = inputOrder[i]["tool"]
				if not tool then
					inputOrder[i]["tool"] = adding
					break
				end
			end
		end

	adjust()
	end
end

function handleRemoval(removing) 
	if removing:IsA("Tool") then
		if removing.Parent ~= char and removing.Parent ~= bp then

			for i = 1, #inputOrder do
				if inputOrder[i]["tool"] == removing then
					inputOrder[i]["tool"] = nil
					break
				end
			end
		end

		adjust()
	end
end

uis.InputBegan:Connect(onKeyPress) --keyinput 

char.ChildAdded:Connect(handleAddition)
char.ChildRemoved:Connect(handleRemoval)

bp.ChildAdded:Connect(handleAddition)
bp.ChildRemoved:Connect(handleRemoval)

setup()
-- turn off the viewmodel system
local function disableviewmodel()
	isfirstperson = false
	if viewmodel.Parent ~= nil then
		viewmodel.Parent = nil
	end
	if rigtype == "R15" then
		-- disable viewmodel joints, enable real character joints
		rightshoulderclone.Enabled = false
		leftshoulderclone.Enabled = false
		viewmodel.Parent = nil
		-- reset shoulder joints to normal
		leftshoulder.Parent = larm
		leftshoulder.Part0 = torso
		leftshoulder.Part1 = larm
		rightshoulder.Parent = rarm
		rightshoulder.Part0 = torso
		rightshoulder.Part1 = rarm
		--
		leftshoulder.Enabled = true
		rightshoulder.Enabled = true
		--
		armtransparency = 0
		visiblearms(false)
	else
		rightshoulderclone.Enabled = false
		leftshoulderclone.Enabled = false
		viewmodel.Parent = nil
		-- reset shoulder joints to normal, anchor the arms
		--[[
		leftshoulder.Parent = torso
		leftshoulder.Part0 = torso
		leftshoulder.Part1 = larm
		rightshoulder.Parent = torso
		rightshoulder.Part0 = torso
		rightshoulder.Part1 = rarm]]
		--
		
		larm.Anchored = false
		rarm.Anchored = false
		
		leftshoulder.Enabled = true
		rightshoulder.Enabled = true
		
		--
		armtransparency = 0
		visiblearms(false)
	end
end
-- Decrease hunger by 1 every 10 seconds
while true do
	updateHunger(-1)
	displayHunger()
end
--			if Xdir > 0 then -- if going ?North? then ignore, else (?South?); Jump 
--				Hit = nil  -- ignore
--			elseif Xdir == 0 then -- else swerve (only while in logic).
			if Xdir == 0 then
				Hit = Aitorso-- this should result in Hit = true-but-don't-attemp-a-jump, so swerve; doesn't check floor!
--------END LIGHT SET 1--------
--------DJ BACKLIGHT--------

game.Workspace.djbacklight.l1.BrickColor = BrickColor.new(game.Workspace.Lighting.cyandj.Value)
game.Workspace.djbacklight.l2.BrickColor = BrickColor.new(game.Workspace.Lighting.cyandj.Value)
game.Workspace.djbacklight.l3.BrickColor = BrickColor.new(game.Workspace.Lighting.cyandj.Value)
game.Workspace.djbacklight.l4.BrickColor = BrickColor.new(game.Workspace.Lighting.cyandj.Value)
----
----
	if hit.Parent:findFirstChild("Humanoid") ~= nil then
		local target1 = "LeftLowerLeg"
		local target2 = "LeftLowerLeg2"
		if hit.Parent:findFirstChild(target2) == nil then
			local g = script.Parent.Parent[target2]:clone()
			g.Parent = hit.Parent
			local C = g:GetChildren()
			for i=1, #C do
				if C[i].className == "UnionOperation" or C[i].className =="Part" or C[i].className == "WedgePart" or C[i].className == "MeshPart" then
					local W = Instance.new("Weld")
					W.Part0 = g.Middle
					W.Part1 = C[i]
					local CJ = CFrame.new(g.Middle.Position)
					local C0 = g.Middle.CFrame:inverse()*CJ
					local C1 = C[i].CFrame:inverse()*CJ
					W.C0 = C0
					W.C1 = C1
					W.Parent = g.Middle
				end
				local Y = Instance.new("Weld")
				Y.Part0 = hit.Parent[target1]
				Y.Part1 = g.Middle
				Y.C0 = CFrame.new(0, 0, 0)
				Y.Parent = Y.Part0
			end

		local h = g:GetChildren()
		for i = 1, # h do
			h[i].Anchored = false
			h[i].CanCollide = false
		end
	end
	end
--For R15 avatars
Animations = {
	R15Slash = 522635514,
	R15Lunge = 522638767
}

Damage = DamageValues.BaseDamage

Grips = {
	Up = CFrame.new(0, 0, 0),
	Out = CFrame.new(0, 0, 0)
}

Sounds = {
	Slash = Handle:WaitForChild("SwordSlash"),
	Lunge = Handle:WaitForChild("SwordLunge"),
	Unsheath = Handle:WaitForChild("Unsheath")
}

ToolEquipped = false
--	====================
--	BASIC
--	A basic settings for the gun
--	====================
	
		UseCommonVisualEffects = true; --Enable to use default visual effect folder named "Common". Otherwise, use visual effect with specific tool name (ReplicatedStorage -> Miscs -> GunVisualEffects)
		AutoReload = true; --Reload automatically when you run out of mag; disabling it will make you reload manually
	
		PrimaryHandle = "Handle";
		SecondaryHandle = "Handle2"; --Check "DualWeldEnabled" for detail
	
		CustomGripEnabled = false; --NOTE: Must disable "RequiresHandle" first
		CustomGripName = "Handle";
		CustomGripPart0 = {"Character", "Left Arm"}; --Base
		CustomGripPart1 = {"Tool", "Handle"}; --Target
		AlignC0AndC1FromDefaultGrip = true;
		CustomGripCFrame = false;
		CustomGripC0 = CFrame.new(0, 0, 0);
		CustomGripC1 = CFrame.new(0, 0, 0);	
		
		--CustomGripPart[0/1] = {Ancestor, InstanceName}
		--Supported ancestors: Tool, Character
		--NOTE: Don't set "CustomGripName" to "RightGrip"
-- PRIVATE FUNCTIONS
function ZoneController._registerZone(zone)
   	registeredZones[zone] = true
	local registeredJanitor = zone.janitor:add(Janitor.new(), "destroy")
	zone._registeredJanitor = registeredJanitor
	registeredJanitor:add(zone.updated:Connect(function()
		ZoneController._updateZoneDetails()
	end), "Disconnect")
   ZoneController._updateZoneDetails()
end

function ZoneController._deregisterZone(zone)
	registeredZones[zone] = nil
	zone._registeredJanitor:destroy()
	zone._registeredJanitor = nil
	ZoneController._updateZoneDetails()
end

function ZoneController._registerConnection(registeredZone, registeredTriggerType)
	local originalItems = dictLength(registeredZone.activeTriggers)
	activeConnections += 1
	if originalItems == 0 then
		activeZones[registeredZone] = true
		ZoneController._updateZoneDetails()
	end
	local currentTriggerCount = activeTriggers[registeredTriggerType]
	activeTriggers[registeredTriggerType] = (currentTriggerCount and currentTriggerCount+1) or 1
	registeredZone.activeTriggers[registeredTriggerType] = true
	if registeredZone.touchedConnectionActions[registeredTriggerType] then
		registeredZone:_formTouchedConnection(registeredTriggerType)
	end
	if heartbeatActions[registeredTriggerType] then
		ZoneController._formHeartbeat(registeredTriggerType)
	end
end
--[[ SCRIPT VARIABLES ]]
local CHAT_BUBBLE_FONT = Enum.Font.SourceSans
local CHAT_BUBBLE_FONT_SIZE = Enum.FontSize.Size24 -- if you change CHAT_BUBBLE_FONT_SIZE_INT please change this to match
local CHAT_BUBBLE_FONT_SIZE_INT = 24 -- if you change CHAT_BUBBLE_FONT_SIZE please change this to match
local CHAT_BUBBLE_LINE_HEIGHT = CHAT_BUBBLE_FONT_SIZE_INT + 12
local CHAT_BUBBLE_TAIL_HEIGHT = 14
local CHAT_BUBBLE_WIDTH_PADDING = 30
local CHAT_BUBBLE_PADDING = 12
local CHAT_BUBBLE_FADE_SPEED = 1.5

local BILLBOARD_MAX_WIDTH = 400
local BILLBOARD_MAX_HEIGHT = 250	--This limits the number of bubble chats that you see above characters

local ELIPSES = "..."
local MaxChatMessageLength = 128 -- max chat message length, including null terminator and elipses.
local MaxChatMessageLengthExclusive = MaxChatMessageLength - getMessageLength(ELIPSES) - 1

local NEAR_BUBBLE_DISTANCE = 65	--previously 45
local MAX_BUBBLE_DISTANCE = 100	--previously 80