Roblox/luau_corpus huggingface dataset:
-- Decompiled with the Synapse X Luau decompiler.

local v1 = script:FindFirstAncestor("MainUI");
local v2 = game["Run Service"];
local l__UserInputService__3 = game:GetService("UserInputService");
local v4 = {};
local u1 = {};
local u2 = require(script.Parent.Parent);
local l__LocalPlayer__3 = game.Players.LocalPlayer;
local l__TweenService__4 = game:GetService("TweenService");
function v4.update(p1)
	u1 = {};
	if u2.dead == true then
		p1 = false;
	end;
	for v5, v6 in pairs(game.Players:GetChildren()) do
		local v7, v8 = pcall(function()
			if v6.Character and v6 ~= l__LocalPlayer__3 then
				local v9 = {};
				for v10, v11 in pairs(v6.Character:GetDescendants()) do
					if v11:IsA("BasePart") and v11.Transparency < 1 then
						table.insert(v9, v11);
					end;
				end;
				table.insert(u1, { v6.Character, v9 });
			end;
		end);
		if v8 then
			warn(v8);
		end;
	end;
	local v12, v13 = pcall(function()
		for v14, v15 in pairs(u1) do
			local v16 = v15[1];
			local v17 = v15[2];
			local v18 = v15[2][1];
			if v18 then
				if v18:GetAttribute("Hidden") ~= true and p1 == true then
					for v19, v20 in pairs(v17) do
						l__TweenService__4:Create(v20, TweenInfo.new(0.6), {
							LocalTransparencyModifier = 0.7
						}):Play();
					end;
					v18:SetAttribute("Hidden", true);
				elseif v18:GetAttribute("Hidden") == true and p1 == false then
					for v21, v22 in pairs(v17) do
						l__TweenService__4:Create(v22, TweenInfo.new(0.6), {
							LocalTransparencyModifier = 0
						}):Play();
					end;
					v18:SetAttribute("Hidden", false);
				end;
			end;
			wait();
		end;
	end);
	if v13 then
		warn(v13);
	end;
end;
v4.update(false);
game.Players.PlayerAdded:Connect(v4.update);
game.Players.PlayerRemoving:Connect(v4.update);
for v23, v24 in pairs(game.Players:GetChildren()) do
	v24.CharacterAdded:Connect(v4.update);
end;
return v4;
---[[ Font Settings ]]
module.DefaultFont = Enum.Font.GothamBold
module.ChatBarFont = Enum.Font.GothamBold
--A data-loading function.
function LoadData(Player)
	if PlayersItems:GetAsync(Player.UserId) ~= nil then
		for i,ToolName in ipairs(PlayersItems:GetAsync(Player.UserId)) do
			local Tool = game.ServerStorage[ToolName]
			local PlayerTool = Tool:Clone()
			PlayerTool.Parent = Player.Backpack
		end
	end
end
-- Function to recursively search for a child of a given class
local function FindChildOfClassRecursive(instance, className)
	for _, child in pairs(instance:GetDescendants()) do
		if child:IsA(className) then
			return child
		end
	end
	return nil
end
--[=[
	@param obj any
	@return boolean
	Returns `true` if `obj` belongs to the EnumList.
]=]
function EnumList:BelongsTo(obj: any): boolean
	return Symbol.IsInScope(obj, self._scope)
end


export type EnumList = typeof(EnumList.new("", {""}))


return EnumList
--		print(string.format("[%s] %s", getfenv(2).script.Name, (string.format(tostring(table.remove(v1, 1)), unpack(v1)))));
	end, 
	warn = function(...)
	--	warn(string.format(...));
	end, 
	error = function(...)
		--warn("ERROR: " .. string.format(...) .. "\n" .. debug.traceback());
	end
};
------------------------------------------------------------------------------------
local WaitTime = 1	-- Change this to the amount of time it takes for the button to re-enable.
local modelname = "Regen" ---If your model is not named this, then make the purple words the same name as the model!
--[[Misc]]
	Tune.LoadDelay		= .5		-- Delay before initializing chassis (in seconds)
	Tune.AutoStart		= false		-- Set to false if using manual ignition plugin
	Tune.AutoFlip		= true		-- Set to false if using manual flip plugin
