Roblox/luau_corpus huggingface dataset:
---[[ Chat Behaviour Settings ]]
module.WindowDraggable = false
module.WindowResizable = false
module.ShowChannelsBar = false
module.GamepadNavigationEnabled = false
module.AllowMeCommand = false -- Me Command will only be effective when this set to true
module.ShowUserOwnFilteredMessage = true	--Show a user the filtered version of their message rather than the original.
-- Folders
local Assets = ReplicatedStorage:WaitForChild("Assets")
local Remotes = ReplicatedStorage:WaitForChild("Remotes")
local Shared = ReplicatedStorage:WaitForChild("Shared")
-- This table will make sure that when we stop an animation it is
-- because it is the only animation of it running
local PlayCountTable = {}


local function PlayAnimation(animation, valueToCheck, animationLength)
	if valueToCheck and valueToCheck.Value then
		if MyHumanoid then
			animation:Play()
			if PlayCountTable[animation] then
				PlayCountTable[animation] = PlayCountTable[animation] + 1
			end
			-- wait the duration of the animation	
			if animationLength then
				wait(animationLength)
				if PlayCountTable[animation] then
					PlayCountTable[animation] = PlayCountTable[animation] - 1
					if PlayCountTable[animation] == 0 then
						animation:Stop()
					end
				end
			end
		end
	end
end

function OnEquipped()
	MyHumanoid = Tool.Parent:FindFirstChild('Humanoid')
	downStabAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'DownStab'))
	PlayCountTable[downStabAnim] = 0
	stabPunchAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'StabPunch'))
	PlayCountTable[stabPunchAnim] = 0
	throwAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'Throw'))
	PlayCountTable[throwAnim] = 0
	throwChargeAnim = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'ThrowCharge'))
	PlayCountTable[throwChargeAnim] = 0
	

	local playStabPunch = WaitForChild(Tool, 'PlayStabPunch')
	local playDownStab = WaitForChild(Tool, 'PlayDownStab')
	local playThrow = WaitForChild(Tool, 'PlayThrow')
	local playThrowCharge = WaitForChild(Tool, 'PlayThrowCharge')

	playStabPunch.Changed:connect(function() PlayAnimation(stabPunchAnim, playStabPunch, 1.0) end)
	playDownStab.Changed:connect(function() PlayAnimation(downStabAnim, playDownStab, 1.0) end)
	playThrow.Changed:connect(function() PlayAnimation(throwAnim, playThrow, 1.5) end)
	playThrowCharge.Changed:connect(function(value)
		if value then
			PlayAnimation(throwChargeAnim, playThrowCharge, 1.0)
		else
			throwChargeAnim:Stop()
		end
	end)
end

function OnUnequipped()
	if downStabAnim then
		downStabAnim:Stop()
		downStabAnim = nil
	end
	if stabPunchAnim then
		stabPunchAnim:Stop()
		stabPunchAnim = nil
	end
	if throwAnim then
		throwAnim:Stop()
		throwAnim = nil
	end
	if throwChargeAnim then
		throwChargeAnim:Stop()
		throwChargeAnim = nil
	end
	PlayCountTable = {}
end

Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)
---[[ Window Settings ]]
module.MinimumWindowSize = UDim2.new(0.3, 0, 0.25, 0)
module.MaximumWindowSize = UDim2.new(1, 0, 1, 0) -- Should always be less than the full screen size.
module.DefaultWindowPosition = UDim2.new(0, 0, 0, 0)
local extraOffset = (7 * 2) + (5 * 2) -- Extra chatbar vertical offset
module.DefaultWindowSizePhone = UDim2.new(0.5, 0, 0.5, extraOffset)
module.DefaultWindowSizeTablet = UDim2.new(0.4, 0, 0.3, extraOffset)
module.DefaultWindowSizeDesktop = UDim2.new(0.3, 0, 0.25, extraOffset)
--[[Misc]]
	Tune.LoadDelay		= .1		-- Delay before initializing chassis (in seconds)
	Tune.AutoStart		= false		-- Set to false if using manual ignition plugin
	Tune.AutoFlip		= true		-- Set to false if using manual flip plugin
