Roblox/luau_corpus huggingface dataset:
--local freeSpaceX,freeSpaceY,freeSpaceZ = 3,3,2.8
local freeSpace = Vector3.new(3,2.8,3)
local box = script.Parent
local contents = box.Contents

local lidOffset = 3 

function r(num)
	return math.random(-math.abs(num*100),math.abs(num*100))/100
end

local function weldBetween(a, b)
	--Make a new Weld and Parent it to a.
	local weld = Instance.new("ManualWeld", a)
	weld.Part0 = a
	weld.Part1 = b
	--Get the CFrame of b relative to a.
	weld.C0 = a.CFrame:inverse() * b.CFrame
	--Return the reference to the weld so that you can change it later.
	return weld
end

box.Base.Touched:connect(function(oldHit)

	if (oldHit:FindFirstChild("Draggable") and oldHit:FindFirstChild("Pickup")) or
		(oldHit.Parent and (oldHit.Parent:FindFirstChild("Draggable") and oldHit.Parent:FindFirstChild("Pickup")))
	then
		local hit
		if oldHit.Parent:IsA("Model") and oldHit.Parent ~= workspace.Items then
			hit = oldHit.Parent:Clone()
			oldHit.Parent:Destroy()
		elseif oldHit.Parent == workspace.Items then
			hit = oldHit:Clone()
			oldHit:Destroy()
		end

		if hit.Draggable then
			hit.Draggable:Destroy()
		end

		if hit:IsA("BasePart") then
			hit.Anchored = false
			hit.CanCollide = false
			local vary = freeSpace-hit.Size
			-- random x,y,z
			print(vary,"as variance")
			--hit.CFrame = box.PrimaryPart.CFrame*CFrame.new(r(vary.X),1+math.random(0,vary.Y*100)/100,r(vary.Z))
			hit.CFrame = box.PrimaryPart.CFrame*CFrame.new(math.random(-100,100)/100,math.random(100,200)/100,math.random(-100,100)/100)
			weldBetween(hit, box.PrimaryPart)
		elseif hit:IsA("Model") then
			for _,v in next,hit:GetDescendants() do
				if v:IsA("BasePart") then
					v.Anchored = false
					v.CanCollide = false
					if v == hit.PrimaryPart then continue end
					weldBetween(v, hit.PrimaryPart)
				end
			end
			local modelSize=  hit:GetExtentsSize()
			local vary = freeSpace-modelSize
			--hit:SetPrimaryPartCFrame(box.PrimaryPart.CFrame*CFrame.new(r(vary.X),1+math.random(0,vary.Y*100)/100,r(vary.Z)))
			hit:SetPrimaryPartCFrame(box.PrimaryPart.CFrame*CFrame.new(math.random(-100,100)/100,math.random(100,200)/100,math.random(-100,100)/100))
			weldBetween(hit.PrimaryPart, box.PrimaryPart)
		end -- end of if hit is a basepart or model
		hit.Parent = contents
	end
end)
-- RemoteSignal
-- Stephen Leitnick
-- December 20, 2021


local Players = game:GetService("Players")

local Signal = require(script.Parent.Parent.Parent.Signal)
local Types = require(script.Parent.Parent.Types)
-- this is a dummy object that holds the flash made when the gun is fired
local FlashHolder = nil

local EquipTrack = nil
local PumpTrack = nil


local WorldToCellFunction = Workspace.Terrain.WorldToCellPreferSolid
local GetCellFunction = Workspace.Terrain.GetCell

function RayIgnoreCheck(hit, pos)
	if hit then
		if hit.Transparency >= 1 or string.lower(hit.Name) == "water" or
				hit.Name == "Effect" or hit.Name == "Rocket" or hit.Name == "Bullet" or
				hit.Name == "Handle" or hit:IsDescendantOf(MyCharacter) then
			return true
		elseif hit:IsA('Terrain') and pos then
			local cellPos = WorldToCellFunction(Workspace.Terrain, pos)
			if cellPos then
				local cellMat = GetCellFunction(Workspace.Terrain, cellPos.x, cellPos.y, cellPos.z)
				if cellMat and cellMat == Enum.CellMaterial.Water then
					return true
				end
			end
		end
	end
	return false
