Pinkstack/roblox-luau-corpus-text huggingface dataset:
--CHANGE THE NAME, COPY ALL BELOW, AND PAST INTO COMMAND BAR



local TycoonName = "INSERT TYCOON NAME HERE"

if game.Workspace:FindFirstChild(TycoonName) then
	local s = nil
	local bTycoon = game.Workspace:FindFirstChild(TycoonName)
	local zTycoon = game.Workspace:FindFirstChild("Zednov's Tycoon Kit")
	local new_Collector = zTycoon['READ ME'].Script:Clone()
	local Gate = zTycoon.Tycoons:GetChildren()[1].Entrance['Touch to claim!'].GateControl:Clone()
	if zTycoon then
		for i,v in pairs(zTycoon.Tycoons:GetChildren()) do --Wipe current tycoon 'demo'
			if v then
				s = v.PurchaseHandler:Clone()
				v:Destroy()
			end
		end
		-- Now make it compatiable
		if s ~= nil then
			for i,v in pairs(bTycoon.Tycoons:GetChildren()) do
				local New_Tycoon = v:Clone()
				New_Tycoon:FindFirstChild('PurchaseHandler'):Destroy()
				s:Clone().Parent = New_Tycoon
				local Team_C = Instance.new('BrickColorValue',New_Tycoon)
				Team_C.Value = BrickColor.new(tostring(v.Name))
				Team_C.Name = "TeamColor"
				New_Tycoon.Name = v.TeamName.Value
				New_Tycoon.Cash.Name = "CurrencyToCollect"
				New_Tycoon.Parent = zTycoon.Tycoons
				New_Tycoon.TeamName:Destroy()
				v:Destroy()
				New_Tycoon.Essentials:FindFirstChild('Cash to collect: $0').NameUpdater:Destroy()
				local n = new_Collector:Clone()
				n.Parent = New_Tycoon.Essentials:FindFirstChild('Cash to collect: $0')
				n.Disabled = false
				New_Tycoon.Gate['Touch to claim ownership!'].GateControl:Destroy()
				local g = Gate:Clone()
				g.Parent = New_Tycoon.Gate['Touch to claim ownership!']
			end
		else
			error("Please don't tamper with script names or this won't work!")
		end
	else
		error("Please don't change the name of our tycoon kit or it won't work!")
	end
	bTycoon:Destroy()
	Gate:Destroy()
	new_Collector:Destroy()
	print('Transfer complete! :)')
else
	error("Check if you spelt the kit's name wrong!")
end
--// Use the power of the Dark Flames and hit as many people as you can to perform a chain attack!



local Properties = {
	DamageMode = "Normal", --What mode to reference the damage tables listed below
	
	Special = true,--The internal logical indicator to determine if we can use our special.
	
	Special_Reload = 10, --The Cooldown time until the ability is ready to be used.
	
	SpeedCap = 50, --This is the wielder's walkspeed when equipped

	DamageValues = {
		Normal = {
			Min = 2,
			Max = 5,
		},
		
		Lunge = {
			Min = 7,
			Max = 10
		}
	}

}

local FindFirstChild, FindFirstChildOfClass, WaitForChild = script.FindFirstChild, script.FindFirstChildOfClass, script.WaitForChild

local Clone, Destroy = script.Clone, script.Destroy

local GetChildren = script.GetChildren

local IsA = script.IsA

local Tool = script.Parent
Tool.Enabled = true

local DefaultGrip = FindFirstChild(Tool, "DefaultGrip") 
if not DefaultGrip then
	-- Create a new grip reference
	DefaultGrip = Instance.new("CFrameValue")
	DefaultGrip.Name = "DefaultGrip"
	DefaultGrip.Value = Tool.Grip
	DefaultGrip.Parent = Tool
end

Tool.Grip = DefaultGrip.Value --Reset the Tool's grip values to the DefaultGrip Value

local Handle = WaitForChild(Tool, "Handle")

