Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[=[
	@param promise Promise
	@return Promise
	Gives the promise to the trove, which will cancel the promise if the trove is cleaned up or if the promise
	is removed. The exact promise is returned, thus allowing chaining.

	```lua
	trove:AddPromise(doSomethingThatReturnsAPromise())
		:andThen(function()
			print("Done")
		end)
	-- Will cancel the above promise (assuming it didn't resolve immediately)
	trove:Clean()

	local p = trove:AddPromise(doSomethingThatReturnsAPromise())
	-- Will also cancel the promise
	trove:Remove(p)
	```

	:::caution Promise v4 Only
	This is only compatible with the [roblox-lua-promise](https://eryn.io/roblox-lua-promise/) library, version 4.
	:::
]=]


function Trove:AddPromise(promise)
	if self._cleaning then
		error("Cannot call trove:AddPromise() while cleaning", 2)
	end
	AssertPromiseLike(promise)
	if promise:getStatus() == "Started" then
		promise:finally(function()
			if self._cleaning then
				return
			end
			self:_findAndRemoveFromObjects(promise, false)
		end)
		self:Add(promise, "cancel")
	end
	return promise
end
--run this first so if there is a 'white' team it is switched over


if not Settings['AutoAssignTeams'] then
	local teamHire = Instance.new('Team', Teams)
	teamHire.TeamColor = BC.new('White')
	teamHire.Name = "For Hire"
end

for i,v in pairs(script.Parent:WaitForChild('Tycoons'):GetChildren()) do
	Tycoons[v.Name] = v:Clone() -- Store the tycoons then make teams depending on the tycoon names
	if returnColorTaken(v.TeamColor) then
		--//Handle duplicate team colors
		local newColor;
		repeat
			wait()
			newColor = BC.Random()
		until returnColorTaken(newColor) == false
		v.TeamColor.Value = newColor
	end
	--Now that there are for sure no duplicates, make your teams
	local NewTeam = Instance.new('Team',Teams)
	NewTeam.Name = v.Name
	NewTeam.TeamColor = v.TeamColor.Value
	if not Settings['AutoAssignTeams'] then
		NewTeam.AutoAssignable = false
	end
	--v.PurchaseHandler.Disabled = false
end

function getPlrTycoon(player)
	for i,v in pairs(script.Parent.Tycoons:GetChildren()) do
		if v:IsA("Model") then
			if v.Owner.Value == player then
				return v
			end
		end
	end
	return nil
end

game.Players.PlayerAdded:connect(function(player)
	local plrStats = Instance.new("NumberValue",game.ServerStorage.PlayerMoney)
	plrStats.Name = player.Name
	local isOwner = Instance.new("ObjectValue",plrStats)
	isOwner.Name = "OwnsTycoon"
end)

game.Players.PlayerRemoving:connect(function(player)
	wait(2)
	local plrStats = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name)
	if plrStats ~= nil then
		plrStats:Destroy()
	end
	local tycoon = getPlrTycoon(player)
	if tycoon then
		local backup = Tycoons[tycoon.Name]:Clone()
		tycoon:Destroy()
		wait()
		backup.Parent=script.Parent.Tycoons
	end
end)
-- TODO: Only require itemId. Category can be looked up with getCategoryForItemId now that we assume itemIds are unique across categories


local function getItemByIdInCategory(itemId: string, category: ItemCategory.EnumType)
	local item

	local container = ContainerByCategory[category]
	assert(container, string.format("Attempt to get item with invalid category `%s`", category))

	item = container:FindFirstChild(itemId)
	assert(item, string.format("Attempt to get item in category `%s` with invalid itemId `%s`", category, itemId))

	return item :: Model
end

return getItemByIdInCategory
--[[ Initialization ]]

--
if not UserInputService.TouchEnabled then -- TODO: Remove when safe!
	initialize()
	if isShiftLockMode() then
		ContextActionService:BindActionToInputTypes("ToggleShiftLock", mouseLockSwitchFunc, false, Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift)
		IsActionBound = true
	end