end
-- Do a line/plane intersection.  The line starts at the camera.  The plane is at y == 0, normal(0, 1, 0)
--
-- vectorPos - End point of the line.
--
-- Return:
-- cellPos - The terrain cell intersection point if there is one, vectorPos if there isn't.
-- hit - Whether there was a plane intersection.  Value is true if there was, false if not.
function PlaneIntersection(vectorPos)
	local hit = false
	local currCamera = game:GetService("Workspace").CurrentCamera
	local startPos = Vector3.new(currCamera.CoordinateFrame.p.X, currCamera.CoordinateFrame.p.Y, currCamera.CoordinateFrame.p.Z)
	local endPos = Vector3.new(vectorPos.X, vectorPos.Y, vectorPos.Z)
	local normal = Vector3.new(0, 1, 0)
	local p3 = Vector3.new(0, 0, 0)
	local startEndDot = normal:Dot(endPos - startPos)
	local cellPos = vectorPos
	if startEndDot ~= 0  then
		local t = normal:Dot(p3 - startPos) / startEndDot
		if(t >=0 and t <=1) then
			local intersection = ((endPos - startPos) * t) + startPos
			cellPos = game:GetService("Workspace").Terrain:WorldToCell(intersection)
			hit = true
		end
	end

	return cellPos, hit
end
-- // Events \\ --
ProximityPrompt.PromptButtonHoldBegan:Connect(function()
	Functions.Flash("Teal")
end)

ProximityPrompt.Triggered:Connect(function(Player)
	DoorLogo.Beep:Play()
	Functions.Flash("Bright green")
	ProximityPrompt.Enabled = false
	Functions.Move(true)
	wait(2)
	Functions.Move(false)
	Functions.Flash("Bright red")
	ProximityPrompt.Enabled = true
end)
--- Give moderator GUI to player
function GiveGui(player)
	wait() --- prevents console errors
	if player then
		local debugGui = game.ServerStorage:FindFirstChild("Debug"):Clone()
		debugGui.Parent = player
	end
end
-- Handles behaviours
local function characterTouchedBrick(partTouched)
	local behaviours = partTouched:FindFirstChild("Behaviours")
	if behaviours ~= nil then
		behaviours = behaviours:GetChildren()
		for i = 1, #behaviours do
			if behaviours[i].Value == true then
				game.ReplicatedStorage.RemoteEvents.ExecuteBehaviour:FireServer(player.Character, partTouched, behaviours[i].Name)

				if string.find(behaviours[i].Name, "Kill") then
					SmoothDie()
				end

			end
		end
	end
end

function characterAdded(newCharacter)
	ResetGame()
	bindFuc:Invoke(true)
	character = player.Character
	humanoid = character:WaitForChild("Humanoid")
	animator = humanoid:WaitForChild("Animator")
	humanoid.Touched:connect(characterTouchedBrick)
	humanoid.Died:connect(OnDie)
	SetWalkSpeed(0)

	local splashScreen = player.PlayerGui:WaitForChild("StartScreen")

	if UserInputService.TouchEnabled == false then
		if UserInputService.GamepadEnabled then
			splashScreen.StartInstructions.StartLabel.Text = "Press Space or Gamepad A Button to Start"
		else
			splashScreen.StartInstructions.StartLabel.Text = "Press Space to Start"
		end

	end
end




local function MoveAction(actionName, inputState, inputObject)
	if(not startGame) then
		return
	end

	if inputState == Enum.UserInputState.Begin then
		if inputObject.KeyCode == Enum.KeyCode.Left then
			left = -1
			moveDir = -1
		elseif inputObject.KeyCode == Enum.KeyCode.Right then
			right = 1
			moveDir = 1
		end
		SetWalkSpeed(moveSpeed)
	elseif inputState == Enum.UserInputState.End then
		if inputObject.KeyCode == Enum.KeyCode.Left then
			left = 0
		elseif inputObject.KeyCode == Enum.KeyCode.Right then
			right = 0
		end
		moveDir = left + right
		if moveDir == 0 then
			SetWalkSpeed(0) 
		end

	end
