Roblox/luau_corpus huggingface dataset:
--[[
	This loads HD Admin into your game.
	
	Require the 'HD Admin Main Module' by ForeverHD for automatic updates.
	
	You can view the HD Admin Main Module here:
	https://www.roblox.com/library/2686494999/HD-Admin-Main-Module
	
--]]

local loaderFolder = script.Parent.Parent
local mainModule = require(2686494999)
mainModule:Initialize(loaderFolder)
loaderFolder:Destroy()
--[=[
	@within TableUtil
	@function IsEmpty
	@param tbl table
	@return boolean

	Returns `true` if the given table is empty. This is
	simply performed by checking if `next(tbl)` is `nil`
	and works for both arrays and dictionaries. This is
	useful when needing to check if a table is empty but
	not knowing if it is an array or dictionary.

	```lua
	TableUtil.IsEmpty({}) -- true
	TableUtil.IsEmpty({"abc"}) -- false
	TableUtil.IsEmpty({abc = 32}) -- false
	```
]=]
local function IsEmpty(tbl)
	return next(tbl) == nil
end
--- Cleans up all tasks
function Maid:DoCleaning()
	local Tasks = self.Tasks

	-- Disconnect all events first as we know this is safe
	for Index, Task in pairs(Tasks) do
		if typeof(Task) == "RBXScriptConnection" then
			Tasks[Index] = nil
			Task:disconnect()
		end
	end

	-- Clear out tasks table completely, even if clean up tasks add more tasks to the maid
	local Index, Task = next(Tasks)
	while Task ~= nil do
		Tasks[Index] = nil
		if type(Task) == "function" then
			Task()
		elseif typeof(Task) == "RBXScriptConnection" then
			Task:disconnect()
		elseif Task.Destroy then
			Task:Destroy()
		elseif Task.destroy then
			Task:destroy()
		elseif Task.disconnect then -- for pseudo RBXScriptConnection
			Task:disconnect()
		end
		Index, Task = next(Tasks)
	end
end
Maid.Destroy = Maid.DoCleaning

return Maid
--Fix network issues
for i,v in ipairs(script.Parent:GetDescendants()) do
	if v:IsA("BasePart") and v:CanSetNetworkOwnership() == true then
		v:SetNetworkOwner(nil)
	end
end
--[[Engine]]
--Torque Curve
Tune.Horsepower		= 265		--	[TORQUE CURVE VISUAL]
Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
Tune.PeakRPM		= 6980		--		Use sliders to manipulate values
Tune.Redline		= 8000		--		Copy and paste slider values into the respective tune values
Tune.EqPoint		= 5500
Tune.PeakSharpness	= 7.5
Tune.CurveMult		= 0.16
--	elseif input.UserInputType == self.activeGamepad and input.KeyCode == Enum.KeyCode.ButtonL3 then
--		if (state == Enum.UserInputState.Begin) then
--			self.L3ButtonDown = true
--		elseif (state == Enum.UserInputState.End) then
--			self.L3ButtonDown = false
--			self.currentZoomSpeed = 1.00
--		end
--	end
end

function BaseCamera:DoKeyboardZoom(name, state, input)
	if not self.hasGameLoaded and VRService.VREnabled then
		return Enum.ContextActionResult.Pass
	end

	if state ~= Enum.UserInputState.Begin then
		return Enum.ContextActionResult.Pass
	end

	if self.distanceChangeEnabled and Players.LocalPlayer.CameraMode ~= Enum.CameraMode.LockFirstPerson then
		if input.KeyCode == Enum.KeyCode.I then
			self:SetCameraToSubjectDistance( self.currentSubjectDistance - 5 )
		elseif input.KeyCode == Enum.KeyCode.O then
			self:SetCameraToSubjectDistance( self.currentSubjectDistance + 5 )
		end
		return Enum.ContextActionResult.Sink
	end
	return Enum.ContextActionResult.Pass
end

function BaseCamera:BindAction(actionName, actionFunc, createTouchButton, ...)
	table.insert(self.boundContextActions, actionName)
	ContextActionService:BindActionAtPriority(actionName, actionFunc, createTouchButton,
		CAMERA_ACTION_PRIORITY, ...)
end

function BaseCamera:BindGamepadInputActions()
	self:BindAction("BaseCameraGamepadPan", function(name, state, input) return self:GetGamepadPan(name, state, input) end,
		false, Enum.KeyCode.Thumbstick2)
	self:BindAction("BaseCameraGamepadZoom", function(name, state, input) return self:DoGamepadZoom(name, state, input) end,
		false, Enum.KeyCode.DPadLeft, Enum.KeyCode.DPadRight, Enum.KeyCode.ButtonR3)