end

return ShiftLockController
-- Adds numParts more parts to the cache.


function PartCacheStatic:Expand(numParts: number): ()
	assert(getmetatable(self) == PartCacheStatic, ERR_NOT_INSTANCE:format("Expand", "PartCache.new"))
	if numParts == nil then
		numParts = self.ExpansionSize
	end
	
	for i = 1, numParts do
		table.insert(self.Open, MakeFromTemplate(self.Template, self.CurrentCacheParent))
	end
end
--A data-saving function. SetAsync takes ten seconds to run,
--so the player will have to stay ten seconds after 


function SaveData(Player)
	local Items = {}
	for i,Item in ipairs(Player.Backpack:GetChildren()) do
		if game.ServerStorage:FindFirstChild(Item.Name) ~= nil then
			if game.ServerStorage[Item.Name]:IsA("Tool") then
				table.insert(Items, Item.Name)
			end
		end
	end
	PlayersItems:SetAsync(Player.UserId, Items)
end
--Make sure this script is inside a body of a car that you want to be destructible.
--Also this is mostly meant for cars which are made out of parts.


local Body = script.Parent
local BreakSpeed = 30

for _,Part in ipairs(Body:GetDescendants()) do
	if Part:IsA("BasePart") then
		Part.Touched:Connect(function(hit)
			local velocity = Part.Velocity.Magnitude -- Get the speed of the car
			local collisionforce = GetImpactVelocity(Part,hit)
			local h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
			if collisionforce > BreakSpeed and h == nil then
				Part:BreakJoints()
				Part.Massless = true
				Part.CanTouch = false
				-- you can make so that a sound plays, or an effect appears etc...
				game:GetService("Debris"):AddItem(Part,10)
			end
		end)
	end
end

function GetImpactVelocity(part, Other)
	--dont touch this
	local pVelocity = part.Velocity
	local oVelocity = Other.Velocity

	local pRoundedVelocity = Vector3.new(math.floor(pVelocity.X), math.floor(pVelocity.Y), math.floor(pVelocity.Z))
	local oRoundedVelocity = Vector3.new(math.floor(oVelocity.X), math.floor(oVelocity.Y), math.floor(oVelocity.Z))

	local impactForce = Vector3.new(pRoundedVelocity.X - oRoundedVelocity.X, pRoundedVelocity.Y - oRoundedVelocity.Y, pRoundedVelocity.Z - oRoundedVelocity.Z)
	impactForce = Vector3.new(math.abs(impactForce.X), math.abs(impactForce.Y), math.abs(impactForce.Z))

	local speed = math.max(impactForce.X, impactForce.Y, impactForce.Z)

	return speed
end
-- @Description Return a true copy of the table.
-- @Arg1 Table


function Basic.CopyTable(Tbl)
	local Copy = {}
	for i,v in pairs(Tbl) do
		if type(v) == "table" then
			Copy[i] = Basic.CopyTable(v)
		else
			Copy[i] = v
		end
	end
	return Copy
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, "No traceback")

	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
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------




function onRunning(speed)
	if speed>0.01 then
		playAnimation("walk", 0.1, Humanoid)
		if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
			setAnimationSpeed(speed / 14.5)
		end
		pose = "Running"
	else
		if emoteNames[currentAnim] == nil then
			playAnimation("idle", 0.1, Humanoid)
			pose = "Standing"
		end
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	playAnimation("jump", 0.1, Humanoid)
	jumpAnimTime = jumpAnimDuration
	pose = "Jumping"
end

function onClimbing(speed)
	playAnimation("climb", 0.1, Humanoid)
	setAnimationSpeed(speed / 12.0)
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	if (jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	end
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end

function onSwimming(speed)
	if speed>0 then
		pose = "Running"
	else
		pose = "Standing"
	end
end

function getTool()	
	for _, kid in ipairs(Figure:GetChildren()) do
		if kid.className == "Tool" then return kid end
	end
	return nil
end

function getToolAnim(tool)
	for _, c in ipairs(tool:GetChildren()) do
		if c.Name == "toolanim" and c.className == "StringValue" then
			return c
		end
	end
	return nil
end

function animateTool()
	
	if (toolAnim == "None") then
		playToolAnimation("toolnone", toolTransitionTime, Humanoid)
		return
	end

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid)
		return
	end
