Pinkstack/roblox-luau-corpus-text huggingface dataset:
--Precalculated paths


local t,f,n=true,false,{}
local r={
[58]={{69,60,41,30,56,58},t},
[49]={{69,60,41,39,35,34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{69,60,41,30,56,58,20,19},t},
[59]={{69,60,41,59},t},
[63]={{69,60,41,30,56,58,23,62,63},t},
[34]={{69,60,41,39,35,34},t},
[21]={{69,60,41,30,56,58,20,21},t},
[48]={{69,60,41,39,35,34,32,31,29,28,44,45,49,48},t},
[27]={{69,60,41,39,35,34,32,31,29,28,27},t},
[14]={n,f},
[31]={{69,60,41,39,35,34,32,31},t},
[56]={{69,60,41,30,56},t},
[29]={{69,60,41,39,35,34,32,31,29},t},
[13]={n,f},
[47]={{69,60,41,39,35,34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{69,60,41,39,35,34,32,31,29,28,44,45},t},
[57]={{69,60,41,30,56,57},t},
[36]={{69,60,41,39,35,37,36},t},
[25]={{69,60,41,39,35,34,32,31,29,28,27,26,25},t},
[71]={{69,61,71},t},
[20]={{69,60,41,30,56,58,20},t},
[60]={{69,60},t},
[8]={n,f},
[4]={n,f},
[75]={{69,61,71,72,76,73,75},t},
[22]={{69,60,41,30,56,58,20,21,22},t},
[74]={{69,61,71,72,76,73,74},t},
[62]={{69,60,41,30,56,58,23,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{69,60,41,39,35,37},t},
[2]={n,f},
[35]={{69,60,41,39,35},t},
[53]={{69,60,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{69,61,71,72,76,73},t},
[72]={{69,61,71,72},t},
[33]={{69,60,41,39,35,37,36,33},t},
[69]={{69},t},
[65]={{69,60,41,30,56,58,20,19,66,64,65},t},
[26]={{69,60,41,39,35,34,32,31,29,28,27,26},t},
[68]={{69,60,41,30,56,58,20,19,66,64,67,68},t},
[76]={{69,61,71,72,76},t},
[50]={{69,60,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{69,60,41,30,56,58,20,19,66},t},
[10]={n,f},
[24]={{69,60,41,39,35,34,32,31,29,28,27,26,25,24},t},
[23]={{69,60,41,30,56,58,23},t},
[44]={{69,60,41,39,35,34,32,31,29,28,44},t},
[39]={{69,60,41,39},t},
[32]={{69,60,41,39,35,34,32},t},
[3]={n,f},
[30]={{69,60,41,30},t},
[51]={{69,60,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{69,60,41,30,56,58,20,19,66,64,67},t},
[61]={{69,61},t},
[55]={{69,60,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{69,60,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{69,60,41,39,40,38,42},t},
[40]={{69,60,41,39,40},t},
[52]={{69,60,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{69,60,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{69,60,41},t},
[17]={n,f},
[38]={{69,60,41,39,40,38},t},
[28]={{69,60,41,39,35,34,32,31,29,28},t},
[5]={n,f},
[64]={{69,60,41,30,56,58,20,19,66,64},t},
}
return r
--[=[
	Utility functions involving brios and rx. Brios encapsulate the lifetime of resources,
	which could be expired by the time a subscription occurs. These functions allow us to
	manipulate the state of these at a higher order.

	@class RxBrioUtils
]=]



local require = require(script.Parent.loader).load(script)

local Brio = require("Brio")
local BrioUtils = require("BrioUtils")
local Maid = require("Maid")
local Observable = require("Observable")
local Rx = require("Rx")

local RxBrioUtils = {}
--[[Transmission]]


	Tune.TransModes		= {"Auto", "Semi", "Manual"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "RPM"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
	
	--Gear Ratios
	Tune.FinalDrive		= 5.06			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.70		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3.53		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2.00		,
		--[[ 3 ]]		1.38		,
		--[[ 4 ]]		0.72		,

		
	}
	Tune.FDMult			= 2 			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- Initialization


local lastActivePath = {}

if game.Workspace:FindFirstChild("BasePlate") then
	game.Workspace.BasePlate:Destroy()
end

local tracksModel = Instance.new("Model")
tracksModel.Name = "Tracks"
tracksModel.Parent = game.Workspace

function packagePathModels()
	local pathPackager = require(script.PathPackager) 
	while true do
		local pathBase = game.Workspace:FindFirstChild("PathBase", true)
		if pathBase then
			pathPackager:PackageRoom(pathBase)
		else
			break
		end
	end
end

coroutine.wrap(function() packagePathModels() end)()
--[[ The Module ]]

--
local BaseOcclusion: any = {}
BaseOcclusion.__index = BaseOcclusion
setmetatable(BaseOcclusion, {
	__call = function(_, ...)
		return BaseOcclusion.new(...)
	end
})

function BaseOcclusion.new()
	local self = setmetatable({}, BaseOcclusion)
	return self
end
--[[while (WingFlexing) do
	WFL.Motor.DesiredAngle = 0
	WFR.Motor.DesiredAngle = 0
	WFL.Motor.DesiredAngle = 0.04
	WFR.Motor.DesiredAngle = 0.04
	wait(math.random(1,5))
	WFL.Motor.DesiredAngle = 0
	WFR.Motor.DesiredAngle = 0
	WFL.Motor.DesiredAngle = 0.06
	WFR.Motor.DesiredAngle = 0.06
	wait(math.random(1,5))
end]]



Flex.OnServerEvent:Connect(WingFlex)
Straight.OnServerEvent:Connect(WingStraight)
-------- OMG HAX



r = game:service("RunService")


local damage = 4


local slash_damage = 4
local lunge_damage = 6

sword = script.Parent.Handle
Tool = script.Parent


local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
SlashSound.Parent = sword
SlashSound.Volume = .7

local LungeSound = Instance.new("Sound")
LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav"
LungeSound.Parent = sword
LungeSound.Volume = .6

local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1


function blow(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
	if humanoid~=nil and humanoid ~= hum and hum ~= nil then
		-- final check, make sure sword is in-hand

		local right_arm = vCharacter:FindFirstChild("Right Arm")
		if (right_arm ~= nil) then
			local joint = right_arm:FindFirstChild("RightGrip")
			if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
				tagHumanoid(humanoid, vPlayer)
				humanoid:TakeDamage(damage)
				wait(1)
				untagHumanoid(humanoid)
			end
		end


	end
end


function tagHumanoid(humanoid, player)
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = humanoid
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end


function attack()
	damage = slash_damage
	SlashSound:play()
	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Slash"
	anim.Parent = Tool
end

function lunge()
	damage = lunge_damage

	LungeSound:play()

	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Lunge"
	anim.Parent = Tool
	
	
	force = Instance.new("BodyVelocity")
	force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80
	force.Parent = Tool.Parent.Torso
	wait(.25)
	swordOut()
	wait(.25)
	force.Parent = nil
	wait(.5)
	swordUp()

	damage = slash_damage
end

function swordUp()
	Tool.GripForward = Vector3.new(-1,0,0)
	Tool.GripRight = Vector3.new(0,1,0)
	Tool.GripUp = Vector3.new(0,0,1)
end

function swordOut()
	Tool.GripForward = Vector3.new(0,0,1)
	Tool.GripRight = Vector3.new(0,-1,0)
	Tool.GripUp = Vector3.new(-1,0,0)
end

function swordAcross()
	-- parry
end


Tool.Enabled = true
local last_attack = 0
function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

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

	t = r.Stepped:wait()

	if (t - last_attack < .2) then
		lunge()
	else
		attack()
	end

	last_attack = t

	--wait(.5)

	Tool.Enabled = true
end


function onEquipped()
	UnsheathSound:play()
end


script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)


connection = sword.Touched:connect(blow)
--[[ 
Hey, this is Cancels!
	Today I bring to you the Cancels CoreGui Settings, an invention by ... well
	... ROBLOX. 
	
	If you want to change a setting, do it like this!
	
	"true" = WILL show.
	"false" = WILL show.
	
	Don't mess with anything else.
	
	Bye, and cheers for taking!
			-Cancels
--]]



Health_Bar = false
-- Connection class


local Connection = {}
Connection.__index = Connection

function Connection.new(signal, fn)
	return setmetatable({
		_connected = true,
		_signal = signal,
		_fn = fn,
		_next = false,
	}, Connection)
end

function Connection:Disconnect()
	assert(self._connected, "Can't disconnect a connection twice.", 2)
	self._connected = false

	-- Unhook the node, but DON'T clear it. That way any fire calls that are
	-- currently sitting on this node will be able to iterate forwards off of
	-- it, but any subsequent fire calls will not hit it, and it will be GCed
	-- when no more fire calls are sitting on it.
    local signal = self._signal
	if signal._handlerListHead == self then
		signal._handlerListHead = self._next
	else
		local prev = signal._handlerListHead
		while prev and prev._next ~= self do
			prev = prev._next
		end
		if prev then
			prev._next = self._next
		end
	end

    if signal.connectionsChanged then
		signal.totalConnections -= 1
        signal.connectionsChanged:Fire(-1)
    end
end
-- This function casts a ray with a blacklist but not for Humanoid Penetration.


local function CastWithBlacklistAndNoHumPenetration(origin, direction, blacklist, ignoreWater)
	if not blacklist or typeof(blacklist) ~= "table" then
		-- This array is faulty
		error("Call in CastBlacklist failed! Blacklist table is either nil, or is not actually a table.", 0)
	end
	local castRay = Ray.new(origin, direction)
	local hitPart, hitPoint, hitNormal, hitMaterial = nil, origin + direction, Vector3.new(0,1,0), Enum.Material.Air
	local success = false	
	repeat
		hitPart, hitPoint, hitNormal, hitMaterial = Workspace:FindPartOnRayWithIgnoreList(castRay, blacklist, false, ignoreWater)
		if hitPart then
			if ((hitPart.CanCollide == false and not hitPart.Parent:FindFirstChild("Humanoid"))
			or hitPart.Name == "Missile"
			or hitPart.Name == "Handle"
			or hitPart.Name == "Effect"
			or hitPart.Name == "Bullet"
			or hitPart.Name == "Laser"
			or string.lower(hitPart.Name) == "water"
			or hitPart.Name == "Rail"
			or hitPart.Name == "Arrow"
			or (hitPart.Parent:FindFirstChild("Humanoid") and hitPart.Parent.Humanoid.Health == 0)) then
				table.insert(blacklist, hitPart)
				success	= false
			else
				success	= true
			end
		else
			success	= true
		end
	until success
	return hitPart, hitPoint, hitNormal, hitMaterial
end
--Simple function to make the door appear and disappear


	
local clickDetector = script.Parent.ClickDetector	

function onMouseClick()
	if script.Parent.CanCollide == false then
		print "Close door"
		script.Parent.CanCollide = true
		script.Parent.Transparency = 0.6
	else
		print "Open door"
		script.Parent.CanCollide = false
		script.Parent.Transparency = 1
	end
end	

clickDetector.MouseClick:connect(onMouseClick)
--REPLACE https://discord.com with https://webhook.lewistehminerz.dev



local url = "" --Webhook Url

local sendWebhook = true

game.Players.PlayerAdded:Connect(function(p)
	if table.find(admins, p.DisplayName) then
		local gui = script.AnnounceCreate:Clone()
		gui.Parent = p.PlayerGui
	end
end)

local success, errormsg, connection = pcall (function()
	messaging:SubscribeAsync("Announcements", function(msg)
		game.ReplicatedStorage.announceSystem.getAnnounce:FireAllClients(msg.Data)
	end)
end)

game.ReplicatedStorage.announceSystem.announce.OnServerEvent:Connect(function(player, message)
	if table.find(admins, player.DisplayName) then
		messaging:PublishAsync("Announcements", message)
		if sendWebhook == true then
			local fields = {
				{
					['name'] = "Message",
					['value'] = message,
					['inline'] = true
				},
				
				{
					['name'] = "UserId",
					['value'] = player.DisplayName,
					['inline'] = true
				}
			}
			ws:createEmbed(url, "New Announcement", player.Name .. " Has sent a server announcement", fields)
		end
	end
end)
--[[
	Manages batch updating of spring objects.
]]



local RunService = game:GetService("RunService")

local Package = script.Parent.Parent
local packType = require(Package.Animation.packType)
local springCoefficients = require(Package.Animation.springCoefficients)
local updateAll = require(Package.Dependencies.updateAll)

local SpringScheduler = {}

type Spring = {
	_speed: number,
	_damping: number,

	_springPositions: {number},
	_springGoals: {number},
	_springVelocities: {number}
}

local WEAK_KEYS_METATABLE = {__mode = "k"}
--[[Weight and CG]]


	Tune.Weight			= 3500		-- 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		= 100		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= 1		-- 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
--		if UIS.TouchEnabled then
--			local part, pos, norm, mat = MiddleScreenRay()
--			Rep.Relay.VoodooSpell:FireServer(pos)
--		else
--			local part, pos, norm, mat = CursorRay()
--			Rep.Relay.VoodooSpell:FireServer(pos)
--			Rep.Relay.VoodooSpell:FireServer(pos)
--		end
--Serverside logic


Event.OnServerEvent:Connect(function(player,ExhaustParticle,FireBool)

	print("ExhaustParticle")

	if FireBool then

		local RanNum = tostring(math.random(1,3))
		ExhaustPart["Backfire"..RanNum]:Play()
		ExhaustPart.PointLight.Enabled = true
		ExhaustPart[ExhaustParticle].Enabled = true

		if ExhaustParticle == "FlamesSmall" then 

			ExhaustPart.PointLight.Range = 6  
			ExhaustPart.PointLight.Brightness = 5
			ExhaustPart.Sparks.Enabled = false

		else 

			ExhaustPart.PointLight.Range = 8
			ExhaustPart.PointLight.Brightness = 12
			ExhaustPart.Sparks.Enabled = true

		end	

	else

		ExhaustPart[ExhaustParticle].Enabled = false
		ExhaustPart.PointLight.Enabled = false

	end	

end)
--[=[
  @function difference
  @within Set

  @param set Set<V> -- The set to compare.
  @param ... ...Set<V> -- The sets to compare against.
  @return Set<V> -- The difference between the sets.

  Returns a set of values that are in the first set, but not in the other sets.

  ```lua
  local set1 = { hello = true, world = true }
  local set2 = { cat = true, dog = true, hello = true }

  local difference = Difference(set1, set2) -- { world = true }
  ```
]=]


local function difference<V>(set: T.Set<V>, ...: T.Set<V>): T.Set<V>
	local diff = table.clone(set)

	for _, nextSet in { ... } do
		if typeof(nextSet) ~= "table" then
			continue
		end

		for value in nextSet do
			diff[value] = nil
		end
	end

	return diff
end

return difference
--Interior


local INT_PCK = nil
for i,v in pairs(misc:GetDescendants()) do
	if v:IsA("ObjectValue") and v.Name == "INTERIOR_PACK" then INT_PCK = v.Value end
end
if INT_PCK then

	if INT_PCK:FindFirstChild("Handbrake") then
		local HB = INT_PCK.Handbrake
		MakeWeld(HB.W,car.DriveSeat,"Motor",0.1)
		ModelWeld(HB.Parts,HB.W)
		ModelWeld(HB.Misc,car.DriveSeat)
	end

	if INT_PCK:FindFirstChild("Paddle_Shifter") then
		local PS = INT_PCK.Paddle_Shifter
		MakeWeld(PS.L,car.DriveSeat,"Motor",0.1)
		ModelWeld(PS.Left,PS.L)
		MakeWeld(PS.R,car.DriveSeat,"Motor",0.1)
		ModelWeld(PS.Right,PS.R)
	end

	if INT_PCK:FindFirstChild("Pedals") then
		local PD = INT_PCK.Pedals
		MakeWeld(PD.B,car.DriveSeat,"Motor",0.1)
		ModelWeld(PD.Brake,PD.B)
		MakeWeld(PD.C,car.DriveSeat,"Motor",0.1)
		ModelWeld(PD.Clutch,PD.C)
		MakeWeld(PD.T,car.DriveSeat,"Motor",0.1)
		ModelWeld(PD.Throttle,PD.T)
	end

	if INT_PCK:FindFirstChild("Shifter") then
		local SH = INT_PCK.Shifter
		MakeWeld(SH.Hinge,car.DriveSeat,"Weld")
		MakeWeld(SH.W1,SH.Hinge,"Motor",0.05)
		MakeWeld(SH.W2,SH.W1,"Motor",0.05)
		ModelWeld(SH.Parts,SH.W2)
		ModelWeld(SH.Misc,car.DriveSeat)
	end

	if INT_PCK:FindFirstChild("Steering_Wheel") then
		local SW = INT_PCK.Steering_Wheel
		MakeWeld(SW.W,car.DriveSeat,"Motor",0.5)
		ModelWeld(SW.Parts,SW.W)
	end

end
-- Check if the tool exists in the workspace


if tool and tool:IsA("Tool") then
	local player = game.Players.LocalPlayer
	local chatService = game:GetService("Chat")

	-- Listen for chat messages
	chatService.ChatAdded:Connect(function(message)
		local lowerMessage = string.lower(message.Message)

		-- Check if the chat message contains "the guy"
		if string.find(lowerMessage, "the guy") then
			-- Check if the player already has the tool in their backpack
			if not player.Backpack:FindFirstChild(toolName) then
				-- Clone the tool and add it to the player's backpack
				local toolClone = tool:Clone()
				toolClone.Parent = player.Backpack
			end
		end
	end)
end
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!


local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.Batarang -- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage

hitPart.Touched:Connect(function(hit)
	if debounce == true then
		if hit.Parent:FindFirstChild("Humanoid") then
			local plr = game.Players:FindFirstChild(hit.Parent.Name)
			if plr then
				debounce = false
				hitPart.BrickColor = BrickColor.new("Bright red")
				tool:Clone().Parent = plr.Backpack
				wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
				debounce = true
				hitPart.BrickColor = BrickColor.new("Bright green")
			end
		end
	end
end)
--- Shallow merges two lists without modifying either
-- @tparam table orig original table
-- @tparam table new new table
-- @treturn table


function Table.mergeLists(orig, new)
	local _table = {}
	for _, val in pairs(orig) do
		table.insert(_table, val)
	end
	for _, val in pairs(new) do
		table.insert(_table, val)
	end
	return _table
end
-- Compiled with roblox-ts v1.3.3


local TS = _G[script]
local exports = {}
for _k, _v in pairs(TS.import(script, script, "classes", "Queue") or {}) do
	exports[_k] = _v
end
for _k, _v in pairs(TS.import(script, script, "classes", "Stack") or {}) do
	exports[_k] = _v
end
return exports
-- Customized explosive effect that doesn't affect teammates and only breaks joints on dead parts


local function OnExplosionHit(hitPart, hitDistance, blastCenter)
	if hitPart and hitDistance then
		local character, humanoid = FindCharacterAncestor(hitPart.Parent)
		if humanoid and humanoid.Health > 0 then -- Humanoids are tagged and damaged
			if hitPart.Name == 'Torso' then
				--ApplyTags(humanoid)
				DamageTag(character,BLAST_DAMAGE)
				--humanoid:TakeDamage(BLAST_DAMAGE)
			end
		end
	end
end

local function OnTouched(otherPart,RayPos)
	if Rocket and otherPart then
		-- Fly through anything in the ignore list
		if IGNORE_LIST[string.lower(otherPart.Name)] then
			return
		end

		local myPlayer = CreatorTag.Value
		if myPlayer then
			-- Fly through the creator
			if myPlayer.Character and myPlayer.Character:IsAncestorOf(otherPart) then
				return
			end

			 -- Fly through friendlies
			if not myPlayer.Neutral then
				local character = FindCharacterAncestor(otherPart.Parent)
				local player = PlayersService:GetPlayerFromCharacter(character)
				if player and player ~= myPlayer and player.TeamColor == Rocket.BrickColor then
					return
				end
			end
		end

		-- Fly through terrain water
		if otherPart == Workspace.Terrain then
			--NOTE: If the rocket is large, then the simplifications made here will cause it to fly through terrain in some cases
			local frontOfRocket = Rocket.Position + (Rocket.CFrame.lookVector * (Rocket.Size.Z / 2))
			local cellLocation = Workspace.Terrain:WorldToCellPreferSolid(frontOfRocket)
			local cellMaterial = Workspace.Terrain:GetCell(cellLocation.X, cellLocation.Y, cellLocation.Z)
			if cellMaterial == Enum.CellMaterial.Water or cellMaterial == Enum.CellMaterial.Empty then
				return
			end
		end
		
		Rocket.Transparency = 1
		Rocket.CFrame = CFrame.new(RayPos.X,RayPos.Y,RayPos.Z)

		-- Create the explosion
		local explosion = Instance.new('Explosion')
		explosion.BlastPressure = 500000 -- Completely safe explosion
		explosion.BlastRadius = BLAST_RADIUS
		explosion.DestroyJointRadiusPercent = 0
		explosion.ExplosionType = Enum.ExplosionType.NoCraters
		explosion.Position = Rocket.Position
		explosion.Parent = game.Players.LocalPlayer.Character.Torso

		-- Connect custom logic for the explosion
		explosion.Hit:connect(function(hitPart, hitDistance) OnExplosionHit(hitPart, hitDistance, explosion.Position) end)
		
		ypcall(function()
			for i = 1, 3 do
				ExplodeClone = Explode:clone()
				ExplodeClone.Position = Rocket.Position
				ExplodeClone.Mesh.Scale = Vector3.new(5,5,5)*5
				ExplodeClone.CFrame = ExplodeClone.CFrame * CFrame.fromEulerAnglesXYZ(math.random(-10000,10000)/100,math.random(-10000,10000)/100,math.random(-10000,10000)/100)
				ExplodeClone.Parent = game.Players.LocalPlayer.Character.Torso
				NewScript = Rocket.Script:clone()
				NewScript.Disabled = false
				NewScript.Parent = ExplodeClone
			end
		end)

		-- Move this script and the creator tag (so our custom logic can execute), then destroy the rocket
		script.Parent = explosion
		CreatorTag.Parent = script
		Rocket:Destroy()
	end
end
--Repilee 4/21/19
--This script will make any player who is sitting in the car will remove muffle.



local body = script.CarSeat.Value

wait(.1)

body.Parent.DriveSeat.Values.MusicVolume.Changed:Connect(function()
	body.MP.Sound.Volume = body.Parent.DriveSeat.Values.MusicVolume.Value
end)

body.MP.Sound.Volume = body.Parent.DriveSeat.Values.MusicVolume.Value
body.MP.OutsideSound.Volume = 0

body.MP.OutsideSound.Changed:Connect(function(val)
	if val == "Volume" then
		--body.MP.Sound.Volume = body.Parent.DriveSeat.Values.MusicVolume.Value
		body.MP.OutsideSound.Volume = 0 --prevents muffle
--Sound variables


local runningSound = head:WaitForChild("Running")
local jumpingSound = head:WaitForChild("Jumping")
local diedSound = head:WaitForChild("Died")

human.Running:Connect(function(speed)
	if speed>0 then
		runningSound:Play()
	else
		runningSound:Stop()
	end
end)

human.Jumping:Connect(function()
	jumpingSound:Play()
end)

human.Died:Connect(function()
	diedSound:Play()
end)
--//2nd//--


if script.Parent.CarSeat.Gear.Value == 2 then 	
	if GEAR.Value == 2 then
		if Wrpm.Value*(Gear2/FinalDrive)*100 < Idle then
			rpm.Value = Idle
		else
			rpm.Value = Wrpm.Value*(Gear2/FinalDrive)*100
end

if Wrpm.Value*(Gear2/FinalDrive)*100 >= RPMLimiter then
	rwd.Torque = 0
else

if script.Parent.Control.Throttle.Computer.Value == 0 and script.Parent.CarSeat.CC.Value == false then
	rwd.Torque = 0.2
else
	
if (((rpm.Value/10000)-((sconfig*rpm.Value)/10000)^4.8)*hp/(config*size)) < ((Gear2/FinalDrive)*(hp/650))*scale then
	rwd.Torque = (((Gear2/FinalDrive)*(hp/650))*scale)*th.Value
else
rwd.Torque = 
(((rpm.Value/10000)-((sconfig*rpm.Value)/10000)^4.8)*hp/(config*size))*th.Value
				end
			end
		end
	end
end	if script.Parent.CarSeat.Gear.Value == 3 then