end

function BaseCamera:BindKeyboardInputActions()
	self:BindAction("BaseCameraKeyboardPanArrowKeys", function(name, state, input) return self:DoKeyboardPanTurn(name, state, input) end,
		false, Enum.KeyCode.Left, Enum.KeyCode.Right)
	self:BindAction("BaseCameraKeyboardPan", function(name, state, input) return self:DoKeyboardPan(name, state, input) end,
		false, Enum.KeyCode.Comma, Enum.KeyCode.Period, Enum.KeyCode.PageUp, Enum.KeyCode.PageDown)
	self:BindAction("BaseCameraKeyboardZoom", function(name, state, input) return self:DoKeyboardZoom(name, state, input) end,
		false, Enum.KeyCode.I, Enum.KeyCode.O)
end

local function isInDynamicThumbstickArea(input)
	local playerGui = Players.LocalPlayer:FindFirstChildOfClass("PlayerGui")
	local touchGui = playerGui and playerGui:FindFirstChild("TouchGui")
	local touchFrame = touchGui and touchGui:FindFirstChild("TouchControlFrame")
	local thumbstickFrame = touchFrame and touchFrame:FindFirstChild("DynamicThumbstickFrame")

	if not thumbstickFrame then
		return false
	end

	local frameCornerTopLeft = thumbstickFrame.AbsolutePosition
	local frameCornerBottomRight = frameCornerTopLeft + thumbstickFrame.AbsoluteSize
	if input.Position.X >= frameCornerTopLeft.X and input.Position.Y >= frameCornerTopLeft.Y then
		if input.Position.X <= frameCornerBottomRight.X and input.Position.Y <= frameCornerBottomRight.Y then
			return true
		end
	end

	return false
end
--[=[
	@param fn (...: any) -> ()
	@return Connection
	Connects a function to the remote signal. The function will be
	called anytime the equivalent server-side RemoteSignal is
	fired at this specific client that created this client signal.
]=]
function ClientRemoteSignal:Connect(fn: (...any) -> ())
	if self._directConnect then
		return self._re.OnClientEvent:Connect(fn)
	else
		return self._signal:Connect(fn)
	end
end
-- Sets the position of the falling object
-- This function checks if the object is a Part or a Model, as those are positioned differently
local function positionFallingObject(object)

    local objectCFrame = getRandomCFrameInVolume(dropZone)
    if object:IsA("BasePart") then
        object.CFrame = objectCFrame
    elseif object:IsA("Model") then
        if not object.PrimaryPart then
            object.PrimaryPart = object:FindFirstChildWhichIsA("BasePart", true)
        end		
        object.PrimaryPart.CFrame = objectCFrame
    end
    object.Parent = game.Workspace
end
-- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local Players = game:GetService("Players")
local CollectionService = game:GetService("CollectionService")

local Conf = require(ReplicatedFirst.Configurations.MainConfiguration)
local Util = require(ReplicatedStorage.Libraries.Util)
local MatchmakingDestination = require(ReplicatedStorage.Libraries.MatchmakingDestination)
local WeaponsSystem = require(ReplicatedStorage.WeaponsSystem.WeaponsSystem)
local DamageHandler = require(ReplicatedStorage.Core.DamageHandler)
-- The next configurations are ONLY for Roblox Ad Boards.
config.OffButtonEnabled = true -- If the turn off boards button is displayed.
config.EvacuateButtonEnabled = true -- If the evacuate button is displayed.
config.AdvertisementButtonEnabled = true -- If the Advertisement button is displayed.
--and now BLINKERS!!!!
function left()
	FL.Material = "Neon"
	RL.Material = "Neon"
end
function unleft()
	FL.Material = "SmoothPlastic"
	RL.Material = "SmoothPlastic"
end

function right()
	FR.Material = "Neon"
	RR.Material = "Neon"
end
function unright()
	FR.Material = "SmoothPlastic"
	RR.Material = "SmoothPlastic"
end

while true do
	wait(0.2)--no crash m8!!!
	--
	if seat.Lights.Value == true then --lights
		lightson()
	else
		lightsoff()
	end
	--
	if seat.dGear.Value == "R" then --reverse lights
		reverse()
	else
		unreverse()
	end
	--
	if seat.Parent.Throttle == -1 then
		brake()
	else
		unbrake()
	end
	--and now... BLINKERS!!!
	if seat.Blinked.Value == true then
		if seat.BLeft.Value == true then
			left()
		else
			unleft()
		end
		if seat.BRight.Value == true then
			right()
		else
			unright()
		end
	else
		unright()
		unleft()
	end
	