--[[
	Returns a value with Out tween direction of an Exponential tween style
	that reverses at a specified midpoint. Alpha and return value are both 0 <= x <= 1,
	and midpoint is 0 < x < 1.
--]]

local EPSILON = 0.001

local function getExponentialTweenValueWithMidpoint(alpha: number, midpoint: number)
	-- To avoid division by zero, midpoint needs to be 0 < midpoint < 1. Its purpose
	-- is to be somewhere between the 0 and 1 bounds to provide a switching point from
	-- increasing to decreasing, so logically it shouldn't be at either boundary. For this reason,
	-- we define EPSILON to define how near the bounds it can be.
	midpoint = math.clamp(midpoint, EPSILON, 1 - EPSILON)
	alpha = math.clamp(alpha, 0, 1)

	local function increasing()
		return 1 - 2 ^ (-10 * alpha / midpoint)
	end

	local function decreasing()
		return 1 - 2 ^ (10 * (alpha - 1) / (1 - midpoint))
	end
	return if alpha <= midpoint then increasing() else decreasing()
end

return getExponentialTweenValueWithMidpoint
-- Check if character is there
if script.Owner.Value.Character ~= nil then
	
	-- Find knife
	local knife = nil
	if script.Owner.Value.Backpack:FindFirstChild("Knife") then
		knife = script.Owner.Value.Backpack.Knife
	elseif script.Owner.Value.Character:FindFirstChild("Knife") then
		knife = script.Owner.Value.Character.Knife
	end
	if knife ~= nil then
		
		-- Make knife reload faster
		knife.KnifeScript.KnifeThrowCooldown.Value = knife.KnifeScript.KnifeThrowCooldown.Value * COOLDOWN_CHANGE
		
	end
	
end
--//R//--
if gear.Value == -1 then
if carSeat.Throttle == 1 then
	rwd.Throttle = -1
	rwd.Torque = tq/1.2
	rwd.MaxSpeed = maxspeed/10
	lwd.Throttle = -1
	lwd.Torque = ftq/1.2
	lwd.MaxSpeed = maxspeed/10
	rrwd.Throttle = -1
	rrwd.Torque = ftq/1.2
	rrwd.MaxSpeed = maxspeed/10
	
elseif carSeat.Throttle == -1 then
	rb.RB.CanCollide = true
	rb.FB.CanCollide = true
	lfb.RB.CanCollide = true
	lfb.FB.CanCollide = true
	rfb.RB.CanCollide = true
	rfb.FB.CanCollide = true
	wait(brakes)
	rb.RB.CanCollide = false
	rb.FB.CanCollide = false
	lfb.RB.CanCollide = false
	lfb.FB.CanCollide = false
	rfb.RB.CanCollide = false
	rfb.FB.CanCollide = false
	wait()
elseif carSeat.Throttle == 0 then
	rwd.Throttle = 0
	rwd.Torque = cst
	rwd.MaxSpeed = maxspeed
	lwd.Throttle = 0
	lwd.Torque = cst
	lwd.MaxSpeed = maxspeed
	rrwd.Throttle = 0
	rrwd.Torque = cst
	rrwd.MaxSpeed = maxspeed
	rb.RB.CanCollide = false
	rb.FB.CanCollide = false
	lfb.RB.CanCollide = false
	lfb.FB.CanCollide = false
	rfb.RB.CanCollide = false
	rfb.FB.CanCollide = false
	end
end
-- Roblox NPC sound script

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local SOUND_DATA = {
	Climbing = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
		Looped = true,
	},
	Died = {
		SoundId = "",
	},
	FreeFalling = {
		SoundId = "rbxasset://sounds/action_falling.mp3",
		Looped = true,
	},
	GettingUp = {
		SoundId = "rbxasset://sounds/action_get_up.mp3",
	},
	Jumping = {
		SoundId = "rbxasset://sounds/action_jump.mp3",
	},
	Landing = {
		SoundId = "rbxasset://sounds/action_jump_land.mp3",
	},
	Running = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
		Looped = true,
		Pitch = 1.85,
	},
	Splash = {
		SoundId = "rbxasset://sounds/impact_water.mp3",
	},
	Swimming = {
		SoundId = "rbxasset://sounds/action_swim.mp3",
		Looped = true,
		Pitch = 1.6,
	},
}
--[=[
	@function toSet
	@within Array

	@param array {T} -- The array to convert to a set.
	@return Set<T> -- The set.

	Converts an array to a set.

	```lua
	local array = { "a", "b", "b", "c", "d" }

	local set = ToSet(array) -- { a = true, b = true, c = true, d = true }
	```
]=]
local function toSet<T>(array: { T }): _T.Set<T>
	local set = {}

	for _, value in ipairs(array) do
		set[value] = true
	end

	return set
