Roblox/luau_corpus huggingface dataset:
--[[ This weld script is cool!
	It will use the structure of models to weld. It treats each model as a separate moving body
	except if name a part "AHandle" and insert a BoolValue named "WeldToRoot" into it.
--]]

wait(1) --thanks PSG

local AvoidWelding = {--add models you want this script to not weld in here
	["Coupler"]=true
}

function weld(i,b)
	local weld1 = Instance.new("Weld") 
	weld1.Name = b.Name
	weld1.Part0 = i
	weld1.Part1 = b
	weld1.C1 = b.CFrame:inverse()*i.CFrame
	weld1.Parent = i
end

function welding(p,ph)
	p:MakeJoints()
	local handle = p:FindFirstChild("AHandle")
	if handle and ph and handle:FindFirstChild("WeldToRoot") then
		weld(handle,ph)
	end
	if not handle then
		for _,j in pairs (p:GetChildren()) do
			if j:IsA("BasePart") then
				handle = j
				break
			end
		end
	end
	if not handle then
		handle = ph
	end
	for _,j in pairs (p:GetChildren()) do
		if j:IsA("BasePart") then
			weld(handle,j)
		elseif j:IsA("Model") and not AvoidWelding[j.Name] then
			welding(j,handle)
		end
	end
end

function unanchoring(p)
	for _,j in pairs (p:GetChildren()) do
		if j:IsA("BasePart") then
			j.Anchored = false
		elseif j:IsA("Model") then
			unanchoring(j)
		end
	end
end

wait(1)
welding(script.Parent)
wait(0.5)
unanchoring(script.Parent)
--Dupes a part from the template.
local function MakeFromTemplate(template: BasePart, currentCacheParent: Instance): BasePart
	local part: BasePart = template:Clone()
	-- ^ Ignore W000 type mismatch between Instance and BasePart. False alert.
	
	part.CFrame = CF_REALLY_FAR_AWAY
	part.Anchored = true
	part.TopSurface = Enum.SurfaceType.Smooth
	part.BottomSurface = Enum.SurfaceType.Smooth
	
	--game:GetService("PhysicsService"):SetPartCollisionGroup(part, "Debris")
	part.CanCollide = false
	
	part.Parent = currentCacheParent
	return part
end

function PartCacheStatic.new(template: BasePart, numPrecreatedParts: number?, currentCacheParent: Instance?): PartCache
	local newNumPrecreatedParts: number = numPrecreatedParts or 5
	local newCurrentCacheParent: Instance = currentCacheParent or workspace
	
	--PrecreatedParts value.
	--Same thing. Ensure it's a number, ensure it's not negative, warn if it's really huge or 0.
	assert(numPrecreatedParts > 0, "PrecreatedParts can not be negative!")
	assertwarn(numPrecreatedParts ~= 0, "PrecreatedParts is 0! This may have adverse effects when initially using the cache.")
	assertwarn(template.Archivable, "The template's Archivable property has been set to false, which prevents it from being cloned. It will temporarily be set to true.")
	
	local oldArchivable = template.Archivable
	template.Archivable = true
	local newTemplate: BasePart = template:Clone()
	-- ^ Ignore W000 type mismatch between Instance and BasePart. False alert.
	
	template.Archivable = oldArchivable
	template = newTemplate
	
	local object: PartCache = {
		Open = {},
		InUse = {},
		CurrentCacheParent = newCurrentCacheParent,
		Template = template,
		ExpansionSize = 100
	}
	setmetatable(object, PartCacheStatic)
	
	-- Below: Ignore type mismatch nil | number and the nil | Instance mismatch on the table.insert line.
	for _ = 1, newNumPrecreatedParts do
		table.insert(object.Open, MakeFromTemplate(template, object.CurrentCacheParent))
	end
	object.Template.Parent = nil
	
	return object
	-- ^ Ignore mismatch here too