end

function moveSit()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder:SetDesiredAngle(3.14 /2)
	LeftShoulder:SetDesiredAngle(-3.14 /2)
	RightHip:SetDesiredAngle(3.14 /2)
	LeftHip:SetDesiredAngle(-3.14 /2)
end

local lastTick = 0

function move(time)
	local amplitude = 1
	local frequency = 1
  	local deltaTime = time - lastTick
  	lastTick = time

	local climbFudge = 0
	local setAngles = false

  	if (jumpAnimTime > 0) then
  		jumpAnimTime = jumpAnimTime - deltaTime
  	end

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif (pose == "Seated") then
		playAnimation("sit", 0.5, Humanoid)
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.1, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
--[[local Buttons = {EquipButton,CraftButton,RecycleButton};

local function ChangeAction(Button,CustomTime)
	CurrentAction = Button.Name;
	for _,B in pairs(Buttons) do B.Style = (B==Button and Enum.ButtonStyle.RobloxRoundDefaultButton) or Enum.ButtonStyle.RobloxRoundButton; end;
	if Button.Name ~= "Equip" then for _,F in pairs(ActionContainer:GetChildren()) do F.Visible = (F.Name==Button.Name); end; end;
	for Frame,Data in pairs(Sizes) do
		Frame:TweenSizeAndPosition(
			Data[Button].Size,
			Data[Button].Position,
			Direction,Style,((tonumber(CustomTime)~=nil and CustomTime) or Time)
		);
	end
end
for _,Button in pairs(Buttons) do
	Button.MouseButton1Click:connect(function()
		ChangeAction(Button);
	end)
end]]
--[[
	
	Grabs devProduct info - cleaner alternative to GetProductInfo. Caches and may potentially yield.
	
	Functions.GetProductInfo(
		id, 					<-- |REQ|	ID of devProduct. (w/o link)
	)
	
--]]





return function(id)
	--- Check cache
	if cachedProductInfo[id] == nil then
		--- Get product info
		local productInfo = _L.Services.MarketplaceService:GetProductInfo(id, Enum.InfoType.Product)
		
		--- Update cache
		if productInfo ~= nil then
			cachedProductInfo[id] = productInfo
		end
		
		--
		return productInfo
	else
		
		--- Return cache
		return cachedProductInfo[id]
	end
end
--// 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
--local soundCoroutine = coroutine.wrap(function()
--while wait(math.random(5,10)) do
--root.Hiss.Pitch = root.Hiss.OriginalPitch.Value+(math.random(-10,10)/100)
--root.Hiss:Play()
--end
--end)
--soundCoroutine()



health.Changed:connect(function()
root.Hurt.Pitch = root.Hurt.OriginalPitch.Value+(math.random(-100,100)/100)
root.Hurt:Play()
end)
-- [Head, Torso, HumanoidRootPart], "Torso" and "UpperTorso" works with both R6 and R15.
-- Also make sure to not misspell it.


local PartToLookAt = "Torso" -- What should the npc look at. If player doesn't has the specific part it'll looks for RootPart instead.

local LookBackOnNil = true -- Should the npc look at back straight when player is out of range.

local SearchLoc = {workspace} -- Will get player from these locations
-- Variable for RemoteEvent