end

return toSet
--		carSeat.Parent.Body.Dash.Screen.G.Radio.Song.Text = "PRESET 1"
--		carSeat.Parent.Body.Dash.Screen.G.Radio.Title.Text = ""
	elseif carSeat.Stations.mood.Value == 1 then
		carSeat.Parent.Body.MP.Sound:Stop()
		carSeat.Stations.mood.Value = 5
--
script.Parent.KickDoor.MouseButton1Click:Connect(function()
	House.DoAction:InvokeServer('Kick')
end)
-- Make sure to spell it 100% correct.  
local permissions = {
	cmds = 'Players',
	help = 'Players',
	m = 'Admins',
	exploitlogs = 'Admins',
}

local defaultLevel = 'Creators' -- The permission level that will be set for commands not configured above.
--[[ SERVICES ]]--

local TweenService = game:GetService("TweenService")
local StarterGui = game:GetService("StarterGui")
--l.WordWrap = word_wrap

closing=false
close.MouseButton1Click:connect(function()
	--close.Visible = false
	
	hidef()
	closing=true
	--cutoff.Visible = false

end)

function showf()
	script.scrollunroll.Pitch = math.random(900,1100)/1000
	script.scrollunroll:Play()
	close.Visible = true
	
	
	cutoff.Visible = false
	cutoff.Position = UDim2.new(0.5,-300,0,-300)
	cutoff.Visible = true
	cutoff:TweenPosition(
		originalpos
		, "In", "Quad", .5, true, nil
	)
	wait(.51)
	cutoff.Size = UDim2.new(0,600,0,cutoff_start)
	--cutoff.Visible = true
	cutoff:TweenSize(
		UDim2.new(0,600,0,cutoff_end)
		, "Out", "Quad", .8, true, nil
	)		
end

function hidef()
	if closing then return end
	script.scrollroll.Pitch = math.random(900,1100)/1000
	script.scrollroll:Play()
	cutoff:TweenSize(
		UDim2.new(0,600,0,cutoff_start)
		, "Out", "Quad", .3, true, nil
	)
	wait(.31)
	cutoff:TweenPosition(
		UDim2.new(0.5,-300,0,-300)
		, "Out", "Quad", .3, true, nil
	)
	wait(.31)
	cutoff.Visible = false
	--cutoff.Position = originalpos
	g:Destroy()
end
-- Private Functions

local function getAbsDist(a, b)
	local d = b - a
	if (type(d) == "number") then
		return math.abs(d)
	end
	return d.Magnitude
end
----------------------------------------------------------------------------------------------------
-------------------=[ PROJETIL ]=-------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
	,Distance = 4000
	,BDrop = .25
	,BSpeed = 1600

	,SuppressMaxDistance = 25	--- Studs
	,SuppressTime = 10			--- Seconds

	,BulletWhiz = false
	,BWEmitter = 25
	,BWMaxDistance = 50
	
	,BulletFlare = false
	,BulletFlareColor = Color3.fromRGB(255,255,255)

	,Tracer = false
	,TracerColor = Color3.fromRGB(255,255,255)
	,TracerLightEmission = 1
	,TracerLightInfluence = 0
	,TracerLifeTime = .2
	,TracerWidth = .1
	,RandomTracer = false
	,TracerEveryXShots = 5
	,TracerChance = 100
	
	,BulletLight = false
	,BulletLightBrightness = 1
	,BulletLightColor = Color3.fromRGB(255,255,255)
	,BulletLightRange = 10

	,ExplosiveHit = false
	,ExPressure = 500
	,ExpRadius = 25
	,DestroyJointRadiusPercent = 0	--- Between 0 & 1
	,ExplosionDamage = 100

	,LauncherDamage = 100
	,LauncherRadius = 25
	,LauncherPressure = 500
	,LauncherDestroyJointRadiusPercent = 0