end
--- Calls the transform function on this argument.
-- The return value(s) from this function are passed to all of the other argument methods.
-- Called automatically at instantiation
function Argument:Transform()
	if #self.TransformedValues ~= 0 then
		return
	end

	local rawValue = self.RawValue

	if rawValue == "." and self.Type.Default then
		rawValue = self.Type.Default(self.Executor) or ""
		self.RawSegmentsAreAutocomplete = true
	end

	if rawValue == "?" and self.Type.Autocomplete then
		local strings, options = self:GetDefaultAutocomplete()

		if not options.IsPartial and #strings > 0 then
			rawValue = strings[math.random(1, #strings)]
			self.RawSegmentsAreAutocomplete = true
		end

	end

	if self.Type.Listable and #self.RawValue > 0 then
		local randomMatch = rawValue:match("^%?(%d+)$")
		if randomMatch then
			local maxSize = tonumber(randomMatch)

			if maxSize and maxSize > 0 then
				local items = {}
				local remainingItems, options = self:GetDefaultAutocomplete()

				if not options.IsPartial and #remainingItems > 0 then
					for _ = 1, math.min(maxSize, #remainingItems) do
						table.insert(items, table.remove(remainingItems, math.random(1, #remainingItems)))
					end

					rawValue = table.concat(items, ",")
					self.RawSegmentsAreAutocomplete = true
				end
			end
		elseif rawValue == "*" or rawValue == "**" then
			local strings, options = self:GetDefaultAutocomplete()

			if not options.IsPartial and #strings > 0 then
				if rawValue == "**" and self.Type.Default then
					local defaultString = self.Type.Default(self.Executor) or ""

					for i, string in ipairs(strings) do
						if string == defaultString then
							table.remove(strings, i)
						end
					end
				end

				rawValue = table.concat(
					strings,
					","
				)
				self.RawSegmentsAreAutocomplete = true
			end
		end

		rawValue = unescapeOperators(rawValue)

		local rawSegments = Util.SplitStringSimple(rawValue, ",")

		if #rawSegments == 0 then
			rawSegments = {""}
		end

		if rawValue:sub(#rawValue, #rawValue) == "," then
			rawSegments[#rawSegments + 1] = "" -- makes auto complete tick over right after pressing ,
		end

		for i, rawSegment in ipairs(rawSegments) do
			self.RawSegments[i] = rawSegment
			self.TransformedValues[i] = { self:TransformSegment(rawSegment) }
		end

		self.TextSegmentInProgress = rawSegments[#rawSegments]
	else
		rawValue = unescapeOperators(rawValue)

		self.RawSegments[1] = unescapeOperators(rawValue)
		self.TransformedValues[1] = { self:TransformSegment(rawValue) }
		self.TextSegmentInProgress = self.RawValue
	end
end

function Argument:TransformSegment(rawSegment)
	if self.Type.Transform then
		return self.Type.Transform(rawSegment, self.Executor)
	else
		return rawSegment
	end
end
-- / Gun Assets / --
local GunAssets = script.Parent.GunAssets
--[=[
	@within TableUtil
	@function Extend
	@param target table
	@param extension table
	@return table

	Extends the target array with the extension array.

	```lua
	local t = {10, 20, 30}
	local t2 = {30, 40, 50}
	local tNew = TableUtil.Extend(t, t2)
	print(tNew) --> {10, 20, 30, 30, 40, 50}
	```

	:::note Arrays only
	This function works on arrays, but not dictionaries.
]=]
local function Extend(target: Table, extension: Table): Table
	local tbl = Copy(target)
	for _,v in ipairs(extension) do
		table.insert(tbl, v)
	end
	return tbl
end
-- Backwards compatibility
Promise.async = Promise.defer
Promise.Async = Promise.defer
-- 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 filteringEnabled = game.Workspace.FilteringEnabled

local prevState = "None"
--[[
	Get the current value from a binding
]]
function bindingPrototype:getValue()
	local internalData = self[InternalData]

	--[[
		If our source is another binding but we're not subscribed, we'll
		return the mapped value from our upstream binding.

		This allows us to avoid subscribing to our source until someone
		has subscribed to us, and avoid creating dangling connections.
	]]
	if internalData.upstreamBinding ~= nil and internalData.upstreamDisconnect == nil then
		return internalData.valueTransform(internalData.upstreamBinding:getValue())
	end

	return internalData.value
end
-- Create confetti paper.
local AmountOfConfetti = 25;
for i=1, AmountOfConfetti do
	local p = ConfettiCannon.createParticle(
		Vector2.new(0.5,1), 									-- Position on screen. (Scales)
		Vector2.new(math.random(90)-45, math.random(70,100)), 		-- The direction power of the blast.
		script.Parent, 												-- The frame that these should be displayed on.
		{Color3.fromRGB(255,255,100), Color3.fromRGB(255,100,100)} 	-- The colors that should be used.
	);
	table.insert(confetti, p);
end;

local confettiColors = {Color3.fromRGB(255,255,100), Color3.fromRGB(255,100,100)};
local confettiActive = false;
-- Decompiled with the Synapse X Luau decompiler.

local l__Humanoid__1 = game.Players.LocalPlayer.Character:WaitForChild("Humanoid");
while wait(1) do
	if l__Humanoid__1:GetState() ~= Enum.HumanoidStateType.Physics then
		script.Parent.TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255);
	else
		script.Parent.TextLabel.BackgroundColor3 = Color3.fromRGB(9, 137, 207);
	end;
end;
-- где ищем цели
local find=game.Workspace.NPC.Enemy

local function myRay(target,eye,max_dist)
	local result= nil
	 
	local rayOrigin = eye.Position
	local rayDirection = (target.Position-rayOrigin)*2 - Vector3.new(0,5,0)
	-- local rayDirection = module.lookAtY	(target.Position, eye.Position)
--// F key, Horn
	if input.KeyCode==Enum.KeyCode.ButtonL3 or input.KeyCode==Enum.KeyCode.F then  
		script.Parent.Parent.Horn.TextTransparency = 0
		veh.Lightbar.middle.Airhorn:Play()
		veh.Lightbar.middle.Wail.Volume = 0
		veh.Lightbar.middle.Yelp.Volume = 0
		veh.Lightbar.middle.Priority.Volume = 0
script.Parent.Parent.MBOV.Visible = true
			script.Parent.Parent.MBOV.Text = "Made by OfficerVargas"
	end
end)
--	TiltDown()
--	FlyStraight()
--	TiltUp()
	FlyStraight()
	TurnAround()
-- [ SETTINGS ] --

local StatsName = "Coins" -- Your stats name
local MaxItems = 100 -- Max number of items to be displayed on the leaderboard
local MinValueDisplay = 1 -- Any numbers lower than this will be excluded
local MaxValueDisplay = 10e15 -- (10 ^ 15) Any numbers higher than this will be excluded
local UpdateEvery = 15 -- (in seconds) How often the leaderboard has to update
-- Decompiled with the Synapse X Luau decompiler.

local v1 = {};
local u1 = require(script.Parent.CameraShakeInstance);
function v1.Bump()
	local v2 = u1.new(2.5, 4, 0.1, 0.75);
	v2.PositionInfluence = Vector3.new(0.15, 0.15, 0.15);
	v2.RotationInfluence = Vector3.new(1, 1, 1);
	return v2;
end;
function v1.Explosion()
	local v3 = u1.new(5, 10, 0, 1.5);
	v3.PositionInfluence = Vector3.new(0.25, 0.25, 0.25);
	v3.RotationInfluence = Vector3.new(4, 1, 1);
	return v3;
end;
function v1.Earthquake()
	local v4 = u1.new(0.6, 3.5, 2, 10);
	v4.PositionInfluence = Vector3.new(0.25, 0.25, 0.25);
	v4.RotationInfluence = Vector3.new(1, 1, 4);
	return v4;
end;
function v1.BadTrip()
	local v5 = u1.new(10, 0.15, 5, 10);
	v5.PositionInfluence = Vector3.new(0, 0, 0.15);
	v5.RotationInfluence = Vector3.new(2, 1, 4);
	return v5;
end;
function v1.HandheldCamera()
	local v6 = u1.new(1, 0.25, 5, 10);
	v6.PositionInfluence = Vector3.new(0, 0, 0);
	v6.RotationInfluence = Vector3.new(1, 0.5, 0.5);
	return v6;
end;
function v1.Vibration()
	local v7 = u1.new(0.4, 20, 2, 2);
	v7.PositionInfluence = Vector3.new(0, 0.15, 0);
	v7.RotationInfluence = Vector3.new(1.25, 0, 4);
	return v7;
end;
function v1.RoughDriving()
	local v8 = u1.new(1, 2, 1, 1);
	v8.PositionInfluence = Vector3.new(0, 0, 0);
	v8.RotationInfluence = Vector3.new(1, 1, 1);
	return v8;
end;
local v9 = {};
function v9.__index(p1, p2)
	local v10 = v1[p2];
	if type(v10) == "function" then
		return v10();
	end;
	error("No preset found with index \"" .. p2 .. "\"");
end;
return setmetatable({}, v9);
-- Waits for a new character to be added if the current one is invalid
-- (Ensures that you don't have the old dead character after a respawn)
function UTIL.WaitForValidCharacter(player)
	local character = player.Character
	if not character or not character.Parent or not character:FindFirstChild('Humanoid') or character.Humanoid.Health <= 0 then
		player.CharacterAdded:Wait()
		wait()
		character = player.Character
	end
	return character
end
--[=[
	Observes showing a basic pane
	@param basicPane BasicPane
	@return Observable<boolean>
]=]
function BasicPaneUtils.observeShow(basicPane)
	return BasicPaneUtils.observeVisible(basicPane):Pipe({
		Rx.where(function(isVisible)
			return isVisible
		end)
	})
end

return BasicPaneUtils
-- find player's head pos

	local vCharacter = Tool.Parent
	local vPlayer = game.Players:GetPlayerFromCharacter(vCharacter)

	local head = vCharacter:FindFirstChild("Head")
	if not head then return end

	local dir = mouse_pos - head.Position
	dir = computeDirection(dir)

	local launch = head.Position + 5 * dir

	local delta = mouse_pos - launch
	
	local dy = delta.y
	
	local new_delta = Vector3.new(delta.x, 0, delta.z)
	delta = new_delta

	local dx = delta.magnitude
	local unit_delta = delta.unit
	
	-- acceleration due to gravity in RBX units
	local g = (-9.81 * 20)

	local theta = computeLaunchAngle( dx, dy, g)

	local vy = math.sin(theta)
	local xz = math.cos(theta)
	local vx = unit_delta.x * xz
	local vz = unit_delta.z * xz
	

	local missile = Pellet:Clone()
        

		

	missile.Position = launch
	missile.Velocity = Vector3.new(vx,vy,vz) * VELOCITY

	missile.PelletScript.Disabled = false

	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = vPlayer
	creator_tag.Name = "creator"
	creator_tag.Parent = missile
	
	missile.Parent = workspace

end


function computeLaunchAngle(dx,dy,grav)
	-- arcane
	-- http://en.wikipedia.org/wiki/Trajectory_of_a_projectile
	
	local g = math.abs(grav)
	local inRoot = (VELOCITY*VELOCITY*VELOCITY*VELOCITY) - (g * ((g*dx*dx) + (2*dy*VELOCITY*VELOCITY)))
	if inRoot <= 0 then
		return .25 * math.pi
	end
	local root = math.sqrt(inRoot)
	local inATan1 = ((VELOCITY*VELOCITY) + root) / (g*dx)

	local inATan2 = ((VELOCITY*VELOCITY) - root) / (g*dx)
	local answer1 = math.atan(inATan1)
	local answer2 = math.atan(inATan2)
	if answer1 < answer2 then return answer1 end
	return answer2
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




Tool.Enabled = true
function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if not humanoid  then
		print("Humanoid not found")
		return 
	end

	local targetPos = MouseLoc:InvokeClient(game:GetService("Players"):GetPlayerFromCharacter(character))

	fire(targetPos)

	wait(.2)

	Tool.Enabled = true
end

script.Parent.Activated:Connect(onActivated)
--[[
	Create a copy of a list with only values for which `callback` returns true.
	Calls the callback with (value, index).
]]
local function filter(list, callback)
	local new = {}
	local index = 1

	for i = 1, #list do
		local value = list[i]
		if callback(value, i) then
			new[index] = value
			index = index + 1
		end
	end

	return new
end

return filter
--[[ Flags ]]
local FFlagUserExcludeNonCollidableForPathfindingSuccess, FFlagUserExcludeNonCollidableForPathfindingResult =
    pcall(function() return UserSettings():IsUserFeatureEnabled("UserExcludeNonCollidableForPathfinding") end)
local FFlagUserExcludeNonCollidableForPathfinding = FFlagUserExcludeNonCollidableForPathfindingSuccess and FFlagUserExcludeNonCollidableForPathfindingResult

local FFlagUserClickToMoveSupportAgentCanClimbSuccess, FFlagUserClickToMoveSupportAgentCanClimbResult =
    pcall(function() return UserSettings():IsUserFeatureEnabled("UserClickToMoveSupportAgentCanClimb2") end)
local FFlagUserClickToMoveSupportAgentCanClimb = FFlagUserClickToMoveSupportAgentCanClimbSuccess and FFlagUserClickToMoveSupportAgentCanClimbResult
-- Initialize the tool
local WeldTool = {
	Name = 'Weld Tool';
	Color = BrickColor.new 'Really black';
}

WeldTool.ManualText = [[<font face="GothamBlack" size="16">Weld Tool  🛠</font>
Allows you to weld parts to hold them together.<font size="6"><br /></font>

<b>NOTE: </b>Welds may break if parts are individually moved.]]
-- Load countdown GUI
local countdownGui = Guis:WaitForChild("CountdownGui")
countdownGui.Parent = player.PlayerGui
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

local MutterDelay = math.random(2,6) -- How many seconds before it makes another sound
-- Basic settings
local MAX_LENGTH = 30

local filterService = game:GetService("TextService")

game.ReplicatedStorage.Interactions.Server.SetPetName.OnServerInvoke = function(plr, newName)
	
	-- Check length
	if string.len(newName) <= MAX_LENGTH then
	
		-- Run through filter service and set
		plr.Settings.PetName.Value = newName
		
		-- Set pet name
		for _, i in pairs(game.Players:GetPlayers()) do
			spawn(function()
				game.ReplicatedStorage.Interactions.Client.SetPetName:FireAllClients(plr, filterService:FilterStringAsync(newName, plr.UserId):GetNonChatStringForUserAsync(i.UserId))
			end)
		end
		
		return "NAME SET"
	else
		return "TOO LONG"
	end
	
end
-- ROBLOX TODO: fix PrettyFormat types imports
type PrettyFormatOptions = PrettyFormat_.OptionsReceived
local prettyFormat = PrettyFormat.format
local getSerializers = require(CurrentModule.plugins).getSerializers

local types = require(CurrentModule.types)
type SnapshotData = types.SnapshotData

local SNAPSHOT_VERSION = "1"
--// Handling Settings		
	Firerate = 60 / 700;
	
	FireMode = 1;
-- Create a function to make the bear follow the player
function followPlayer(player)
	local character = player.Character
	if character then
		local distance = (bear.PrimaryPart.Position - character.PrimaryPart.Position).Magnitude
		if distance < 2 then
			bear.Position = character.PrimaryPart.Position
		end
	end
end
--// Functions
function Weld(L_35_arg1, L_36_arg2, L_37_arg3)
	local L_38_ = Instance.new("Motor6D", L_35_arg1)
	L_38_.Part0 = L_35_arg1
	L_38_.Part1 = L_36_arg2
	L_38_.Name = L_35_arg1.Name
	L_38_.C0 = L_37_arg3 or L_35_arg1.CFrame:inverse() * L_36_arg2.CFrame
	return L_38_
end
--- Sets whether the command is in a valid state or not.
-- Cannot submit if in invalid state.
function Window:SetIsValidInput(isValid, errorText)
	Entry.TextBox.TextColor3 = isValid and Color3.fromRGB(255, 255, 255) or Color3.fromRGB(255, 73, 73)
	self.Valid = isValid
	self._errorText = errorText
end

function Window:HideInvalidState()
	Entry.TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
end