pcall(function()
	Handle["Sparkle_Large_Blue"].Enabled = true --We're gonna use this as our visual indicator for our special.
end)

local Sounds = {
	Equip = WaitForChild(Handle, "Equip"),
	Slash = WaitForChild(Handle, "Slash"),
	Lunge = WaitForChild(Handle, "Lunge") 
}

local Players = (game:FindService("Players") or game:GetService("Players"))
local Debris = (game:FindService("Debris") or game:GetService("Debris"))
local RunService = (game:FindService("RunService") or game:GetService("RunService"))
local ServerScriptService = (game:FindService("ServerScriptService") or game:GetService("ServerScriptService"))

local NewRay = Ray.new
--[[ LawlR fix ]]

--

local ds = game:GetService("Debris")
local ps = game:GetService("Players")

wait(1)

local tool = script.Parent
local handle = tool:WaitForChild("Handle")
local slashSound = handle.Slash
local lungeSound = handle.Lunge
local unsheathSound = handle.Unsheath

local baseDmg = 5
local slashDmg = 10
local lungeDmg = 20
local dmg = slashDmg
local gripUp = CFrame.new(0, 0, -2.35, 0, 0, 1, 1, 0, 0, 0, 1, 0)
local gripOut = CFrame.new(0, 0, -2.35, 0, 1, 0, 1, -0, 0, 0, 0, -1)
local lastAttack = 0

local plr, chr, hum
local db
local lastAttackTag

local attackAnimString = Instance.new("StringValue")
attackAnimString.Name = "toolanim"


local function tagHum(hum)
	local tag = Instance.new("ObjectValue")
	tag.Name = "creator"
	tag.Value = plr
	tag.Parent = hum
	ds:AddItem(tag, 2)
end

local function isTeamMate(hitPlr)
	return (hitPlr and plr and not hitPlr.Neutral and not plr.Neutral and hitPlr.TeamColor == plr.TeamColor)
end

local function onHit(hit)
	local hitHum = hit.Parent:FindFirstChildWhichIsA("Humanoid") or hit.Parent.Parent:FindFirstChildWhichIsA("Humanoid")
	if hitHum and hitHum.Health > 0 then
		if hitHum ~= hum then
			local hitChr = hitHum.Parent
			local hitPlr = ps:GetPlayerFromCharacter(hitChr)
			if hitPlr and isTeamMate(hitPlr) then
				return
			end
			tagHum(hitHum)
			hitHum:TakeDamage(dmg)
		end
	end
end

local function attack(tag)
	dmg = slashDmg
	slashSound:play()
	
	local anim = attackAnimString:Clone()
	anim.Value = "Slash"
	anim.Parent = tool
	
	coroutine.wrap(function()
		wait(.5)
		if lastAttackTag == tag then
			dmg = baseDmg
		end
	end)()
end

local function lunge()
	dmg = lungeDmg
	lungeSound:play()

	local anim = attackAnimString:Clone()
	anim.Value = "Lunge"
	anim.Parent = tool
	
	wait(.2)
	tool.Grip = gripOut
	wait(.6)
	tool.Grip = gripUp
	dmg = baseDmg
end


tool.Activated:Connect(function()
	if not db then
		db = true
		tool.Enabled = false
		local t = tick()
		lastAttackTag = t
	
		if (t - lastAttack < .2) then
			lunge()
		else
			attack(t)
		end
	
		lastAttack = t
		db = false
		tool.Enabled = true
	end
end)

tool.Equipped:Connect(function()
	unsheathSound:Play()
	lastAttack = tick()
	local tempChr = tool.Parent
	local tempHum = tempChr:FindFirstChildWhichIsA("Humanoid")
	if tempHum then
		chr = tempChr
		hum = tempHum
		plr = ps:GetPlayerFromCharacter(tempChr)
	end
end)