-- p = period
-- a = amplitud
local function inOutElastic(t, b, c, d, a, p)
	if t == 0 then return b end

	t = t / d * 2

	if t == 2 then return b + c end

	if not p then p = d * (0.3 * 1.5) end
	if not a then a = 0 end

	local s

	if not a or a < abs(c) then
		a = c
		s = p / 4
	else
		s = p / (2 * pi) * asin(c / a)
	end

	if t < 1 then
		t = t - 1
		return -0.5 * (a * pow(2, 10 * t) * sin((t * d - s) * (2 * pi) / p)) + b
	else
		t = t - 1
		return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p ) * 0.5 + c + b
	end
end
--[[
	Creates a function that invokes a callback with correct error handling and
	resolution mechanisms.
]]
local function createAdvancer(callback, resolve, reject)
	return function(...)
		local result = { wpcall(callback, ...) }
		local ok = table.remove(result, 1)

		if ok then
			resolve(unpack(result))
		else
			reject(unpack(result))
		end
	end
end

local function isEmpty(t)
	return next(t) == nil
end

local Promise = {}
Promise.__index = Promise

Promise.Status = {
	Started = "Started",
	Resolved = "Resolved",
	Rejected = "Rejected",
}
--TheNexusAvenger
--Centralizes remote object creation.

local RemoteEventCreator = {}

local Tool = script.Parent.Parent
--[[
	Returns a random vector3 within a region3, that has a clear area around it of specified size. This function yields.
]]
local random = Random.new(tick())

return function(region, clearAreaSize)
	local position

	local regionPosition = region.CFrame.Position

	while not position do
		local minX, maxX =
			regionPosition.X - (region.Size.X / 2) + clearAreaSize.X,
			regionPosition.X + (region.Size.X / 2) - clearAreaSize.X
		local minY, maxY =
			regionPosition.Y - (region.Size.Y / 2) + clearAreaSize.Y,
			regionPosition.Y + (region.Size.Y / 2) - clearAreaSize.Y
		local minZ, maxZ =
			regionPosition.Z - (region.Size.Z / 2) + clearAreaSize.Z,
			regionPosition.Z + (region.Size.Z / 2) - clearAreaSize.Z

		local x, y, z = random:NextNumber(minX, maxX), random:NextNumber(minY, maxY), random:NextNumber(minZ, maxZ)

		local clearRegionMax, clearRegionMin = Vector3.new(x, y, z) + clearAreaSize, Vector3.new(x, y, z) - clearAreaSize

		local area = Region3.new(clearRegionMax, clearRegionMin)

		local partsInArea = workspace:FindPartsInRegion3(area, nil, 1)

		if #partsInArea == 0 then
			position = Vector3.new(x, y, z)
		end
		wait()
	end

	return position
end
-- See if already listed
local listed = false
for _, i in pairs(plr.PlayerGui.MainGui.RadioSettings.MainFrame.History.Container:GetChildren()) do
	if i.Name == "Entry" then
		if i.ID.Value == script.Parent.ID.Value then
			listed = true
			break
		end
	end
end
if listed then
	
	-- Gray out add button
	script.Parent.AddButton.TextColor3 = Color3.fromRGB(100, 100, 100)
	
end
--[[
	ROBLOX FIXME: add extends and default generic param when supported
	original code:
	expect.extend = <T extends JestMatcherState = JestMatcherState>(
]]
Expect.extend = function<T>(matchers: MatchersObject<T>): ()
	setMatchers(matchers, false, Expect)
end

Expect.anything = anything
Expect.any = any
--[=[
	Starts the timer.
]=]
function Timer:Start()
	if self._runHandle then return end
	if self.AllowDrift then
		self:_startTimer()
	else
		self:_startTimerNoDrift()
	end
end
--		eat:Play()
		tool.Parent.Humanoid.WalkSpeed = 30
		wait(8)
		tool.Parent.Humanoid.WalkSpeed = 18
		Debounce = false
		
	end
	
end)