Players.PlayerAdded:Connect(function(player: Player)
	local leaderstats = player:FindFirstChild("leaderstats")
	player.CharacterAdded:Connect(function(character)
		local humanoid = character:WaitForChild("Humanoid")
		humanoid.Died:Connect(function()
			if humanoid:FindFirstChild("creator") then
				local killer = humanoid:FindFirstChild("creator").Value
				local killerHumanoid = Utilities:GetHumanoid(killer)
				killerHumanoid.Health += 25
				killer.leaderstats.Kills.Value += 1
					if Utilities:OwnsGamepass(player, Configurations.GamePassIds["Double Cash"]) then
						killer.leaderstats.Cash.Value +=  10
					else
						killer.leaderstats.Cash.Value += 5
					end
				end
			end)
	end)
end)
-- Finds a random position inside of the given part and returns a randomly rotated CFrame at that position


local function getRandomCFrameInVolume(partVolume)

    -- Calculate the position component of the random CFrame
    local x = randomGenerator:NextInteger(-partVolume.Size.X/2, partVolume.Size.X/2)
    local y = randomGenerator:NextInteger(-partVolume.Size.Y/2, partVolume.Size.Y/2)
    local z = randomGenerator:NextInteger(-partVolume.Size.Z/2, partVolume.Size.Z/2)
    local localOffset = Vector3.new(x, y, z)
    local worldOffset = partVolume.CFrame:pointToWorldSpace(localOffset)		

    -- Calculate the rotation component of the random CFrame
    local twoPi = math.pi * 2
    local xRotation = randomGenerator:NextNumber() * twoPi
    local yRotation = randomGenerator:NextNumber() * twoPi
    local zRotation = randomGenerator:NextNumber() * twoPi
    local CFrame = CFrame.Angles(xRotation, yRotation, zRotation)	

    -- Add the position and rotation together to get the full random CFrame
    CFrame = CFrame + worldOffset

    return CFrame
end
-- Check if the player is walking


local check_movement = function()
	if humanoid.WalkSpeed > 0 and humanoid.MoveDirection.Magnitude > 0 and humanoid.FloorMaterial ~= Enum.Material.Air then
		return true
	elseif humanoid.WalkSpeed <= 0 or humanoid.MoveDirection.Magnitude <= 0 or humanoid.FloorMaterial == Enum.Material.Air then
		return false
	end
end
------ Locales ------



local CaseData = script.Parent.CaseData
local InformationData = script.Parent.Parent.Parent.CaseInformationFrame.Information
local InformationImage = script.Parent.Parent.Parent.CaseInformationFrame.Variables.CaseInformationPhoto
local InformationVariables = script.Parent.Parent.Parent.CaseInformationFrame.Variables
local Button = script.Parent
local Image = Button.UI.Package
local Player = game:GetService("Players").LocalPlayer
local Inventory = Player.Inventory
local Variables = Button.Variables
-- Cleaning the blood parts function


local deleteBlood = function(part)
    
    local tween = tweenPartSize(part, 0.5, Enum.EasingDirection.In, Vector3.new(0, 0.1, 0))
    
    spawn(function()
        tween.Completed:Wait()
        tween:Destroy()
        
        part:Destroy()
    end)
end
-- Each note takes up exactly 8 seconds in audio. i.e C2 lasts 8 secs, C2# lasts 8 secs, C3 lasts 8 secs, C3# lasts 8 secs etc. for each audio
-- These are the IDs of the piano sounds.



settings.SoundSource = Piano.Keys.KeyBox

settings.CameraCFrame = CFrame.new(
	(Box.CFrame * CFrame.new(0, 0, 1)).p, -- +z is towards player
	(Box.CFrame * CFrame.new(0, 0, 0)).p
)
--avoid error, script runs before script.Tool and script.Target are added as children


wait()
script.Tool.Value.Changed:connect(function(pr)
	--print("Tool \"", script.Tool.Value, "\"s parent changed to ", script.Tool.Value.Parent)
	if pr == "Parent" then
		if script.Tool.Value.Parent == game.Workspace then
			game.Workspace.CurrentCamera.CameraType = 5	
			game.Workspace.CurrentCamera.CameraSubject = script.Target.Value
		end
	end
end)

script.Tool.Value.Unequipped:connect(function()
	wait(0.5)
	script:remove()
end)