end
-- Define the player and the distance in front of them to place the part
local player = game.Players.LocalPlayer
local distance = 5
-- Modificar el daño que quieras hacerle
local DAMAGE = 5
local eventEquip = script.Parent.Equip
local eventAttack = script.Parent.Attack
--[=[
	Alias for `trove:Clean()`.
]=]
function Trove:Destroy()
	self:Clean()
end

return Trove
--[[Wheel Alignment]]
	--[Don't physically apply alignment to wheels]
	--[Values are in degrees]
	Tune.FCamber		= 0
	Tune.RCamber		= 0
	Tune.FCaster		= 0
	Tune.RCaster		= 0
	Tune.FToe			= 0
	Tune.RToe			= 0
-- ROBLOX deviation: helper function moved to RobloxShared and no longer needed here
-- local isObject = RobloxShared.expect.isObject
-- local isObjectWithKeys = RobloxShared.expect.isObjectWithKeys

local subsetEquality = RobloxShared.expect.subsetEquality

local function typeEquality(a: any, b: any): boolean | nil
	if a == nil or b == nil then
		return nil
	end

	if typeof(a) ~= typeof(b) then
		return false
	end

	if not getmetatable(a) and not getmetatable(b) then
		return nil
	end

	if
		getmetatable(a)
		and getmetatable(b)
		and getmetatable(a).__index
		and getmetatable(b).__index
		and getmetatable(a).__index == getmetatable(b).__index
	then
		return nil
	end

	return false
end
-- Public Methods

function DropdownClass:Set(option)
	if (self._Selected ~= option) then
		self._Selected = option
		self._ChangedBind:Fire(option)
		self.Button.Option.Text = option.Text
	end
	self:Show(false)
end

function DropdownClass:Get()
	return self._Selected
end

function DropdownClass:Show(bool)
	self.Button.Arrow.Image = bool and ARROW_UP or ARROW_DOWN
	self.ListFrame.Visible = bool
end

function DropdownClass:Destroy()
	self._Maid:Sweep()
	self._ChangedBind:Destroy()
	self._Changed = nil
	self._Options = nil
	self._Selected = nil
end
--[[ Utility Functions ]]--
local function IsFinite(num: number)
	return num == num and num ~= 1/0 and num ~= -1/0
end

local function IsFiniteVector3(vec3)
	return IsFinite(vec3.x) and IsFinite(vec3.y) and IsFinite(vec3.z)
end

local movementUpdateEvent = Instance.new("BindableEvent")
movementUpdateEvent.Name = "MovementUpdate"
movementUpdateEvent.Parent = script

coroutine.wrap(function()
	local PathDisplayModule = script.Parent:WaitForChild("PathDisplay")
	if PathDisplayModule then
		PathDisplay = require(PathDisplayModule)
	end
end)()
--[[
	
hs = script.HearScript:clone()
hs.Parent = char
wait(0.1)
hs.Disabled = false
--]]


function Chat(msg, player)
	if player.Character:findFirstChild("Torso") and (player.Character.Torso.Position - char.Torso.Position).magnitude < 100 then
		tag = Instance.new("StringValue")
		tag.Name = "Message"
		tag.Value = ""..player.Name..": "..msg..""
		tag.Parent = play.PlayerGui.FujiHud.Hear
		print("added to hear")
	end
end

	z = game.Players:GetPlayers() 
for i= 1, #z do 
	z[i].Chatted:connect(function(msg)
		print(z[i], msg) 
		Chat(msg, z[i])
	end)
end 

script.Parent.Hear.ChildAdded:connect(function(child)
	
if child.Name == "Message" then
hear = script.Parent.Hear
if hear:findFirstChild("E") then
--// Services
local L_100_ = game:GetService('RunService').RenderStepped
local L_101_ = game:GetService('UserInputService')
--[[
	print("Started Clone Generation")
	for i,k in pairs(Players)do
		RS.Replicate:FireClient(player,k)
	end
	print("Finished Clone Generation")
	]]--
end)
-- NEW v12.0.0: Casters now use a data packet which can be made like what follows.
-- Check the API for more information: https://etithespirit.github.io/FastCastAPIDocs/fastcast-objects/fcbehavior
local CastBehavior = FastCast.newBehavior()
CastBehavior.RaycastParams = CastParams
CastBehavior.MaxDistance = BULLET_MAXDIST
CastBehavior.HighFidelityBehavior = FastCast.HighFidelityBehavior.Default
-- ROBLOX deviation: our implementation of any has significant deviations, check README for more info
-- > any("number"):asymmetricMatch(1) -- true
-- > any("number"):toAsymmetricMatcher() -- "Any<number>"
-- > any(ClassA):asymmetricMatch(ClassA.new()) -- true
-- > any(ClassA):asymmetricMatch(ClassB.new()) -- false
-- > any(ClassA):asymmetricMatch(DerivedClassA.new()) -- true
local Any = {}
Any.__index = Any
setmetatable(Any, AsymmetricMatcher)
function Any.new(sample: any)
	if typeof(sample) ~= "table" and typeof(sample) ~= "string" then
		error(
			"any() expects to be passed a typename string or a prototype class. "
				.. "Please pass one or use anything() to match any object."
		)
	end
	local self = AsymmetricMatcher.new(sample)
	setmetatable(self, Any)
	return self
end

function Any:asymmetricMatch(other: any): boolean
	-- ROBLOX deviation: simplified since this covers all the cases in Lua
	local selfType = getType(self.sample)
	local otherType = getType(other)
	-- compare metatable to check instance of Lua prototypical class
	if (selfType == "table" and otherType == "table") or (selfType == "error" and otherType == "error") then
		return instanceof(other, self.sample)
		-- check type matches type provided by string
	elseif selfType == "string" and self.sample == otherType then
		return true
	end
	return false
end

function Any:toString(): string
	return "Any"
end

function Any:getExpectedType(): string
	-- ROBLOX deviation: simplified since this already covers all the cases in Lua
	return tostring(self.sample)
end

function Any:toAsymmetricMatcher(): string
	return "Any<" .. tostring(self.sample) .. ">"
end

local Anything = {}
Anything.__index = Anything
setmetatable(Anything, AsymmetricMatcher)
function Anything.new(sample: any)
	local self = AsymmetricMatcher.new(sample)
	setmetatable(self, Anything)
	return self
end

function Anything:asymmetricMatch(other: any): boolean
	-- ROBLOX deviation: other !== null is redundant since Lua doesn't distinguish undefined/nil
	return not isUndefined(other)
end

function Anything:toString(): string
	return "Anything"
end
-- This script automatically assumes that you are removing any Decals or Textures in the same Parent that this script is in.

local g = script.Parent:getChildren()

		for i = 1, #g do
			if (g[i].className == "Decal") then -- Removes Decals
				g[i]:remove()
			end

			if (g[i].className == "Texture") then -- Removes Textures
				g[i]:remove()
			end

end

script:Destroy() -- Removes the script itself
-- no touchy
local path
local waypoint
local oldpoints
local isWandering = 0

if canWander then
	spawn(function()
		while isWandering == 0 do
			isWandering = 1
			local desgx, desgz = hroot.Position.x + math.random(-WanderX, WanderX), hroot.Position.z + math.random(-WanderZ, WanderZ)
			human:MoveTo( Vector3.new(desgx, 0, desgz) )
			wait(math.random(4, 6))
			isWandering = 0
		end
	end)
end

while wait() do
	local enemytorso = GetTorso(hroot.Position)	
	if enemytorso ~= nil then -- if player detected
		isWandering = 1
		local function checkw(t)
			local ci = 3
			if ci > #t then
				ci = 3
			end
			if t[ci] == nil and ci < #t then
				repeat
					ci = ci + 1
					wait()
				until t[ci] ~= nil
				return Vector3.new(1, 0, 0) + t[ci]
			else
				ci = 3
				return t[ci]
			end
		end
		
		path = pfs:FindPathAsync(hroot.Position, enemytorso.Position)
		waypoint = path:GetWaypoints()
		oldpoints = waypoint
		local connection;
		
		local direct = Vector3.FromNormalId(Enum.NormalId.Front)
		local ncf = hroot.CFrame * CFrame.new(direct)
		direct = ncf.p.unit
		local rootr = Ray.new(hroot.Position, direct)
		local phit, ppos = game.Workspace:FindPartOnRay(rootr, hroot)
		
		if path and waypoint or checkw(waypoint) then
			if checkw(waypoint) ~= nil and checkw(waypoint).Action == Enum.PathWaypointAction.Walk then
				human:MoveTo( checkw(waypoint).Position )
				human.Jump = false
			end
			
			-- CANNOT LET BALDI JUMPS --
			--[[if checkw(waypoint) ~= nil and checkw(waypoint).Action == Enum.PathWaypointAction.Jump then
				human.Jump = true
				connection = human.Changed:connect(function()
					human.Jump = true
				end)
				human:MoveTo( checkw(waypoint).Position )
			else
				human.Jump = false
			end]]
			
			--[[hroot.Touched:connect(function(p)
				local bodypartnames = GetPlayersBodyParts(enemytorso)
				if p:IsA'Part' and not p.Name == bodypartnames and phit and phit.Name ~= bodypartnames and phit:IsA'Part' and rootr:Distance(phit.Position) < 5 then
					connection = human.Changed:connect(function()
						human.Jump = true
					end)
				else
					human.Jump = false
				end
			end)]]
			
			if connection then
				connection:Disconnect()
			end
			
		else
			for i = 3, #oldpoints do
				human:MoveTo( oldpoints[i].Position )	
			end
		end
	elseif enemytorso == nil and canWander then -- if player not detected
		isWandering = 0
		path = nil
		waypoint = nil
		human.MoveToFinished:Wait()
	end
end
-- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")

local CodesOtaku = ReplicatedStorage:WaitForChild("CodesOtaku")
local CutsceneModule = CodesOtaku:WaitForChild("CutsceneModule")

repeat wait() until workspace.CurrentCamera -- Wait until camera is found
-- The maximum distance the can can shoot, this value should never go above 1000
local Range = 700
-- at max range
--script.Parent.Explosion.PlayOnRemove = false
note:stop()
shaft:remove()
-- Load libraries
local Support, Cheer = _G.GetLibraries(
	'F3X/SupportLibrary@^1.0.0',
	'F3X/Cheer@^0.0.0'
);
--[=[
	@return SIGNAL_MARKER
	Returns a marker that will transform the current key into
	a RemoteSignal once the service is created. Should only
	be called within the Client table of a service.

	See [RemoteSignal](https://sleitnick.github.io/RbxUtil/api/RemoteSignal)
	documentation for more info.
	```lua
	local MyService = Knit.CreateService {
		Name = "MyService";
		Client = {
			MySignal = Knit.CreateSignal(); -- Create the signal marker
		}
	}

	-- Connect to the signal:
	MyService.Client.MySignal:Connect(function(player, ...) end)
	```
]=]
function KnitServer.CreateSignal()
	return SIGNAL_MARKER
end
-- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local MatchmakingLobby = require(ReplicatedStorage.Libraries.MatchmakingLobby)
local Util = require(ReplicatedStorage.Libraries.Util)
-- LOCAL
local main = _G.HDAdminMain
local playerGui = main.playerGui
local topbarPlus = main.replicatedStorage:WaitForChild("HDAdmin"):WaitForChild("Topbar+")
local iconController = require(topbarPlus.IconController)
--Required Modules
local modules = script.Parent
local status = require(modules.Status)
local core = require(modules.CoreModule)

local marine = script.Parent.Parent.Parent
local myHuman = marine.Humanoid
local myRoot = marine.HumanoidRootPart
local m4 = marine.M4
local reloadSound = m4.Reload
local magazine = marine.Mag

local myHead = marine.Head
local myTorso = marine.Torso
local neck = myTorso.Neck
local lShoulder = myTorso["Left Shoulder"]
local rShoulder = myTorso["Right Shoulder"]
local lArmWeld = myTorso["Left Arm Weld"]
local rArmWeld = myTorso["Right Arm Weld"]
local lArm = marine["Left Arm"]
local rArm = marine["Right Arm"]
local m4Weld = m4["M4 Weld"]
-- Customize the sprint speed multiplier as desired
local sprintSpeedMultiplier = 2 -- Change this value to adjust the sprint speed
local sprintDuration = 5 -- Change this value to set the sprint duration in seconds
local defaultWalkSpeed = 16 -- Change this value to set the default walk speed

local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")

local isSprinting = false
local meterX = 19
local meterV = meterX
-- Mode status:
-- 0/4 = Off
-- 1 = Auto
-- 2 = On

local motionSensor = script.Parent.Parent.Parent.SensorFunction.SensorScript
local Mode = script.Parent.Parent.Parent.Parent.Mode.Value
local LED = script.Parent.Parent.Parent.LED
local Off = script.Parent.Parent.Off
local On = script.Parent.Parent.On
local Auto = script.Parent.Parent.Sensor
local status = script.Parent.Parent.Parent.Parent.State

function onClicked()
	--Auto to Off
	if Mode == 1 then
		script.Parent.Sound_:Play()
		status.Value = 0
		motionSensor.Disabled = true
		Auto.Transparency = 1	
		On.Transparency = 1
		Off.Transparency = 0
		LED.BrickColor = BrickColor.new("Maroon")
		LED.Material = "Neon"
		Mode = 0
		wait(1)
		script.Parent.Sound:Play()
		--Off to On	
	elseif Mode == 0 then
		script.Parent.Sound_:Play()
		status.Value = 1
		motionSensor.Disabled = true
		Auto.Transparency = 1
		On.Transparency = 0
		Off.Transparency = 1		
		LED.BrickColor = BrickColor.new("Really red")
		LED.Material = "Neon"
		Mode = 2
		wait(1)
		script.Parent.Sound:Play()
		--On to Off		
	elseif Mode == 2 then
		script.Parent.Sound_:Play()
		status.Value = 0
		motionSensor.Disabled = true
		Auto.Transparency = 1	
		On.Transparency = 1
		Off.Transparency = 0
		LED.BrickColor = BrickColor.new("Maroon")
		LED.Material = "Neon"
		Mode = 4
		wait(1)
		script.Parent.Sound:Play()
		--Off to Auto		
	elseif Mode == 4 then
		script.Parent.Sound_:Play()
		status.Value = 0
		motionSensor.Disabled = false
		Auto.Transparency = 0
		On.Transparency = 1
		Off.Transparency = 1
		LED.BrickColor = BrickColor.new("Forest green")	
		LED.Material = "Neon"	
		Mode = 1
		wait(1)
		script.Parent.Sound:Play()
	end
end

script.Parent.ClickDetector.MouseClick:Connect(onClicked)
-- A graph object which can have dependents.
export type Dependency = {
	dependentSet: Set<Dependent>
}
--if hood.Velocity.magnitude < 15 then return end  -- must be going decently fast to break stuff...  can add invisible "prebumpers" in the future to make collisions smoother
if hood.CFrame:vectorToObjectSpace(hood.Velocity):Dot(direction) < 40 then return end -- must be going fast in correct direction to break stuff

	if hit and hit.Parent then
		if hit.Parent:FindFirstChild("Humanoid") then
			--hit.Parent:BreakJoints()  let's not kill 'em...  for now
			hit.Parent.Humanoid.Sit = true  -- but we do make 'em flyyyy!  XD
		elseif hit:FindFirstChild("RobloxModel") and not hit:FindFirstChild("RunOver") and isSmallerThanVehicle(hit) then
			local newModel = hit:Clone()
			local modelParent = hit.Parent
			local newRunOverTag = Instance.new("BoolValue")
			newRunOverTag.Name = "RunOver"
			newRunOverTag.Parent = hit

			hit:BreakJoints()
			debris:AddItem(hit, timeToRespawn)
			coroutine.resume(coroutine.create(respawnIt), newModel, modelParent)
		elseif hit.Parent:FindFirstChild("RobloxModel") and not hit.Parent:FindFirstChild("RunOver") and isSmallerThanVehicle(hit.Parent) then
			local newModel = hit.Parent:Clone()
			local modelParent = hit.Parent.Parent
			local newRunOverTag = Instance.new("BoolValue")
			newRunOverTag.Name = "RunOver"
			newRunOverTag.Parent = hit.Parent

			hit.Parent:BreakJoints()
			debris:AddItem(hit.Parent, timeToRespawn)
			coroutine.resume(coroutine.create(respawnIt), newModel, modelParent)
		end
	end
end
--[=[
	@param name string
	@param inboundMiddleware ClientMiddleware?
	@param outboundMiddleware ClientMiddleware?
	@return ClientRemoteProperty
	Returns a new ClientRemoteProperty that mirrors the matching RemoteProperty created by
	ServerComm with the same matching `name`.

	Take a look at the ClientRemoteProperty documentation for more info, such as
	understanding how to wait for data to be ready.

	```lua
	local mapInfo = clientComm:GetProperty("MapInfo")

	-- Observe the initial value of mapInfo, and all subsequent changes:
	mapInfo:Observe(function(info)
		print("Current map info", info)
	end)

	-- Check to see if data is initially ready:
	if mapInfo:IsReady() then
		-- Get the data:
		local info = mapInfo:Get()
	end

	-- Get a promise that resolves once the data is ready (resolves immediately if already ready):
	mapInfo:OnReady():andThen(function(info)
		print("Map info is ready with info", info)
	end)

	-- Same as above, but yields thread:
	local success, info = mapInfo:OnReady():await()
	```
]=]
function ClientComm:GetProperty(
	name: string,
	inboundMiddleware: Types.ClientMiddleware?,
	outboundMiddleware: Types.ClientMiddleware?
)
	return Comm.GetProperty(self._instancesFolder, name, inboundMiddleware, outboundMiddleware)
end
--[[
	Packs a number of arguments into a table and returns its length.
	Used to cajole varargs without dropping sparse values.
]]
local function pack(...)
	local len = select("#", ...)

	return len, { ... }
end
--//trunk
local tk = Instance.new("Motor", script.Parent.Parent.Misc.TK.SS)
tk.MaxVelocity = 0.02
tk.Part0 = script.Parent.TK
tk.Part1 = tk.Parent
-- You may turn both of these on at once. In that case, zone-specific music will play in the appropriate zones, and global background music will play whenever you're not within any zone.

	
settings.DisplayMuteButton = true  -- If set to true, there will be a button in the bottom-right corner of the screen allowing players to mute the background music.
	
settings.MusicFadeoutTime = 1.5  -- How long music takes to fade out, in seconds.

settings.MusicOnlyPlaysWithinZones = false  -- (This setting only applies when UseGlobalBackgroundMusic is set to false) If a player walks into an area that's not covered by any music zone, what should happen? If true, music will stop playing. If false, the music from the previous zone will continue to play.

return settings
--[[
	Assert that our functoid expectation value throws an error when called.
	An optional error message can be passed to assert that the error message
	contains the given value.
]]
function Expectation:throw(messageSubstring)
	local ok, err = pcall(self.value)
	local result = ok ~= self.successCondition

	if messageSubstring and not ok then
		if self.successCondition then
			result = err:find(messageSubstring, 1, true) ~= nil
		else
			result = err:find(messageSubstring, 1, true) == nil
		end
	end

	local message

	if messageSubstring then
		message = formatMessage(
			self.successCondition,
			("Expected function to throw an error containing %q, but it %s"):format(
				messageSubstring,
				err and ("threw: %s"):format(err) or "did not throw."
			),
			("Expected function to never throw an error containing %q, but it threw: %s"):format(
				messageSubstring,
				tostring(err)
			)
		)
	else
		message = formatMessage(
			self.successCondition,
			"Expected function to throw an error, but it did not throw.",
			("Expected function to succeed, but it threw an error: %s"):format(tostring(err))
		)
	end

	assertLevel(result, message, 3)
	self:_resetModifiers()

	return self
end

return Expectation
--Don't touch anything in this script unless you know what you're doing
script.Parent.MouseButton1Click:connect(function()	
script.Parent.Parent.Frame.Visible=true
script.Parent.Visible=false
end)
-------------------------------------Gun info
ToolName="Mark IV"

ClipSize=30
ReloadTime=2
Firerate=.2
MinSpread=1
MaxSpread=6
SpreadRate=1
BaseDamage=30
automatic=true
burst=false
shot=false			--shotgun
BarrlePos=Vector3.new(0,0.70,-2.90)
Cursors={"rbxasset://textures\\GunCursor.png"}
ReloadCursor="rbxasset://textures\\GunWaitCursor.png"
-- Cache common functions to avoid unnecessary table lookups
local TableInsert, NewVector3 = table.insert, Vector3.new

function GetCornerOffsets(Origin, InitialStates)
	-- Calculates and returns the offset of every corner in the initial state from the origin CFrame

	local CornerOffsets = {}

	-- Get offset for origin point
	local OriginOffset = Origin:inverse()

	-- Go through each item in the initial state
	for Item, State in pairs(InitialStates) do
		local ItemCFrame = State.CFrame
		local SizeX, SizeY, SizeZ = Item.Size.X / 2, Item.Size.Y / 2, Item.Size.Z / 2

		-- Gather each corner
		TableInsert(CornerOffsets, OriginOffset * (ItemCFrame * NewVector3(SizeX, SizeY, SizeZ)))
		TableInsert(CornerOffsets, OriginOffset * (ItemCFrame * NewVector3(-SizeX, SizeY, SizeZ)))
		TableInsert(CornerOffsets, OriginOffset * (ItemCFrame * NewVector3(SizeX, -SizeY, SizeZ)))
		TableInsert(CornerOffsets, OriginOffset * (ItemCFrame * NewVector3(SizeX, SizeY, -SizeZ)))
		TableInsert(CornerOffsets, OriginOffset * (ItemCFrame * NewVector3(-SizeX, SizeY, -SizeZ)))
		TableInsert(CornerOffsets, OriginOffset * (ItemCFrame * NewVector3(-SizeX, -SizeY, SizeZ)))
		TableInsert(CornerOffsets, OriginOffset * (ItemCFrame * NewVector3(SizeX, -SizeY, -SizeZ)))
		TableInsert(CornerOffsets, OriginOffset * (ItemCFrame * NewVector3(-SizeX, -SizeY, -SizeZ)))
	end

	-- Return the offsets
	return CornerOffsets

end

function FreeDragging:InstallDragEndListener()
    Support.AddUserInputListener('Ended', {'Touch', 'MouseButton1'}, true, function (Input)

        -- Clear drag detection data
        self.StartScreenPoint = nil
        self.StartTarget = nil
        ContextActionService:UnbindAction 'BT: Watch for dragging'

        -- Reset from drag mode if dragging
        if self.IsDragging then

            -- Reset axes
            self.Tool:SetAxes(self.Tool.Axes)

            -- Finalize the dragging operation
            self:FinishDragging()

        end

    end)
end

return FreeDragging