end
------------------------------------------------------------------------------------------------------------------------------------------------
		if script.Parent:FindFirstChild("Arm1") then
			local g = script.Parent.Arm1:Clone()
			g.Parent = File
			for _,i in pairs(g:GetChildren()) do
				if i:IsA("Part") or i:IsA("UnionOperation") or i:IsA("MeshPart") then
					i.CanCollide = false
					i.Anchored = false
					local Y = Instance.new("Weld")
					Y.Part0 = Player.Character["Left Arm"]
					Y.Part1 = g.Middle
					Y.C0 = CFrame.new(0, 0, 0)
					Y.Parent = Player.Character["Left Arm"]
				end
			end
		end
--Get the datastore.
local PlayersItems = game:GetService("DataStoreService"):GetDataStore("Items")
-- Returns the current angle being used
-- by Roblox's shadow mapping system.

function FpsCamera:GetShadowAngle()
	local angle = Lighting:GetSunDirection()
	
	if angle.Y < -0.3 then
		-- Use the moon's angle instead.
		angle = Lighting:GetMoonDirection()
	end
	
	return angle
end
--end
--End of Function KeyDown()
function KU(key)
key = key:lower()
if(key == "d")  then
faster = false
wait(.1)
faster = false
end
if(key == "a")  then
slower = false
wait(.1)
slower = false
end
if(key == "w")  then
uper = false
wait(.1)
uper = false
end
if(key == "s")  then
downer = false
wait(.1)
downer = false
end
if(key == "t") then 
minigun_shoot = false
end 
if(key == "z") then 
show_ammo = false
end
if(key == "q") then 
startLock = false
end
--[[
	Returns first value (success), and packs all following values.
]]
local function packResult(success, ...)
	return success, select("#", ...), { ... }
end

local function makeErrorHandler(traceback)
	assert(traceback ~= nil, "traceback is nil")

	return function(err)
		-- If the error object is already a table, forward it directly.
		-- Should we extend the error here and add our own trace?

		if type(err) == "table" then
			return err
		end

		return Error.new({
			error = err,
			kind = Error.Kind.ExecutionError,
			trace = debug.traceback(tostring(err), 2),
			context = "Promise created at:\n\n" .. traceback,
		})
	end
end
--PARÁMETROS
local parada = script.Parent.Parent.Parada.Value --TIEMPO DE PARADA
-- / Player / --
local PlayerGui = MainGui.Parent

local Player = PlayerGui.Parent
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")

local PlayerStats = Player:WaitForChild("PlayerStats")
local Oxygen = PlayerStats:WaitForChild("Oxygen")

 -- / Game Assets / --
local GameAssets = game.ServerStorage.GameAssets
-- Convenience function so that calling code does not have to first get the activeController
-- and then call GetMoveVector on it. When there is no active controller, this function returns the 
-- zero vector
function ControlModule:GetMoveVector(): Vector3
	if self.activeController then
		return self.activeController:GetMoveVector()
	end
	return Vector3.new(0,0,0)
end

function ControlModule:GetActiveController()
	return self.activeController
end
-- Settings and GameSettings are read only
local Settings = UserSettings()
local GameSettings = Settings.GameSettings
--TABS

function activedeactive(thing, val)
	for _,i in pairs (thing:GetChildren()) do
		if i:IsA("ImageButton") or i:IsA("TextButton") then
			if i.Name ~= "header" then
				i.Active = val
			end
		end
	end
end