print("PaperPlaneGear :: CamFocusFailsafe loaded")
--[[Weight and CG]]


	Tune.Weight			= 3960		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		14		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2		-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])
local on = 0

script:WaitForChild("Rev")
script:WaitForChild("Turbo")

if not FE then
	for i,v in pairs(car.Body.ENGINE:GetChildren()) do
		for _,a in pairs(script:GetChildren()) do
			if v.Name==a.Name then v:Stop() wait() v:Destroy() end
		end
	end
	for i,v in pairs(script:GetChildren()) do
		v.Parent=car.Body.ENGINE
	end
	
	car.Body.ENGINE.Rev:Play()
	car.Body.ENGINE.idle:Play()

	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		car.Body.ENGINE.Rev.Pitch = (car.Body.ENGINE.Rev.SetPitch.Value + car.Body.ENGINE.Rev.SetRev.Value*_RPM/_Tune.Redline)*on^2
		car.Body.ENGINE.Turbo.Pitch = (car.Body.ENGINE.Turbo.SetPitch.Value + car.Body.ENGINE.Turbo.SetRev.Value*_RPM/_Tune.Redline)*on^2
		car.Body.ENGINE.idle.Pitch = (car.Body.ENGINE.idle.SetPitch.Value + car.Body.ENGINE.Turbo.SetRev.Value*_RPM/_Tune.Redline)*on^2

		if _RPM == 700 then
		car.Body.ENGINE.idle.Volume = .1-- 0/.07
		car.Body.ENGINE.Turbo.Volume = .2
			car.Body.ENGINE.Rev.Volume = 0
			
		else
			car.Body.ENGINE.Rev.Volume = .2
			car.Body.ENGINE.idle.Volume = 0	
		--	car.Body.ENGINE.Turbo:Stop()	
		end
		
		
	
	
	end
else
	local handler = car.AC6_FE_Sounds
	handler:FireServer("newSound","Rev",car.Body.ENGINE,script.Rev.SoundId,0,script.Rev.Volume,true)
	handler:FireServer("playSound","Rev")
	handler:FireServer("newSound","Turbo",car.Body.ENGINE,script.Turbo.SoundId,0,script.Turbo.Volume,true)
	handler:FireServer("playSound","Turbo")
	handler:FireServer("newSound","idle",car.Body.ENGINE,script.idle.SoundId,0,script.Turbo.Volume,true)
	handler:FireServer("playSound","idle")
	
	local pitch=0
	local pitch2=0
	local pitch3=0

	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		pitch = (script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline)*on^2
		pitch2 = (script.Turbo.SetPitch.Value + script.Turbo.SetRev.Value*_RPM/_Tune.Redline)*on^2
		pitch3 = (script.idle.SetPitch.Value + script.idle.SetRev.Value*_RPM/_Tune.Redline)*on^2
		
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,pitch,script.Rev.Volume)
		handler:FireServer("updateSound","Turbo",script.Turbo.SoundId,pitch2,script.Turbo.Volume)
		handler:FireServer("updateSound","idle",script.idle.SoundId,pitch3,script.idle.Volume)
	
	end
end
--[[
	Main RenderStep Update. The camera controller and occlusion module both have opportunities
	to set and modify (respectively) the CFrame and Focus before it is set once on CurrentCamera.
	The camera and occlusion modules should only return CFrames, not set the CFrame property of
	CurrentCamera directly.
--]]


function CameraModule:Update(dt)
	if self.activeCameraController then
		self.activeCameraController:UpdateMouseBehavior()

		local newCameraCFrame, newCameraFocus = self.activeCameraController:Update(dt)

		if self.activeOcclusionModule then
			newCameraCFrame, newCameraFocus = self.activeOcclusionModule:Update(dt, newCameraCFrame, newCameraFocus)
		end

		-- Here is where the new CFrame and Focus are set for this render frame
		local currentCamera = game.Workspace.CurrentCamera :: Camera
		currentCamera.CFrame = newCameraCFrame
		currentCamera.Focus = newCameraFocus

		-- Update to character local transparency as needed based on camera-to-subject distance
		if self.activeTransparencyController then
			self.activeTransparencyController:Update(dt)
		end

		if CameraInput.getInputEnabled() then
			CameraInput.resetInputForFrameEnd()
		end
	end