handle.Touched:Connect(function(hit)
	local toolParent = tool.Parent
	if toolParent and toolParent:IsA("Model") and toolParent ~= workspace then
		onHit(hit)
	end
end)
--[[Weight and CG]]


	Tune.Weight			= 2400		-- 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		= 1			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
--[[
	An internal method used by the reconciler to construct a new component
	instance and attach it to the given virtualNode.
]]


function Component:__mount(reconciler, virtualNode)
	if config.internalTypeChecks then
		internalAssert(Type.of(self) == Type.StatefulComponentClass, "Invalid use of `__mount`")
		internalAssert(Type.of(virtualNode) == Type.VirtualNode, "Expected arg #2 to be of type VirtualNode")
	end

	local currentElement = virtualNode.currentElement
	local hostParent = virtualNode.hostParent

	-- Contains all the information that we want to keep from consumers of
	-- Roact, or even other parts of the codebase like the reconciler.
	local internalData = {
		reconciler = reconciler,
		virtualNode = virtualNode,
		componentClass = self,
		lifecyclePhase = ComponentLifecyclePhase.Init,
	}

	local instance = {
		[Type] = Type.StatefulComponentInstance,
		[InternalData] = internalData,
	}

	setmetatable(instance, self)

	virtualNode.instance = instance

	local props = currentElement.props

	if self.defaultProps ~= nil then
		props = assign({}, self.defaultProps, props)
	end

	instance:__validateProps(props)

	instance.props = props

	local newContext = assign({}, virtualNode.context)
	instance._context = newContext

	instance.state = assign({}, instance:__getDerivedState(instance.props, {}))

	if instance.init ~= nil then
		instance:init(instance.props)
	end

	-- It's possible for init() to redefine _context!
	virtualNode.context = instance._context

	internalData.lifecyclePhase = ComponentLifecyclePhase.Render
	local renderResult = instance:render()

	internalData.lifecyclePhase = ComponentLifecyclePhase.ReconcileChildren
	reconciler.updateVirtualNodeWithRenderResult(virtualNode, hostParent, renderResult)

	if instance.didMount ~= nil then
		internalData.lifecyclePhase = ComponentLifecyclePhase.DidMount
		instance:didMount()
	end

	if internalData.pendingState ~= nil then
		-- __update will handle pendingState, so we don't pass any new element or state
		instance:__update(nil, nil)
	end

	internalData.lifecyclePhase = ComponentLifecyclePhase.Idle
end
-- functions



local function Lerp(a, b, d) return a + (b - a) * d end

local function UpdateReticle()
	for _, reticle in pairs(MOUSE_GUI:GetChildren()) do
		reticle.Visible	= reticle.Name == MOUSE.Reticle
	end
end

local function UpdateScope()
	SCOPE_GUI.Visible	= scope and aiming
	MOUSE_GUI.Visible	= not SCOPE_GUI.Visible
end