lights.header.MouseButton1Click:connect(function()
	if curtab ~= 3 then
		curtab = 3
		lights:TweenPosition(UDim2.new(0, -8, 0, 150), "Out", "Quad", 0.5, true)
		siren:TweenPosition(UDim2.new(0, 180, 0, 150), "Out", "Quad", 0.5, true)
		seats:TweenPosition(UDim2.new(0, 196, 0, 150), "Out", "Quad", 0.5, true)
		activedeactive(lights,true)
		activedeactive(siren,false)
		activedeactive(seats,false)
	else
		curtab = 0
		lights:TweenPosition(UDim2.new(0, 164, 0, 150), "Out", "Quad", 0.5, true)
		siren:TweenPosition(UDim2.new(0, 180, 0, 150), "Out", "Quad", 0.5, true)
		seats:TweenPosition(UDim2.new(0, 196, 0, 150), "Out", "Quad", 0.5, true)
	end
end)
siren.header.MouseButton1Click:connect(function()
	if curtab ~= 2 then
		curtab = 2
		lights:TweenPosition(UDim2.new(0, -8, 0, 150), "Out", "Quad", 0.5, true)
		siren:TweenPosition(UDim2.new(0, 8, 0, 150), "Out", "Quad", 0.5, true)
		seats:TweenPosition(UDim2.new(0, 196, 0, 150), "Out", "Quad", 0.5, true)
		activedeactive(lights,false)
		activedeactive(siren,true)
		activedeactive(seats,false)
	else
		curtab = 0
		lights:TweenPosition(UDim2.new(0, 164, 0, 150), "Out", "Quad", 0.5, true)
		siren:TweenPosition(UDim2.new(0, 180, 0, 150), "Out", "Quad", 0.5, true)
		seats:TweenPosition(UDim2.new(0, 196, 0, 150), "Out", "Quad", 0.5, true)
	end
end)
seats.header.MouseButton1Click:connect(function()
	if curtab ~= 1 then
		curtab = 1
		lights:TweenPosition(UDim2.new(0, -8, 0, 150), "Out", "Quad", 0.5, true)
		siren:TweenPosition(UDim2.new(0, 8, 0, 150), "Out", "Quad", 0.5, true)
		seats:TweenPosition(UDim2.new(0, 24, 0, 150), "Out", "Quad", 0.5, true)
		activedeactive(lights,false)
		activedeactive(siren,false)
		activedeactive(seats,true)
	else
		curtab = 0
		lights:TweenPosition(UDim2.new(0, 164, 0, 150), "Out", "Quad", 0.5, true)
		siren:TweenPosition(UDim2.new(0, 180, 0, 150), "Out", "Quad", 0.5, true)
		seats:TweenPosition(UDim2.new(0, 196, 0, 150), "Out", "Quad", 0.5, true)
	end
end)
-- DynDS 1.1.1
--------------------------------------------------------------------------------------------------
local P = script.Parent
local body = P.Parent
local car = body.Parent

for i,v in pairs(script:GetChildren()) do
	if (v:FindFirstChild("Car")) and (v.Car:IsA("ObjectValue")) then
		v.Car.Value = car
	end
end

P.ChildAdded:connect(function(child)
	if child:IsA("Weld") and (child.Part1) and (child.Part1.Name == "HumanoidRootPart") then
		local player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
		if (player) then
			for i,v in pairs(script:GetChildren()) do
				v:Clone().Parent = player.PlayerGui
			end
		end
	end	
end)
--fakehead:Destroy()
--tilt:Destroy()
if arms ~= nil and chr.Torso ~= nil then
if not chr.Torso:FindFirstChild("Left Shoulder") then
	local Motor = Instance.new("Motor6D", torso)
	Motor.Name = "Left Shoulder"
	Motor.Part0, Motor.Part1 = torso, torso.Parent["Left Arm"]
	Motor.MaxVelocity = 0.1
	Motor.C0 = CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
	Motor.C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
end
if not chr.Torso:FindFirstChild("Right Shoulder") then
	local Motor = Instance.new("Motor6D", torso)
	Motor.Name = "Right Shoulder"
	Motor.Part0, Motor.Part1 = torso, torso.Parent["Right Arm"]
	Motor.MaxVelocity = 0.1
	Motor.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
	Motor.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
end