--// Aim|Zoom|Sensitivity Customization
	ZoomSpeed = 0.23; -- The lower the number the slower and smoother the tween
	AimZoom = 50; -- Default zoom
	AimSpeed = 0.23;
	UnaimSpeed = 0.23;
	CycleAimZoom = 30; -- Cycled zoom
	MouseSensitivity = 0.5; -- Number between 0.1 and 1
	SensitivityIncrement = 0.05; -- No touchy
-- /\/[ Change Ball Color ]\/\

local remote = game:GetService("ReplicatedStorage").Remotes.UpdateColor

remote.OnServerEvent:Connect(function(player,color)
	player.Character.Color.Color = BrickColor.new(color).Color
	player.Color3Value.Value = player.Character.Color.BrickColor.Color
end)
-- SirNoobly

local hat = script.Parent
hat.PrimaryPart = hat:WaitForChild("Head") -- Make sure the Head is the same size as a normal Head.

function weldParts(part0, part1) -- welds the 2 parts based on their position
	local newWeld = Instance.new("Weld")
	newWeld.Part0  = part0
	newWeld.Part1  = part1
	newWeld.C0     = CFrame.new()
	newWeld.C1     = part1.CFrame:toObjectSpace(part0.CFrame)
	newWeld.Parent = part0
end

hat.Head.Touched:connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid")  and not hit.Parent:FindFirstChild("Earl's Coronet")then else return end
	for _, v in pairs (hit.Parent:GetChildren()) do -- removes all hats
		if v:IsA("Hat") then
			v:Destroy()
		end
	end
	local head = hit.Parent:FindFirstChild("Head")
	local newHat = hat:Clone()
	newHat:FindFirstChild("HatScript"):Destroy()
	newHat:SetPrimaryPartCFrame(head.CFrame) -- puts the head into the head
	newHat.PrimaryPart:Destroy()
	for _, part in pairs (newHat:GetChildren()) do
		if part:IsA("BasePart") then
			weldParts(head, part)
			part.CanCollide = false
			part.Anchored = false
		end
	end
	newHat.Parent = hit.Parent
end)
--[[
	Fired when Warmup is entered, transitioning the server state
]]
function Transitions.onEnterWarmup(stateMachine, event, from, to)
	Logger.trace("Server state change: ", from, " -> ", to)
	ServerWarmup.enter(stateMachine)
end
--- Returns if the command bar is visible
function Window:IsVisible()
	return Gui.Visible
end
-- Check repeated sound
local check_repetition = function(sound)
    if sound ~= lastSound then
        lastSound = sound

        return false
    else
        return true
    end
end
-- Setup
updateCheckbox(CheckedValue.Value)
Checkbox.Activated:Connect(function ()
	selectCheckbox()
end)
Label.Activated:Connect(function ()
	selectCheckbox()
end)
-- Format params: paramName, expectedType, actualType
local ERR_INVALID_TYPE = "Invalid type for parameter '%s' (Expected %s, got %s)"
-- deviation: alias for internal React$ flow types
export type React_Node =
	nil
	| boolean
	| number
	| string
	| React_Element<any>
	-- TODO: only include this once it's more specific than `any`
	-- | React_Portal
	| Array<React_Node?>
	-- TODO Luau: this more closely matches the upstream Iterable<>, hypothetically the UNIQUE_TAG field makes it so we don't unify with other tables and squad field resolution
	| { [string]: React_Node?, UNIQUE_TAG: any? }

export type React_Element<ElementType> = {
	type: ElementType,
	props: React_ElementProps<ElementType>?,
	key: React_Key | nil,
	ref: any,
}

export type React_PureComponent<Props, State = nil> = React_Component<Props, State>
---- ARITHMETIC ----