end
-- Register's a newly added Motor6D  
-- into the provided joint rotator.



function CharacterRealism:AddMotor(rotator, motor)
	local parent = motor.Parent
	
	if parent and parent.Name == "Head" then
		parent.CanCollide = true
	end
	
	-- Wait until this motor is marked as active
	-- before attempting to use it in the rotator.
	
	Util:PromiseValue(motor, "Active", function ()
		local data = 
		{ 
			Motor = motor;
			C0 = motor.C0;
		}
		
		-- If it can be found, use the source RigAttachment for this Motor6D
		-- joint instead of using the static C0 value. This is intended for R15.
		
		Util:PromiseChild(motor.Part0, motor.Name .. "RigAttachment", function (origin)
			if origin:IsA("Attachment") then
				data.Origin = origin
				data.C0 = nil
			end
		end)
			
		-- Add this motor to the rotator
		-- by the name of its Part1 value.
		
		local id = motor.Part1.Name
		rotator.Motors[id] = data
	end)
end
--// F key, HornOff


mouse.KeyUp:connect(function(key)
	if key=="h" then 
		veh.Lightbar.middle.Airhorn:Stop()
		veh.Lightbar.middle.Wail.Volume = 1
		veh.Lightbar.middle.Yelp.Volume = 1
		veh.Lightbar.middle.Priority.Volume = 1
	end
end)
-- goro7



script.Parent.Event:connect(function(plr)
	
	-- Check if sufficient time has passed
	local currentTime = tick()
	if currentTime - plr.Stats.LastDailyHunterCoins.Value >= 86400 then
		
		-- Change stats
		plr.Stats.Coins.Value = plr.Stats.Coins.Value + 9000
		plr.Stats.LastDailyHunterCoins.Value = currentTime
		
		-- Send result
		game.ReplicatedStorage.Interactions.Client.DailyHunterCoinsResult:FireClient(plr, true, tick())
		
	else
		
		-- Send result
		game.ReplicatedStorage.Interactions.Client.DailyHunterCoinsResult:FireClient(plr, false, tick())
		
	end
	
end)
------CruisinWithMyHomies v--- 


mouse.KeyDown:connect(function (key)
    key = string.lower(key)
             
if carSeat.Velocity.Magnitude > 25 and key == "x" and cc.Value == false then
	cc.Value = true
	rwd.MaxSpeed = carSeat.Velocity.Magnitude
	rrwd.MaxSpeed = carSeat.Velocity.Magnitude
	lwd.MaxSpeed = carSeat.Velocity.Magnitude
	rwd.Torque = tq
	rrwd.Torque = ftq
	lwd.Torque = ftq
	rwd.Throttle = 1
	rrwd.Throttle = 1
	lwd.Throttle = 1
elseif key == "x" and cc.Value == true then
	cc.Value = false
	
end
end)
--	Rate = 64;


	Rate = 8;

	--	Size: How large the droplets roughly are (in studs)
	Size = 0.1;

	--	Tint: What color the droplets are tinted (leave as nil for a default realistic light blue)
	Tint = Color3.fromRGB(226, 244, 255);

	--	Fade: How long it takes for a droplet to fade
	Fade = 1.5;
}

local UpVec = Vector3.new(0, 1, 0)
local DROPLET_SIZE = Vector3.new(1, 1, 1)
local EMPTY_CFRAME = CFrame.new()
--[[ Roblox Services ]]

--
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local StarterGui = game:GetService("StarterGui")
local GuiService = game:GetService("GuiService")
local ContextActionService = game:GetService("ContextActionService")
local VRService = game:GetService("VRService")
local UserGameSettings = UserSettings():GetService("UserGameSettings")

local player = Players.LocalPlayer