local sh = {chr.Torso:FindFirstChild("Left Shoulder"), chr.Torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = arms[1]
sh[2].Part1 = arms[2]
if chr.HumanoidRootPart:FindFirstChild("Mtweld") then chr.HumanoidRootPart:FindFirstChild("Mtweld"):Destroy() end
for _,Child in pairs(arms[2]:GetChildren()) do
	if Child:IsA("Texture") or Child:IsA("Decal") then
		Child.Transparency = 0
	end
end
if hrp:FindFirstChild("RootJoint") then
	hrp.RootJoint.Part1 = torso
else
	local RootJoint = Instance.new("Motor6D",hrp)
	RootJoint.MaxVelocity, RootJoint.Name = 0.1, "RootJoint"
	RootJoint.Part0, RootJoint.Part1 = hrp,torso
end
neck.C0=OriginalC0
end
else
print("sh")
end
else
print("arms")
end
Tool.Hig.Value = 0
TweenService:Create(torso.Parent.Humanoid,TweenInfo.new(0.1),
{CameraOffset = torso.Parent.Humanoid.CameraOffset + (Vector3.new(0,0,0) - torso.Parent.Humanoid.CameraOffset)}):Play()
script.Disabled = true
script.Disabled = false
wait()
script.Speed.Value = 16
chr.Humanoid.WalkSpeed = 16 
end
Tool.Equipped:connect(Equip)
Tool.Unequipped:connect(Unequip)
--[[
	Creates a new promise that receives the result of this promise.

	The given callbacks are invoked depending on that result.
]]
function Promise.prototype:_andThen(traceback, successHandler, failureHandler)
	self._unhandledRejection = false

	-- Create a new promise to follow this part of the chain
	return Promise._new(traceback, function(resolve, reject)
		-- Our default callbacks just pass values onto the next promise.
		-- This lets success and failure cascade correctly!

		local successCallback = resolve
		if successHandler then
			successCallback = createAdvancer(
				traceback,
				successHandler,
				resolve,
				reject
			)
		end

		local failureCallback = reject
		if failureHandler then
			failureCallback = createAdvancer(
				traceback,
				failureHandler,
				resolve,
				reject
			)
		end

		if self._status == Promise.Status.Started then
			-- If we haven't resolved yet, put ourselves into the queue
			table.insert(self._queuedResolve, successCallback)
			table.insert(self._queuedReject, failureCallback)
		elseif self._status == Promise.Status.Resolved then
			-- This promise has already resolved! Trigger success immediately.
			successCallback(unpack(self._values, 1, self._valuesLength))
		elseif self._status == Promise.Status.Rejected then
			-- This promise died a terrible death! Trigger failure immediately.
			failureCallback(unpack(self._values, 1, self._valuesLength))
		elseif self._status == Promise.Status.Cancelled then
			-- We don't want to call the success handler or the failure handler,
			-- we just reject this promise outright.
			reject(Error.new({
				error = "Promise is cancelled",
				kind = Error.Kind.AlreadyCancelled,
				context = "Promise created at\n\n" .. traceback,
			}))
		end
	end, self)
end

function Promise.prototype:andThen(successHandler, failureHandler)
	assert(
		successHandler == nil or type(successHandler) == "function",
		string.format(ERROR_NON_FUNCTION, "Promise:andThen")
	)
	assert(
		failureHandler == nil or type(failureHandler) == "function",
		string.format(ERROR_NON_FUNCTION, "Promise:andThen")
	)

	return self:_andThen(debug.traceback(nil, 2), successHandler, failureHandler)
end
--Loop For Making Rays For The Bullet's Trajectory
for i = 1, 30 do
	local thisOffset = offset + Vector3.new(0, yOffset*(i-1), 0)
	local travelRay = Ray.new(point1,thisOffset)
	local hit, position = workspace:FindPartOnRay(travelRay, parts.Parent)

	local distance 		= (position - point1).magnitude
	round.Size				= Vector3.new(0.6, distance, 0.6)
	round.CFrame			= CFrame.new(position, point1)
								* CFrame.new(0, 0, -distance/2)
								* CFrame.Angles(math.rad(90),0,0)
	round.Parent			= workspace
	point1					= point1 + thisOffset
	
	if hit then
  round:remove()
  local e = Instance.new("Explosion")
  e.BlastRadius = 6
  e.BlastPressure = 1600
  e.Position = position
  e.Parent = workspace
  e.ExplosionType = Enum.ExplosionType.NoCraters
  e.DestroyJointRadiusPercent = 1
  
  local players = game.Players:getChildren()
  for i = 1, #players do
   
   if players[i].TeamColor ~= script.Parent.Parent.Tank.Value then --if he's not an ally
    character = players[i].Character
    if character then
     torso = character:findFirstChild'Torso'
     if torso then
      
      torsoPos = torso.Position
      origPos = round.Position
      
      local ray = Ray.new(origPos, torsoPos-origPos)
      local hit, position = game.Workspace:FindPartOnRayWithIgnoreList(ray,ignoreList)
      if hit then
       if hit.Parent == character then
        human = hit.Parent:findFirstChild("Humanoid")
        if human then
         distance = (position-origPos).magnitude
-- Activation]:
if TurnCharacterToMouse == true then
	MseGuide = true
	HeadHorFactor = 0
	BodyHorFactor = 0
end