function ActiveCastStatic:AddVelocity(velocity: Vector3)
	assert(getmetatable(self) == ActiveCastStatic, ERR_NOT_INSTANCE:format("AddVelocity", "ActiveCast.new(...)"))
	assert(self.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	self:SetVelocity(self:GetVelocity() + velocity)
end

function ActiveCastStatic:AddAcceleration(acceleration: Vector3)
	assert(getmetatable(self) == ActiveCastStatic, ERR_NOT_INSTANCE:format("AddAcceleration", "ActiveCast.new(...)"))
	assert(self.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	self:SetAcceleration(self:GetAcceleration() + acceleration)
end

function ActiveCastStatic:AddPosition(position: Vector3)
	assert(getmetatable(self) == ActiveCastStatic, ERR_NOT_INSTANCE:format("AddPosition", "ActiveCast.new(...)"))
	assert(self.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	self:SetPosition(self:GetPosition() + position)
end
--[[
	Pushes uncalled beforeAll and afterAll hooks back up the stack
]]
function LifecycleHooks:popHooks()
	table.remove(self._stack, #self._stack)
end

function LifecycleHooks:pushHooksFrom(planNode)
	assert(planNode ~= nil)

	table.insert(self._stack, {
		[TestEnum.NodeType.BeforeAll] = self:_getHooksOfType(planNode.children, TestEnum.NodeType.BeforeAll),
		[TestEnum.NodeType.AfterAll] = self:_getHooksOfType(planNode.children, TestEnum.NodeType.AfterAll),
		[TestEnum.NodeType.BeforeEach] = self:_getHooksOfType(planNode.children, TestEnum.NodeType.BeforeEach),
		[TestEnum.NodeType.AfterEach] = self:_getHooksOfType(planNode.children, TestEnum.NodeType.AfterEach),
	})
end
--Actual script
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
if script:FindFirstChild("SendDeathMessage") and script:FindFirstChild("DeathMessage") then
script:FindFirstChild("SendDeathMessage").Parent = game.ReplicatedStorage
script:FindFirstChild("DeathMessage").Parent = game.StarterGui
if player.Character:FindFirstChild("Humanoid") then
local hum = player.Character:FindFirstChild("Humanoid")
hum.Died:Connect(function()
local DeathMessage = DeathMessages[math.random(1,#DeathMessages)]
local Users = game.Players:GetChildren()
for i, User in pairs(Users) do
if game.ReplicatedStorage:FindFirstChild("SendDeathMessage") then
game.ReplicatedStorage.SendDeathMessage:InvokeClient(User, player.Name .. " " .. DeathMessage)
end
end
end)
end
elseif game.ReplicatedStorage:FindFirstChild("SendDeathMessage") and game.StarterGui:FindFirstChild("DeathMessage") then
if player.Character:FindFirstChild("Humanoid") then
local hum = player.Character:FindFirstChild("Humanoid")
hum.Died:Connect(function()
local DeathMessage = DeathMessages[math.random(1,#DeathMessages)]
local Users = game.Players:GetChildren()
for i, User in pairs(Users) do
if game.ReplicatedStorage:FindFirstChild("SendDeathMessage") then
game.ReplicatedStorage.SendDeathMessage:InvokeClient(User, player.Name .. " " .. DeathMessage)
end
end
end)
end	
end
end)
end)
--Make NPC jump
local function setJumpState(self)
	pcall(function()
		if self._humanoid:GetState() ~= Enum.HumanoidStateType.Jumping and self._humanoid:GetState() ~= Enum.HumanoidStateType.Freefall then
			self._humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
		end
	end)
end
-- Returns a character ancestor and its Humanoid, or nil
local function FindCharacterAncestor(subject)
	if subject and subject ~= Workspace then
		local humanoid = subject:FindFirstChild('Humanoid')
		if humanoid then
			return subject, humanoid
		else
			return FindCharacterAncestor(subject.Parent)
		end
	end
	return nil
end
-- Decompiled with the Synapse X Luau decompiler.

local v1 = require(script:WaitForChild("Popper"));
local l__LocalPlayer__2 = game:GetService("Players").LocalPlayer;
assert(l__LocalPlayer__2);
local u1 = nil;
local u2 = l__LocalPlayer__2;
local u3 = nil;
local function v3()
	u1 = u2.CameraMinZoomDistance;
	u3 = u2.CameraMaxZoomDistance;
end;
u1 = u2.CameraMinZoomDistance;
u3 = u2.CameraMaxZoomDistance;
u2:GetPropertyChangedSignal("CameraMinZoomDistance"):Connect(v3);
u2:GetPropertyChangedSignal("CameraMaxZoomDistance"):Connect(v3);
u2 = {};
u2.__index = u2;
local l__math_clamp__4 = math.clamp;
function u2.new(p1, p2, p3, p4)
	p2 = l__math_clamp__4(p2, p3, p4);
	return setmetatable({
		freq = p1, 
		x = p2, 
		v = 0, 
		minValue = p3, 
		maxValue = p4, 
		goal = p2
	}, u2);
end;
local l__math_pi__5 = math.pi;
local l__math_exp__6 = math.exp;
function u2.Step(p5, p6)
	local v4 = p5.freq * 2 * l__math_pi__5;
	local l__v__5 = p5.v;
	local l__minValue__6 = p5.minValue;
	local l__maxValue__7 = p5.maxValue;
	local l__goal__8 = p5.goal;
	local v9 = l__goal__8 - p5.x;
	local v10 = v4 * p6;
	local v11 = l__math_exp__6(-v10);
	local v12 = l__goal__8 + (l__v__5 * p6 - v9 * (v10 + 1)) * v11;
	local v13 = ((v9 * v4 - l__v__5) * v10 + l__v__5) * v11;
	if v12 < l__minValue__6 then
		v12 = l__minValue__6;
		v13 = 0;
	elseif l__maxValue__7 < v12 then
		v12 = l__maxValue__7;
		v13 = 0;
	end;
	p5.x = v12;
	p5.v = v13;
	return v12;
end;
local v14 = {};
local u7 = u2.new(4.5, 12.5, 0.5, u3);
local u8 = 0;
local l__math_max__9 = math.max;
local l__math_min__10 = math.min;
function v14.Update(p7, p8, p9)
	local v15 = math.huge;
	if u7.goal > 1 then
		local l__goal__16 = u7.goal;
		local v17 = l__math_clamp__4(l__goal__16 + u8 * (1 + l__goal__16 * 0.0375), u1, u3);
		if v17 < 1 then
			v17 = u8 <= 0 and u1 or 1;
		end;
		v15 = v1(p8 * CFrame.new(0, 0, 0.5), l__math_max__9(u7.x, v17) - 0.5, p9) + 0.5;
	end;
	u7.minValue = 0.5;
	u7.maxValue = l__math_min__10(u3, v15);
	return u7:Step(p7);
end;
function v14.GetZoomRadius()
	return u7.x;
end;
function v14.SetZoomParameters(p10, p11)
	u7.goal = p10;
	u8 = p11;
end;
function v14.ReleaseSpring()
	u7.x = u7.goal;
	u7.v = 0;
end;
return v14;
-- black frames not included

local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")

local Camera = Workspace.CurrentCamera

local Module = {}

Module.Position = UDim2.new(0, 0, 0, 0)
Module.Size = UDim2.new(1, 0, 1, 0)

local function UDim2Absolute(udim2)
	local viewSize = Camera.ViewportSize

	return Vector2.new(
		(udim2.X.Scale * viewSize.X) + udim2.X.Offset,
		(udim2.Y.Scale * viewSize.Y) + udim2.Y.Offset
	)
end
-- NOTE:  This stub is here only to benefit from the RECS system initialization

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RoadSystem = require(ReplicatedStorage.Systems.RoadSystem)
return RoadSystem
-- Smart Circle mode needs the intersection of 2 rays that are known to be in the same plane
-- because they are generated from cross products with a common vector. This function is computing
-- that intersection, but it's actually the general solution for the point halfway between where
-- two skew lines come nearest to each other, which is more forgiving.
local function RayIntersection(p0, v0, p1, v1)
	local v2 = v0:Cross(v1)
	local d1 = p1.x - p0.x
	local d2 = p1.y - p0.y
	local d3 = p1.z - p0.z
	local denom = Det3x3(v0.x,-v1.x,v2.x,v0.y,-v1.y,v2.y,v0.z,-v1.z,v2.z)

	if (denom == 0) then
		return ZERO_VECTOR3 -- No solution (rays are parallel)
	end

	local t0 = Det3x3(d1,-v1.x,v2.x,d2,-v1.y,v2.y,d3,-v1.z,v2.z) / denom
	local t1 = Det3x3(v0.x,d1,v2.x,v0.y,d2,v2.y,v0.z,d3,v2.z) / denom
	local s0 = p0 + t0 * v0
	local s1 = p1 + t1 * v1
	local s = s0 + 0.5 * ( s1 - s0 )

	-- 0.25 studs is a threshold for deciding if the rays are
	-- close enough to be considered intersecting, found through testing 
	if (s1-s0).Magnitude < 0.25 then
		return s
	else
		return ZERO_VECTOR3
	end
end
--// Variables
local L_1_ = script.Parent
local L_2_ = L_1_.Parent.Parent
local L_3_ = L_2_.Character
--[[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	= 3500		-- 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	= 14500	-- 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		= 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
--[[Brakes]]
	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.BrakeForce		= 25000000		-- Total brake force (LuaInt)
	Tune.BrakeBias		= .57		-- Brake bias towards the front, percentage (1 = Front, 0 = Rear, .5 = 50/50)
	Tune.PBrakeForce	= 5000		-- Handbrake force
	Tune.PBrakeBias		= .57		-- Handbrake bias towards the front, percentage (1 = Front, 0 = Rear, .5 = 50/50)
	Tune.EBrakeForce	= 250		-- Engine braking force at redline
-- eventos y sonidos
local eventEquip = script.Parent.Equip
local eventAttack = script.Parent.Attack
local soundEquiped = script.EquipedS
local soundAttack = script.AttackS

tool.Equipped:Connect(function()
	local humanoid = script.Parent.Parent.Humanoid
	animIdleTrack = humanoid:LoadAnimation(animationIdle)
	animIdleTrack:Play()
	soundEquiped:Play()
	-- llamamos al evento
	eventEquip:FireServer(handle, true)
end)

tool.Unequipped:Connect(function()
	animIdleTrack:Stop()
	eventEquip:FireServer(handle, false)
end)

tool.Activated:Connect(function()
	local humanoid = script.Parent.Parent:WaitForChild("Humanoid") -- otra manera de obtener el humanoid
	animAttackTrack = humanoid:LoadAnimation(animAttack)
	animAttackTrack:Play()
	soundAttack:Play()
	-- evento ataquer
	eventAttack:FireServer(true,true, handle) -- esta atacando entonces lo hacemos verdadero
	wait(3)
	animAttackTrack:Stop()
end)
--[[**
	<description>
	Sets the value of the result in the database with the key and the new value. Attempts to get the value from the data store. Does not call functions fired on update.
	</description>

	<parameter name = "key">
	The key to set.
	</parameter>

	<parameter name = "newValue">
	The value to set.
	</parameter>
**--]]
function DataStore:SetKeyValue(key, newValue)
	if not self.value then
		self.value = self:Get({})
	end

	self.value[key] = newValue
end

local CombinedDataStore = {}

do
	function CombinedDataStore:BeforeInitialGet(modifier)
		self.combinedBeforeInitialGet = modifier
	end

	function CombinedDataStore:BeforeSave(modifier)
		self.combinedBeforeSave = modifier
	end

	function CombinedDataStore:Get(defaultValue, dontAttemptGet)
		local tableResult = self.combinedStore:Get({})
		local tableValue = tableResult[self.combinedName]

		if not dontAttemptGet then
			if tableValue == nil then
				tableValue = defaultValue
			else
				if self.combinedBeforeInitialGet and not self.combinedInitialGot then
					tableValue = self.combinedBeforeInitialGet(tableValue)
				end
			end
		end

		self.combinedInitialGot = true
		tableResult[self.combinedName] = clone(tableValue)
		self.combinedStore:Set(tableResult, true)
		return tableValue
	end

	function CombinedDataStore:Set(value, dontCallOnUpdate)
		local tableResult = self.combinedStore:GetTable({})
		tableResult[self.combinedName] = value
		self.combinedStore:Set(tableResult, dontCallOnUpdate)
		self:_Update(dontCallOnUpdate)
	end

	function CombinedDataStore:Update(updateFunc)
		self:Set(updateFunc(self:Get()))
		self:_Update()
	end

	function CombinedDataStore:OnUpdate(callback)
		if not self.onUpdateCallbacks then
			self.onUpdateCallbacks = { callback }
		else
			self.onUpdateCallbacks[#self.onUpdateCallbacks + 1] = callback
		end
	end

	function CombinedDataStore:_Update(dontCallOnUpdate)
		if not dontCallOnUpdate then
			for _, callback in pairs(self.onUpdateCallbacks or {}) do
				callback(self:Get(), self)
			end
		end

		self.combinedStore:_Update(true)
	end

	function CombinedDataStore:SetBackup(retries)
		self.combinedStore:SetBackup(retries)
	end
end

local DataStoreMetatable = {}

DataStoreMetatable.__index = DataStore
-- Updates size and position
local function updatePartFromVertexList(part, vertexList, stormPos)
	part.Position = getPositionFromVertexList(vertexList)
	part.Size = Vector3.new((vertexList[4] - vertexList[1]).Magnitude, (vertexList[2] - vertexList[1]).Magnitude, BARRIER_THICKNESS)
end
-- Function which acquires the currently idle handler runner thread, runs the
-- function fn on it, and then releases the thread, returning it to being the
-- currently idle one.
-- If there was a currently idle runner thread already, that's okay, that old
-- one will just get thrown and eventually GCed.
local function acquireRunnerThreadAndCallEventHandler(fn, ...)
	local acquiredRunnerThread = freeRunnerThread
	freeRunnerThread = nil
	fn(...)
	-- The handler finished running, this runner thread is free again.
	freeRunnerThread = acquiredRunnerThread
end
--//# Script runs ingame!
local Lighting = game:GetService("Lighting");
local TerrainService = game:GetService("Workspace").Terrain

local Enabled = true

local TerrainPlusEnabled = true
local BetterLightingEnabled = true
--[=[
	The same as [Promise.new](/api/Promise#new), except execution begins after the next `Heartbeat` event.

	This is a spiritual replacement for `spawn`, but it does not suffer from the same [issues](https://eryn.io/gist/3db84579866c099cdd5bb2ff37947cec) as `spawn`.

	```lua
	local function waitForChild(instance, childName, timeout)
	  return Promise.defer(function(resolve, reject)
		local child = instance:WaitForChild(childName, timeout)

		;(child and resolve or reject)(child)
	  end)
	end
	```

	@param executor (resolve: (...: any) -> (), reject: (...: any) -> (), onCancel: (abortHandler?: () -> ()) -> boolean) -> ()
	@return Promise
]=]
function Promise.defer(executor)
	local traceback = debug.traceback(nil, 2)
	local promise
	promise = Promise._new(traceback, function(resolve, reject, onCancel)
		local connection
		connection = Promise._timeEvent:Connect(function()
			connection:Disconnect()
			local ok, _, result = runExecutor(traceback, executor, resolve, reject, onCancel)

			if not ok then
				reject(result[1])
			end
		end)
	end)

	return promise
end
--Bullet.Transparency=.65
Bullet.formFactor=0
Bullet.TopSurface=0
Bullet.BottomSurface=0
mesh=Instance.new("SpecialMesh")
mesh.Parent=Bullet
mesh.MeshType="Brick"
mesh.Name="Mesh"
mesh.Scale=Vector3.new(.15,.15,1)

function check()
	sp.Name=ToolName.."-("..tostring(sp.Ammo.Value)..")"
end

function computeDirection(vec)
	local lenSquared = vec.magnitude * vec.magnitude
	local invSqrt = 1 / math.sqrt(lenSquared)
	return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
end
-- Initialize texture tool
local TextureTool = require(CoreTools.TextureTool)
Core.AssignHotkey('G', Core.Support.Call(Core.EquipTool, TextureTool));
Core.Dock.AddToolButton(Core.Assets.TextureIcon, 'G', TextureTool, 'TextureInfo');