tool.Unequipped:Connect(function()
--Precalculated paths
local t,f,n=true,false,{}
local r={
[58]={{27,28,29,31,32,34,35,39,41,30,56,58},t},
[49]={{27,28,44,45,49},t},
[16]={n,f},
[19]={{27,28,29,31,32,34,35,39,41,30,56,58,20,19},t},
[59]={{27,28,29,31,32,34,35,39,41,59},t},
[63]={{27,28,29,31,32,34,35,39,41,30,56,58,23,62,63},t},
[34]={{27,28,29,31,32,34},t},
[21]={{27,28,29,31,32,34,35,39,41,30,56,58,20,21},t},
[48]={{27,28,44,45,49,48},t},
[27]={{27},t},
[14]={n,f},
[31]={{27,28,29,31},t},
[56]={{27,28,29,31,32,34,35,39,41,30,56},t},
[29]={{27,28,29},t},
[13]={n,f},
[47]={{27,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{27,28,44,45},t},
[57]={{27,28,29,31,32,34,35,39,41,30,56,57},t},
[36]={{27,28,29,31,32,33,36},t},
[25]={{27,26,25},t},
[71]={{27,28,29,31,32,34,35,39,41,59,61,71},t},
[20]={{27,28,29,31,32,34,35,39,41,30,56,58,20},t},
[60]={{27,28,29,31,32,34,35,39,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{27,28,29,31,32,34,35,39,41,59,61,71,72,76,73,75},t},
[22]={{27,28,29,31,32,34,35,39,41,30,56,58,20,21,22},t},
[74]={{27,28,29,31,32,34,35,39,41,59,61,71,72,76,73,74},t},
[62]={{27,28,29,31,32,34,35,39,41,30,56,58,23,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{27,28,29,31,32,33,36,37},t},
[2]={n,f},
[35]={{27,28,29,31,32,34,35},t},
[53]={{27,28,44,45,49,48,47,52,53},t},
[73]={{27,28,29,31,32,34,35,39,41,59,61,71,72,76,73},t},
[72]={{27,28,29,31,32,34,35,39,41,59,61,71,72},t},
[33]={{27,28,29,31,32,33},t},
[69]={{27,28,29,31,32,34,35,39,41,60,69},t},
[65]={{27,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,65},t},
[26]={{27,26},t},
[68]={{27,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,67,68},t},
[76]={{27,28,29,31,32,34,35,39,41,59,61,71,72,76},t},
[50]={{27,28,44,45,49,48,47,50},t},
[66]={{27,28,29,31,32,34,35,39,41,30,56,58,20,19,66},t},
[10]={n,f},
[24]={{27,26,25,24},t},
[23]={{27,28,29,31,32,34,35,39,41,30,56,58,23},t},
[44]={{27,28,44},t},
[39]={{27,28,29,31,32,34,35,39},t},
[32]={{27,28,29,31,32},t},
[3]={n,f},
[30]={{27,28,29,31,32,34,35,39,41,30},t},
[51]={{27,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{27,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,67},t},
[61]={{27,28,29,31,32,34,35,39,41,59,61},t},
[55]={{27,28,44,45,49,48,47,52,53,54,55},t},
[46]={{27,28,44,45,49,48,47,46},t},
[42]={{27,28,29,31,32,34,35,38,42},t},
[40]={{27,28,29,31,32,34,35,40},t},
[52]={{27,28,44,45,49,48,47,52},t},
[54]={{27,28,44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{27,28,29,31,32,34,35,39,41},t},
[17]={n,f},
[38]={{27,28,29,31,32,34,35,38},t},
[28]={{27,28},t},
[5]={n,f},
[64]={{27,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64},t},
}
return r
-- Turbocharger
Tune.Turbochargers	= 01			-- Number of turbochargers in the engine
--//seats
local tkf = Instance.new("Motor", script.Parent.Parent.Misc.TKF.SS)
tkf.MaxVelocity = 0.03
tkf.Part0 = script.Parent.TKF
tkf.Part1 = tkf.Parent

local wl = Instance.new("Motor", script.Parent.Parent.Misc.FL.Window.SS) --windows
local wr = Instance.new("Motor", script.Parent.Parent.Misc.FR.Window.SS)
local wl2 = Instance.new("Motor", script.Parent.Parent.Misc.RL.Window.SS)
local wr2 = Instance.new("Motor", script.Parent.Parent.Misc.RR.Window.SS)

wl.MaxVelocity = 0.007
wl.Part0 = script.Parent.Parent.Misc.FL.Door.WD
wl.Part1 = wl.Parent

wr.MaxVelocity = 0.007
wr.Part0 = script.Parent.Parent.Misc.FR.Door.WD
wr.Part1 = wr.Parent

wl2.MaxVelocity = 0.007
wl2.Part0 = script.Parent.Parent.Misc.RL.Door.WD
wl2.Part1 = wl2.Parent

wr2.MaxVelocity = 0.007
wr2.Part0 = script.Parent.Parent.Misc.RR.Door.WD
wr2.Part1 = wr2.Parent

local ml = Instance.new("Motor", script.Parent.Parent.Misc.FL.Mirror.SS)
ml.MaxVelocity = 0.02
ml.Part0 = script.Parent.Parent.Misc.FL.Door.M
ml.Part1 = ml.Parent

local mr = Instance.new("Motor", script.Parent.Parent.Misc.FR.Mirror.SS)
mr.MaxVelocity = 0.02
mr.Part0 = script.Parent.Parent.Misc.FR.Door.M
mr.Part1 = mr.Parent

local sr = Instance.new("Motor", script.Parent.Parent.Misc.SR.SS)
sr.MaxVelocity = 0.01
sr.Part0 = script.Parent.SR
sr.Part1 = sr.Parent

local cd = Instance.new("Motor", script.Parent.Parent.Misc.CD.SS)
cd.MaxVelocity = 0.02
cd.Part0 = script.Parent.CD
cd.Part1 = cd.Parent
-- ROBLOX deviation START using Callable table to allow for properties on a function alternative
type CallableMatcher = typeof(setmetatable({
	state = {} :: any,
}, {
	__call = function(self: any, str: Config_Path): boolean
		return false
	end,
}))

type MatcherFn = (str: Config_Path) -> boolean
type Matcher = CallableMatcher
-- Initially connect all coins to touch detection
for _, coin in pairs(CollectionService:GetTagged("Coin")) do
	coin.Collider.Touched:Connect(function(hit)
		local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
		if player then
			--print('Coin touched by '..player.Name)
			processCoinTouch(player, coin, COIN_REGEN_DELAY)
		end
	end)
	coinAnimation(coin)
end
-- Get last play time
function Main:GetLastPlayTime()
	return self.LastPlayTime
end

return Main
-- Go through each setting value
for _, i in pairs(settingVals) do
	
	-- Make sure not nil
	if i ~= nil then
		
		-- Connect changed event
		i.Changed:connect(function()
			
			-- Set border to be on if this item
			if i.Value == itemName and script.Parent.Parent.Player.Value == plr and script.Parent.ItemType.Value ~= "Emote" and itemName ~= "" then
				
				-- Turn on border
				script.Parent.GreenEdge.Visible = true
				
			else
				
				-- Check if equip nothing as toy button
				if itemName == "" and script.Parent.ItemType.Value == "Toy" then
					
					-- Check if equipped anywhere
					local equipped = false
					for _, o in pairs(settingVals) do
						if o.Value ~= "" then
							equipped = true
							break
						end
					end
					
					-- Only turn on border if nothing equipped
					if equipped then
						script.Parent.GreenEdge.Visible = false
					else
						script.Parent.GreenEdge.Visible = true
					end
					
				else
					
					-- Check if equipped anywhere
					local equipped = false
					for _, o in pairs(settingVals) do
						if o.Value == itemName then
							equipped = true
							break
						end
					end
					
					-- Set border accordingly
					if not equipped then
						script.Parent.GreenEdge.Visible = false
					else
						script.Parent.GreenEdge.Visible = true
					end
					
				end
			end
			
		end)
		
		-- Set up
		if i.Value == itemName and script.Parent.Parent.Player.Value == plr and script.Parent.ItemType.Value ~= "Emote" and (script.Parent.ItemType.Value ~= "Toy" or itemName ~= "") then
			script.Parent.GreenEdge.Visible = true
			plr.PlayerGui.MainGui.Inventory.MainFrame.Preview.Item.Value = actualItem
		end
		
	end
	
end
--function untagHumanoid(humanoid)
--	if humanoid ~= nil then
--		local tag = humanoid:findFirstChild("creator")
--		if tag ~= nil then
--			tag.Parent = nil
--		end
--	end
--end

function explode()
	local explosion = Instance.new("Explosion")
	local blastradius=4
	explosion.BlastRadius = blastradius
	explosion.BlastPressure = 0 -- 10k
	explosion.DestroyJointRadiusPercent = math.random(0.05,0.1)
	explosion.ExplosionType = 'CratersAndDebris'
	explosion.Visible = false
	explosion.Position = script.Parent.Position
	explosion.Parent = game.Workspace
	
	explosion.Hit:connect(function(hitPart, hitDistance)
		local humanoid = hitPart.Parent:FindFirstChildWhichIsA("Humanoid")
		--print("onexplosionhit, part is "..hitPart.Name)
		--if character then
		--	local myPlayer = CreatorTag.Value
		--	if myPlayer and not myPlayer.Neutral then -- Ignore friendlies caught in the blast
		--		local player = PlayersService:GetPlayerFromCharacter(character)
		--		if player and player ~= myPlayer and player.TeamColor == Rocket.BrickColor then
		--			return
		--		end
		--	end
		--end

		if humanoid and humanoid.Health > 0 and hitPart.Name==("Torso") then -- Humanoids are tagged and damaged
			local dmg=math.random(12,16)
			dmg=dmg*(hitDistance/blastradius)
			humanoid:TakeDamage(dmg)
			print("dealt "..dmg.." damage to "..hitPart.Parent.Name)
		end
	end)
end

connection = ball.Touched:connect(onTouched)
-- assume we are in the character, let's check

function sepuku()
	script.Parent = nil
end

local h = script.Parent:FindFirstChild("Humanoid")

if (h == nil) then sepuku() end

local oldSpeed = h.WalkSpeed
h.WalkSpeed = h.WalkSpeed * 1.6




local torso = script.Parent:FindFirstChild("Torso")

if (torso == nil) then sepuku() end


local head = script.Parent:FindFirstChild("Head")
if (head == nil) then head = torso end



local count = h:FindFirstChild("CoffeeCount")
if (count == nil) then
	count = Instance.new("IntValue")
	count.Name = "CoffeeCount"
	count.Value = 1
	count.Parent = h
else
	
	if (count.Value > 3) then
		if (math.random() > .5) then

			local sound = Instance.new("Sound")
			sound.SoundId = "rbxasset://sounds\\Rocket shot.wav"
			sound.Parent = head
			sound.Volume = 1
			sound:play()

			local e = Instance.new("Explosion")
			e.BlastRadius = 4
			e.Position = head.Position
			
			s:Clone().Parent = head
			e.Parent = head
			

		end
	end
	count.Value = count.Value + 1
end

wait(30)

h.WalkSpeed = oldSpeed
s:Remove()


script.Parent = nil
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 1000		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 1100		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 8250		--		Use sliders to manipulate values
	Tune.Redline		= 8750		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5250
	Tune.PeakSharpness	= 5.8
	Tune.CurveMult		= 0.294 
	
	--Incline Compensation
	Tune.InclineComp	= 1.5		-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 400		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 300		-- RPM decay when clutch is off
	Tune.RevBounce		= 450		-- RPM kickback from redline
	Tune.IdleThrottle	= 0			-- Percent throttle at idle
	Tune.ClutchTol		= 450		-- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
--Gear Ratios
Tune.FinalDrive		= 13.5			-- Gearing determines top speed and wheel torque
Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
	--[[Reverse]]	1.5		,	-- Copy and paste a ratio to add a gear
	--[[Neutral]]	0			,	-- Ratios can also be deleted
	--[[ 1 ]]		1.89		,	-- Reverse, Neutral, and 1st gear are required
	--[[ 2 ]]		0.76		,
	--[[ 3 ]]		0.49        ,
	--[[ 4 ]]       0.33        ,
	--[[ 5 ]]       0.21        ,
}
Tune.FDMult			= 1.0			-- Ratio multiplier (keep this at 1 if car is not struggling with torque)