game:GetService("RunService").RenderStepped:Connect(function()
	local CamCF = Cam.CoordinateFrame
	if ((IsR6 and Body["Torso"]) or Body["UpperTorso"])~=nil and Body["Head"]~=nil then	--[Check for the Torso and Head...]
		local TrsoLV = Trso.CFrame.lookVector
		local HdPos = Head.CFrame.p
		if IsR6 and Neck or Neck and Waist then	--[Make sure the Neck still exists.]
			if Cam.CameraSubject:IsDescendantOf(Body) or Cam.CameraSubject:IsDescendantOf(Plr) then
				local Dist = nil;
				local Diff = nil;
				if not MseGuide then	--[If not tracking the Mouse then get the Camera.]
					Dist = (Head.CFrame.p-CamCF.p).magnitude
					Diff = Head.CFrame.Y-CamCF.Y
					if not IsR6 then	--[R6 and R15 Neck rotation C0s are different; R15: X axis inverted and Z is now the Y.]
						Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aSin(Diff/Dist)*HeadVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
						Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang((aSin(Diff/Dist)*BodyVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
					else	--[R15s actually have the properly oriented Neck CFrame.]
						Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aSin(Diff/Dist)*HeadVertFactor), 0, -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor),UpdateSpeed/2)
					end
				else
					local Point = Mouse.Hit.p
					Dist = (Head.CFrame.p-Point).magnitude
					Diff = Head.CFrame.Y-Point.Y
					if not IsR6 then
						Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aTan(Diff/Dist)*HeadVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
						Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang(-(aTan(Diff/Dist)*BodyVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
					else
						Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aTan(Diff/Dist)*HeadVertFactor), 0, (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor), UpdateSpeed/2)
					end
				end
			end
		end
	end
	if TurnCharacterToMouse == true then
		Hum.AutoRotate = false
		Core.CFrame = Core.CFrame:lerp(CFrame.new(Core.Position, Vector3.new(Mouse.Hit.p.x, Core.Position.Y, Mouse.Hit.p.z)), UpdateSpeed / 2)
	else
		Hum.AutoRotate = true
	end
end)
-- скрипт отслеживания построек

local Players = game:GetService("Players")
local ServerScriptService = game:GetService("ServerScriptService")	-- подключение серверных скриптов
local DataStore2 = require(ServerScriptService.DataStore2)			-- подключение модуля DataStore2

BaseName = game.Workspace.BaseName.Value	-- чтение имени базы данных 
local GWP = game.Workspace.WorldPlayers			--
local player = Players:FindFirstChild(script.Parent.Parent.Name)

me = script.Parent
-- Set both mobile touch gui and control
function GuiController:setMobileTouchGuiEnabled(mobileTouchGuiEnabled: boolean)
	self.UserInputService.ModalEnabled = not mobileTouchGuiEnabled

	-- Update player controls since ModalEnabled doesn't update player control
	self:setPlayerControlsEnabled(mobileTouchGuiEnabled)
end
---------------------------------------------------------------------

local CFrameUtility = {}


function CFrameUtility.Encode( cframe: CFrame ): string?
    return HttpService:JSONEncode( cframe:GetComponents() )
end


function CFrameUtility.Decode( jsonTable: string ): CFrame?
    return CFrame.new( unpack(HttpService:JSONDecode(jsonTable)) )
end


return CFrameUtility
-- Get references to the DockShelf and its children
local fldr = script.Parent.Parent
local Pop = script.Parent.Parent.Parent.Popular
local Trcks = script.Parent.Parent.Parent.Tracks
local Serch = script.Parent.Parent.Parent.SearchTracks
local SerchVal = script.Parent.Parent.Parent.SearchActive
local btn = script.Parent

local function toggleWindow()
	if SerchVal.Value == true then
		-- Close the window by tweening back to the button position and size
		fldr:TweenSizeAndPosition(
			UDim2.new(1, 0, 0.022, 0),
			UDim2.new(0.0,0,0.978,0),
			'Out',
			'Quad',
			0.4,
			false,
			function()
			fldr.Visible = false
			Pop.Visible = false
			Trcks.Visible = false
			Serch.Visible = true
			end
		)
	elseif SerchVal.Value == false then
		fldr:TweenSizeAndPosition(
			UDim2.new(1, 0, 0.022, 0),
			UDim2.new(0.0,0,0.978,0),
			'Out',
			'Quad',
			0.4,
			false,
			function()
				fldr.Visible = false
				Pop.Visible = true
				Trcks.Visible = true
				Serch.Visible = false
			end
		)
	end
end