local function Hitmarker(position, damage, armor, headshot)
	local position	= CAMERA:WorldToViewportPoint(position)
	
	local hitmarker	= script.Hitmarker:Clone()
		hitmarker.Position	= UDim2.new(0, position.X, 0, position.Y)
		hitmarker.Size		= UDim2.new(0.05, 0, 0.05, 0)
		hitmarker.Parent	= GUI
		
	if headshot then
		for _, frame in pairs(hitmarker:GetChildren()) do
			if frame.Name ~= "Shadow" then
				frame.BackgroundColor3	= Color3.new(1, 0.2, 0.2)
			end
		end
	end
		
	local infoB		= TweenInfo.new(0.05, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
	local tweenB	= TweenService:Create(hitmarker, infoB, {Size = UDim2.new(0.015, 0, 0.015, 0)})
	
	tweenB:Play()
	Debris:AddItem(hitmarker, 0.1)
	
	local damageLabel	= script.DamageLabel:Clone()
		damageLabel.Position	= UDim2.new(0, position.X, 0, position.Y)
		damageLabel.Size		= UDim2.new(0, 1, 0, 1)
		damageLabel.Text		= tostring(damage)
		damageLabel.TextColor3	= armor and Color3.fromRGB(248, 130, 33) or Color3.fromRGB(230, 230, 230)
		damageLabel.Parent		= GUI
		
	local offset	= math.random(-36, 36)
		
	local infoC		= TweenInfo.new(0.2, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out)
	local tweenC	= TweenService:Create(damageLabel, infoC, {Size = UDim2.new(0, 36, 0, 36); Rotation = offset / 3; Position = UDim2.new(0, position.X + offset, 0, position.Y - 48)})
	local infoD		= TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
	local tweenD	= TweenService:Create(damageLabel, infoD, {TextTransparency = 1; TextStrokeTransparency = 1})
	
	tweenC:Play()
	tweenD:Play()
	Debris:AddItem(damageLabel, 1)
	
	script.HitmarkerSound:Play()
	
	if armor then
		script.ArmorSound:Play()
	end
	if headshot then
		script.HeadshotSound:Play()
	end
end
-- Put in StarterPlayer>StarterCharacterScripts
-- Edit only if you know what are you doing




local mouse = game.Players.LocalPlayer:GetMouse()

function Light()
   local player = game.Players.LocalPlayer
   local playerChar = player.Character
   local playerLight = playerChar.Head:FindFirstChild("Light")

    if playerLight then
        playerLight:Destroy()
    else
      local  light = Instance.new("SurfaceLight",playerChar:FindFirstChild("Head"))
        light.Name = "Light" -- Edit your light
        light.Range = 30
		light.Angle = 50
		light.Shadows = true
		light.Brightness = 1
    end
end

mouse.KeyDown:connect(function(key)
	
key = key:lower()
if key == "e" then -- Change with your key
	script.Sound:Play()
    Light()

end
end)
-- Touched


StealthLava.Touched:connect(function(Part)
	if (Hold == true) then return end
	Hold = true

	-- Check For Player
	Avatar = Part.Parent
	if (game.Players:FindFirstChild(Avatar.Name) == nil) then Default() return end
	if (game.Players:FindFirstChild(Avatar.Name).Character ~= Avatar) then Default() return end

	MorphPlayer(Avatar)

	Default()
end)
--[[
	Re-written by Phoenix
	(Actually works and doesn't lag the server to death K)
	Thanks
]]



local PartWeld = function(From, To)
	local WeldIns = Instance.new("WeldConstraint")
	WeldIns.Part0 = From
	WeldIns.Part1 = To
	WeldIns.Parent = From
	WeldIns.Name = "Weld"
	From.Anchored = false
end

local Weld = function(WeldTree, OverrideCenter)
	local Center = nil
	
	if OverrideCenter == nil then
		if WeldTree:FindFirstChildOfClass("MeshPart") then
			Center = WeldTree:FindFirstChildOfClass("MeshPart")
		elseif WeldTree:FindFirstChildOfClass("Part") then
			Center = WeldTree:FindFirstChildOfClass("Part")
		elseif WeldTree:FindFirstChildOfClass("UnionOperation") then
			Center = WeldTree:FindFirstChildOfClass("UnionOperation")
		end
	else
		Center = OverrideCenter
	end

	if Center ~= nil then
		for Index, ToWeld in pairs(WeldTree:GetDescendants()) do
			if ToWeld:IsA("BasePart") then
				PartWeld(ToWeld, Center)
			end
		end

		if WeldTree:IsA("BasePart") then
			PartWeld(WeldTree, Center)
		end
	end
end

local TweenService = game:GetService("TweenService")

local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle")
local Died, Character = nil

local ToolEquipped = false
local Heal = 3
local Sounds = {
	CoilSound = Handle:WaitForChild("CoilSound"),
}

local Loop = function()
	while true do
		wait(1)
		
		if ToolEquipped == true then
			Character.Humanoid.Health = Character.Humanoid.Health + Heal
		end
	end	
end

local Equipped = function()
	ToolEquipped = true
	Character = Tool.Parent
	
	if Character == nil then
		return
	elseif Character.Humanoid == nil then
		return
	end
	
	Sounds.CoilSound:Play()
end

local Unequipped = function()
	ToolEquipped = false
end

Weld(Tool.Model, Tool.Handle)

Tool.Equipped:Connect(Equipped)
Tool.Unequipped:Connect(Unequipped)

Loop()
--Edited by Stickmasterluke



Tool=script.Parent

enabled = true
function onButton1Down(mouse)
	if not enabled then
		return
	end

	enabled = false
	mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"

	wait(.5)
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	enabled = true

end

function onEquippedLocal(mouse)
	if mouse == nil then
		print("Mouse not found")
		return 
	end
	
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end


Tool.Equipped:connect(onEquippedLocal)
--Made by Luckymaxer



Model = script.Parent
Humanoid = Model:FindFirstChild("Humanoid")

Players = game:GetService("Players")
Debris = game:GetService("Debris")

Creator = Model:FindFirstChild("Creator")
Tool = Model:FindFirstChild("Tool")

function DestroyModel()
	Debris:AddItem(Model, 2)
end

if not Creator or not Creator.Value or not Creator.Value:IsA("Player") or not Creator.Value.Parent or not Tool or not Tool.Value or not Tool.Value.Parent then
	DestroyModel()
	return
end

Creator = Creator.Value
Tool = Tool.Value

Character = Creator.Character
if not Character then
	DestroyModel()
	return
end

Creator.Changed:connect(function(Property)
	if Property == "Parent" and not Creator.Parent then
		DestroyModel()
	end
end)

Character.Changed:connect(function(Property)
	if Property == "Parent" and not Character.Parent then
		DestroyModel()
	end
end)

Tool.Changed:connect(function(Property)
	if Property == "Parent" then
		local Player = ((Tool.Parent and ((Tool.Parent:IsA("Backpack") and Tool.Parent.Parent) or Players:GetPlayerFromCharacter(Tool.Parent))) or nil)
		if (not Player or (Player and Player ~= Creator)) then
			DestroyModel()
		end
	end
end)

if Humanoid then
	Humanoid.Died:connect(function()
		DestroyModel()
	end)
end
-- Driver Input Loop --


coroutine.wrap(function()
	while script.Parent ~= nil do
		--Update throttle, steer, handbrake
		local seatedHumanoid = DriverSeat.Occupant
		if seatedHumanoid and not Util.isPlayerBot(Players:GetPlayerFromCharacter(seatedHumanoid.Parent)) then
			getInputValues()
		
			local currentVel = Chassis.GetAverageVelocity()
		
			local steer = script.Steering.Value
			Chassis.UpdateSteering(steer, currentVel)
		
			-- Taking care of throttling
			local throttle = script.Throttle.Value
			script.AngularMotorVelocity.Value = currentVel
			script.ForwardVelocity.Value = DriverSeat.CFrame.LookVector:Dot(DriverSeat.Velocity)
			Chassis.UpdateThrottle(currentVel, throttle)
		
			-- Taking care of handbrake
			if script.HandBrake.Value > 0 then
				Chassis.EnableHandbrake()
			end
		end
		wait()
	end
end)()
-- Trim empty datastores and scopes from an entire datastore type:


local function prepareDataStoresForExport(origin)
	local dataPrepared = {}

	for name, scopes in pairs(origin) do
		local exportScopes = {}
		for scope, data in pairs(scopes) do
			local exportData = {}
			for key, value in pairs(data) do
				exportData[key] = value
			end
			if next(exportData) ~= nil then -- Only export datastore when non-empty
				exportScopes[scope] = exportData
			end
		end
		if next(exportScopes) ~= nil then -- Only export scope list when non-empty
			dataPrepared[name] = exportScopes
		end
	end

	if next(dataPrepared) ~= nil then -- Only return datastore type when non-empty
		return dataPrepared
	end
end

local function preprocessKey(key)
	if type(key) == "number" then
		if key ~= key then
			return "NAN"
		elseif key >= math.huge then
			return "INF"
		elseif key <= -math.huge then
			return "-INF"
		end
		return tostring(key)
	end
	return key
end

local function simulateYield()
	if Constants.YIELD_TIME_MAX > 0 then
		task.wait(rand:NextNumber(Constants.YIELD_TIME_MIN, Constants.YIELD_TIME_MAX))
	end
end

local function simulateErrorCheck(method)
	if Constants.SIMULATE_ERROR_RATE > 0 and rand:NextNumber() <= Constants.SIMULATE_ERROR_RATE then
		simulateYield()
		error(method .. " rejected with error (simulated error)", 3)
	end
end
--F.updateSound = function(Sound, Pitch, Volume)
--	if Sound then
--		if Pitch then
--			Sound.Pitch = Pitch
--		end
--		if Volume then
--			Sound.Volume = Volume
--		end
--	end
--end



F.lock = function(x)
	if x then
		for i,v in pairs(script.Parent.Parent.Misc:GetDescendants()) do
			if v:IsA("Motor") then
				if v.Parent.Parent.Name == "Mirror" then
				else v.DesiredAngle = 0
				end
			end
		end
		carSeat.Lock:Play()
	else
		carSeat.Unlock:Play()
		wait(.5)
		carSeat.Unlock:Play()
	end
	for i,v in pairs(script.Parent.Parent.Misc:GetDescendants()) do
		if v:IsA("ClickDetector") then
			v.MaxActivationDistance = x and 0 or 12
		end
	end
end

local on = 0

F.rs = function(y)
	local tune = require(carSeat.Parent:FindFirstChild("A-Chassis Tune"))
	carSeat.IsOn.Value = y
	if y then
		carSeat.Startup:Play()
		if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		car.DriveSeat.Rev.Pitch = (car.DriveSeat.Rev.SetPitch.Value + car.DriveSeat.Rev.SetRev.Value*tune.IdleRPM/tune.Redline)*on^2
	else car.DriveSeat.Rev.Pitch = 0
		carSeat.Startup:Stop()
	end
end

F.user = function()
	carSeat.Parent:Destroy()
end

F.tk = function(b)
	carSeat.Parent.Misc.TK.SS.Motor.DesiredAngle = b and 1.5 or 0
end

script.Parent.OnServerEvent:connect(function(Player, Func, ...)
	if F[Func] then
		F[Func](...)
	end
end)
------------------------------------------------------------------------
-- look up token and return keyword if found (also called by parser)
------------------------------------------------------------------------


function luaX:token2str(ls, token)
  if string.sub(token, 1, 3) ~= "TK_" then
    if string.find(token, "%c") then
      return string.format("char(%d)", string.byte(token))
    end
    return token
  else
  end
    return self.tokens[token]
end
-- управление яркостью света от игрока в зависимости от времени суток



me = script.Parent

while true do
	timer=game.Lighting.ClockTime
	delta=(math.abs( 12 - timer )) / 12 + 0.3
	-- print("DELTA LIGHT = ",delta)	
	me.Color=Color3.fromRGB(255*delta,255*delta,127*delta)
	wait(1)
end
-- Engine Sound Parameters


local RPM_CROSSOVER = 250 -- How much more engine power is needed to crossover to the next engine audio track
local ENGINE_GAIN_ACCEL = 0.1 -- Exponent that builds the engine RPM when accelerating (gives the engine sound more oomph the higher the value)
local ENGINE_GAIN_DECCEL = 0.5 -- Exponent that builds the engine RPM when decelerating (braking)
local BASE_RPM = Configuration:WaitForChild("BaseEngineRPM") and Configuration.BaseEngineRPM.Value or 1500 -- Resting state for the engine
local MAX_RPM = Configuration:WaitForChild("MaxEngineRPM") and Configuration.MaxEngineRPM.Value or 5000 -- The engine RPM correlating to the highest pitch for engine sounds
local MAX_IDEAL_RPM = MAX_RPM-(MAX_RPM-BASE_RPM)/4 -- engine RPM correlating to normal usage (not under stress)
local MAX_SPEED = 125 -- The rotational velocity a vehicle's wheels would be reaching for the highest pitched engine sounds
--local ClickerModule = require(343254562)
--local clickEvent = ClickerModule.RemoteEvent


local interactiveParts = {}
local activationDistance = 12
local flushing = false
local water = script.Parent.Parent.Water
local sound = script.Parent.Parent.ToiletBowl.Sound
sound:Play()
wait(0.75)

			
			
			for i = 1, 5 do
				water.CFrame = water.CFrame * CFrame.new(0, 0.01, 0)
				wait()
			end
			--wait(1)
			for i = 1, 23 do
				water.Mesh.Scale = water.Mesh.Scale + Vector3.new(-0.0149, 0, -0.0149)
				water.CFrame = water.CFrame * CFrame.new(0, -0.0149, 0)
				wait()
			end
			for i, v in pairs(script.Parent.Parent:GetChildren()) do
				if v.Name == "WaterSwirl" then
					v.ParticleEmitter.Transparency = NumberSequence.new(0.9)
					v.ParticleEmitter.Rate = 900
				end
end
			
			
			wait(1)
			
			for i = 1, 10 do
				for ii, v in pairs(script.Parent.Parent:GetChildren()) do
					if v.Name == "WaterSwirl" then
						v.ParticleEmitter.Transparency = NumberSequence.new(0.9 + (0.015 * i))
						if i == 10 then
							v.ParticleEmitter.Rate = 0
						end
end
				end
				wait(0.2)
			end

			script.Parent.Parent.ToiletUsed.Value = false
			water.BrickColor = BrickColor.new("Fog")
			
			for i = 1, 145 do
				water.Mesh.Scale = water.Mesh.Scale + Vector3.new(0.0021, 0, 0.0021)
				water.CFrame = water.CFrame * CFrame.new(0, 0.0021, 0)
				wait()
			end
			water.CFrame = script.Parent.Parent.WaterResetPos.CFrame
			water.Mesh.Scale = Vector3.new(1,0,1)

			flushing = false
			script.Disabled = true
--[[

	19 -- All Accessories
	9 -- Hat
	20 -- HairAccessory
	21 -- FaceAccessory
	22 -- NeckAccessory
	23 -- ShoulderAccessory
	24 -- FrontAccessory
	25 -- BackAccessory
	26 -- WaistAccessory
	
	4 -- Faces+Heads
	10 -- Faces
	15 -- Heads

--]]



local Http = game:GetService("HttpService")

local subcategory = 9
local url = "https://search.roblox.com/catalog/json?Subcategory=" .. subcategory .. "&IncludeNotForSale=true&ResultsPerPage=60&PageNumber="

local pages = 25

local assets = {}

for i = 1, pages do
	local urlPage = url .. i
	local data = Http:JSONEncode(Http:GetAsync(urlPage))
	data = Http:JSONDecode(data)
	
	for ii = 1, #data do
		local asset = data[ii]
		
		local id = asset.AssetId
		local name = asset.Name
		
		assets[#assets + 1] = "{Id = " ..id .. ", Name = \"" .. name .. "\"}"
	end
	print(i)
end

local source = "return { \n\t" .. table.concat(assets, ",\n\t") .. "\n}"
local module = Instance.new("ModuleScript")
module.Source = source
module.Parent = workspace
-- upstream: https://github.com/facebook/react/blob/a9b035b0c2b8235405835beca0c4db2cc37f18d0/packages/shared/shallowEqual.js
--!strict
--[[*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 *
]]


local is = require(script.Parent.objectIs)