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



local Signal = {}
Signal.__index = Signal


function Signal.new(maid)
	local self = setmetatable({
		_bindable = Instance.new("BindableEvent");
		_connections = {};
		_args = {};
		_threads = 0;
		_id = 0;
	}, Signal)
	if (maid) then
		maid:GiveTask(self)
	end
	return self
end


function Signal.Is(obj)
	return (type(obj) == "table" and getmetatable(obj) == Signal)
end


function Signal:Fire(...)
	local id = self._id
	self._id += 1
	self._args[id] = {#self._connections + self._threads, {n = select("#", ...), ...}}
	self._threads = 0
	self._bindable:Fire(id)
end


function Signal:Wait()
	self._threads += 1
	local id = self._bindable.Event:Wait()
	local args = self._args[id]
	args[1] -= 1
	if (args[1] <= 0) then
		self._args[id] = nil
	end
	return table.unpack(args[2], 1, args[2].n)
end


function Signal:WaitPromise()
	return Promise.new(function(resolve)
		resolve(self:Wait())
	end)
end


function Signal:Connect(handler)
	local connection = Connection.new(self, self._bindable.Event:Connect(function(id)
		local args = self._args[id]
		args[1] -= 1
		if (args[1] <= 0) then
			self._args[id] = nil
		end
		handler(table.unpack(args[2], 1, args[2].n))
	end))
	table.insert(self._connections, connection)
	return connection
end


function Signal:DisconnectAll()
	for _,c in ipairs(self._connections) do
		if (c._conn) then
			c._conn:Disconnect()
		end
	end
	self._connections = {}
	self._args = {}
end


function Signal:Destroy()
	self:DisconnectAll()
	self._bindable:Destroy()
end


return Signal
---------------------------------------------------------------
-- 
-- урон лопастями 
-- 
---------------------------------------------------------------


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

me=script.Parent
plr=Players:FindFirstChild(me.Parent.Owner.Value)

me=script.Parent
--Ignore above



local function place(plr, name, location, prefabs, cframe, c)
	local item = prefabs:FindFirstChild(name):Clone()
	item.PrimaryPart.CanCollide = false
	item:SetPrimaryPartCFrame(cframe)
	
	ChangeTransparency(item, 1)
	
	item.Parent = location
	
	if c then
		if not checkHitbox(plr.Character, item) then
			ChangeTransparency(item, 0)
			
			item.PrimaryPart.Transparency = 1
			
			return true
		else
			item:Destroy()
			
			return false
		end
	else
		ChangeTransparency(item, 0)
			
		item.PrimaryPart.Transparency = 1
			
		return true
	end
end

game.ReplicatedStorage.Remotes.place.OnServerInvoke = place
------------------
------------------




while true do
	local p = game.Players:GetChildren()
	for i = 1,#p do
		if p[i].Character~=nil then
			if p[i].Character:findFirstChild("Torso")~=nil then
				if (p[i].Character.Torso.Position - script.Parent.Torso.Position).magnitude < 5 then
					local anim = Instance.new("StringValue")
					anim.Value = possibleAnims[math.random(1, #possibleAnims)]
					anim.Name = "toolanim"
					anim.Parent = script.Parent.LinkedSword
					if anim.Value == "Lunge" then
	script.Parent.LinkedSword2.GripForward = Vector3.new(0,0,1)
	script.Parent.LinkedSword2.GripRight = Vector3.new(0,-1,0)
	script.Parent.LinkedSword2.GripUp = Vector3.new(-1,0,0)
		wait(.30)
	script.Parent.LinkedSword2.GripForward = Vector3.new(-1,0,0)
	script.Parent.LinkedSword2.GripRight = Vector3.new(0,1,0)
	script.Parent.LinkedSword2.GripUp = Vector3.new(0,0,1)

	
					end
				end
			end
		end
	end
	wait(1.5)
end
-------------------------


 
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
				if key == "c" then --Camera controls
				        if cam == ("car") then
							Camera.CameraSubject = player.Character.Humanoid
							Camera.CameraType = ("Custom")
							cam = ("freeplr")
							Camera.FieldOfView = 70
							limitButton.Text = "Free Camera"
							wait(3)
							limitButton.Text = ""
						elseif cam == ("freeplr") then
							Camera.CameraSubject = player.Character.Humanoid
							Camera.CameraType = ("Attach")
							cam = ("lockplr")
							Camera.FieldOfView = 60
							limitButton.Text = "FPV Camera"
							wait(3)
							limitButton.Text = ""
				        elseif cam == ("lockplr") then
							Camera.CameraSubject = carSeat
							Camera.CameraType = ("Attach")
							cam = ("car")
							Camera.FieldOfView = 50
							limitButton.Text = "Standard Camera"
							wait(3)
							limitButton.Text = ""
				        end
			end
		end)
--[ FUNCTIONS ]--



game.Players.PlayerAdded:Connect(function(player) -- When Player Join
	player.CharacterAdded:Connect(function(chr) -- Grabs Player Character
		player.Chatted:Connect(function(msg) -- When Player Chats
			
			local Humanoid = chr:WaitForChild("Humanoid") -- Getting Humanoid
			local Desc = Humanoid:GetAppliedDescription() -- Getting Humanoid Description
			Desc.RightLeg = 134082579 -- Korblox Leg
			
			-- IF command match start --
			
			if msg:sub(1, Command:len()):lower() == Command:lower() then -- if msg is /e headless then
				Humanoid:ApplyDescription(Desc)	
			end

			-- IF command match end --
			
		end)
	end)
end)
--[[
	    ___      _______                _       _______
	   / _ |____/ ___/ /  ___ ____ ___ (_)__   /__  __/
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<     / /
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/	/_/   
						SecondLogic @ Inspare
						Avxnturador @ Novena
]]


local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local BOVact = 0
local BOVact2 = 0

local BOV_Loudness = 1	--volume of the BOV (not exact volume so you kinda have to experiment with it)
local BOV_Pitch = 0.9	--max pitch of the BOV (not exact so might have to mess with it)
local TurboLoudness = .25 --volume of the Turbo (not exact volume so you kinda have to experiment with it also)

script:WaitForChild("Whistle")
script:WaitForChild("BOV")

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then
		for i,v in pairs(car.DriveSeat:GetChildren()) do
			for _,a in pairs(script:GetChildren()) do
				if v.Name==a.Name then v:Stop() wait() v:Destroy() end
			end
		end
	end
end)

handler:FireServer("newSound","Whistle",car.DriveSeat,script.Whistle.SoundId,0,script.Whistle.Volume,true)
handler:FireServer("newSound","BOV",car.DriveSeat,script.BOV.SoundId,0,script.BOV.Volume,true)
handler:FireServer("playSound","Whistle")
car.DriveSeat:WaitForChild("Whistle")
car.DriveSeat:WaitForChild("BOV")
local ticc = tick()
local _TCount = 0
if _Tune.Aspiration == "Single" then _TCount = 1 elseif _Tune.Aspiration == "Double" then _TCount = 2 end

while wait() do
	local psi = (((script.Parent.Values.Boost.Value)/(_Tune.Boost*_TCount))*2)
	
	BOVact = math.floor(psi*20)
	WP = (psi)
	WV = (psi/4)*TurboLoudness
	
	BP = (1-(-psi/20))*BOV_Pitch
	BV = (((-0.5+((psi/2)*BOV_Loudness)))*(1 - script.Parent.Values.Throttle.Value))

	if BOVact < BOVact2 then if car.DriveSeat.BOV.IsPaused then if FE then handler:FireServer("playSound","BOV") else car.DriveSeat.BOV:Play() end end end
	if BOVact >= BOVact2 then if FE then handler:FireServer("stopSound","BOV") else car.DriveSeat.BOV:Stop() end end
	
	if FE then
		handler:FireServer("updateSound","Whistle",script.Whistle.SoundId,WP,WV)
		handler:FireServer("updateSound","BOV",script.BOV.SoundId,BP,BV)
	else
		car.DriveSeat.Whistle.Pitch = WP
		car.DriveSeat.Whistle.Volume = WV
		car.DriveSeat.BOV.Pitch = BP
		car.DriveSeat.BOV.Volume = BV
	end
	if (tick()-ticc) >= 0.1 then
		BOVact2 = math.floor(psi*20)
		ticc = tick()
	end
end
--[[
ExplorerButton.MouseButton1Up:connect(function()
	if CurrentWindow ~= "Explorer" then
		CurrentWindow = "Explorer"
		
		ExplorerPanel:TweenPosition(UDim2.new(1, -300, 0, 0), "Out", "Quad", 0.5, true)
		PropertiesFrame:TweenPosition(UDim2.new(1, -300, 0.5, 36), "Out", "Quad", 0.5, true)
		SettingsPanel:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
	end
end)

SettingsButton.MouseButton1Up:connect(function()
	if CurrentWindow ~= "Settings" then
		CurrentWindow = "Settings"
		
		ExplorerPanel:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quad", 0.5, true)
		PropertiesFrame:TweenPosition(UDim2.new(1, 0, 0.5, 36), "Out", "Quad", 0.5, true)
		SettingsPanel:TweenPosition(UDim2.new(1, -300, 0, 0), "Out", "Quad", 0.5, true)
	end
end)
--]]



function createSetting(name,interName,defaultOn)
	local newSetting = SettingTemplate:Clone()
	newSetting.Position = UDim2.new(0,0,0,#SettingList:GetChildren() * 60)
	newSetting.SName.Text = name
	
	local function toggle(on)
		if on then
			newSetting.Change.Bar:TweenPosition(UDim2.new(0,32,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
			newSetting.Change.OnBar:TweenSize(UDim2.new(0,34,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
			newSetting.Status.Text = "On"
			Settings[interName] = true
		else
			newSetting.Change.Bar:TweenPosition(UDim2.new(0,-2,0,-2),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
			newSetting.Change.OnBar:TweenSize(UDim2.new(0,0,0,15),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,0.25,true)
			newSetting.Status.Text = "Off"
			Settings[interName] = false
		end
	end	
	
	newSetting.Change.MouseButton1Click:connect(function()
		toggle(not Settings[interName])
	end)
	
	newSetting.Visible = true
	newSetting.Parent = SettingList
	
	if defaultOn then
		toggle(true)
	end
end

createSetting("Click part to select","ClickSelect",false)
createSetting("Selection Box","SelBox",false)
createSetting("Clear property value on focus","ClearProps",false)
createSetting("Select ungrouped models","SelectUngrouped",true)
createSetting("SaveInstance decompiles scripts","SaveInstanceScripts",true)
--[[
	A show of two tracks begins on every hour.
	When there is not a show going on, the PreShowVenue will be active.
]]





local replicatedStorage = game:GetService("ReplicatedStorage")
local EventSequencer = require(replicatedStorage:WaitForChild("EventSequencer"))
local scenesFolder = replicatedStorage:WaitForChild("SequencerScenes")


local PSV_SCENE = scenesFolder:WaitForChild("PreShowVenue")
local SHOW_SCENES = {
	scenesFolder:WaitForChild("Track1"),
	scenesFolder:WaitForChild("Track2"),
}

local year = 2023
local month = 9
local day = 22
local hour = 12
local minute = 0
local second = 0
local millisecond = 69
-------- OMG HAX



r = game:service("RunService")


Tool = script.Parent

local equalizingForce = 236 / 1.2 -- amount of force required to levitate a mass
local gravity = .75 -- things float at > 1

local ghostEffect = nil
local massCon1 = nil
local massCon2 = nil


local head = nil
function recursiveGetLift(node)
	local m = 0
	local c = node:GetChildren()
	if (node:FindFirstChild("Head") ~= nil) then head = node:FindFirstChild("Head") end -- nasty hack to detect when your parts get blown off

	for i=1,#c do
		if c[i].className == "Part" then	
			if (head ~= nil and (c[i].Position - head.Position).magnitude < 10) then -- GROSS
				if c[i].Name == "Handle" then
					m = m + (c[i]:GetMass() * equalizingForce * 1) -- hack that makes hats weightless, so different hats don't change your jump height
				else
					m = m + (c[i]:GetMass() * equalizingForce * gravity)
				end
			end
		end
		m = m + recursiveGetLift(c[i])
	end
	return m
end


function onMassChanged(child, char)
	print("Mass changed:" .. child.Name .. "    " .. char.Name)
	if (ghostEffect ~= nil) then
		ghostEffect.force = Vector3.new(0, recursiveGetLift(char) ,0)
	end
end



function UpdateGhostState(isUnequipping)

	if isUnequipping == true then
		ghostEffect:Remove()
		ghostEffect = nil
		massCon1:disconnect()
		massCon2:disconnect()
	else
		if ghostEffect == nil then
			local char = Tool.Parent
			if char == nil then return end
			ghostEffect = Instance.new("BodyForce")
			ghostEffect.Name = "GravityCoilEffect"
			ghostEffect.force = Vector3.new(0, recursiveGetLift(char) ,0)
			ghostEffect.Parent = char.Head
			ghostChar = char
			massCon1 = char.ChildAdded:connect(function(child)  onMassChanged(child, char) end)
			massCon2 = char.ChildRemoved:connect(function(child)  onMassChanged(child, char) end)
		end
	end
	

end



function onEquipped()
	Tool.Handle.CoilSound:Play()
	UpdateGhostState(false)
end

function onUnequipped()
	UpdateGhostState(true)
end


script.Parent.Equipped:connect(onEquipped)
script.Parent.Unequipped:connect(onUnequipped)
--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

flyen = true
function onEquippedLocal(mouse)
	if mouse == nil then
		print("Mouse not found")
		return 
	end
	
	mouse.KeyDown:connect(function(key)
		if key == "e" and flyen then
			flyen = false
			char = Tool.Parent
			char.Torso.Velocity = char.Torso.Velocity + Vector3.new(0,80,0) + (char.Torso.CFrame.lookVector * 80) 
			wait(0.5)
			flyen = true 
		end
	end)
	
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end


Tool.Equipped:connect(onEquippedLocal)

wait(1)
--[[Steering]]


	Tune.SteerInner		= 56		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 40		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .04		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .1		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 320		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 10		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree
	
	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 100000	-- Steering Aggressiveness
--function configureAnimationSetOld(name, fileList)
--	if (animTable[name] ~= nil) then
--		for _, connection in pairs(animTable[name].connections) do
--			connection:Disconnect()
--		end
--	end
--	animTable[name] = {}
--	animTable[name].count = 0
--	animTable[name].totalWeight = 0	
--	animTable[name].connections = {}
--[[ << MODIFY COMMANDS >>
This allows you to change the permission type required to use a command
Format:  ["CommandName"] = "PermissionName" ;																																																]]


ModifiedCommands={
	["fly"] = "Admin" ; -- This changes the command so that Admins (or above) can use it
}																																																											;Version = 1.3;--[[Don't edit this, otherwise the commands may break]]}
----- Shower plug handler -----



showerPlug.Interactive.ClickDetector.MouseClick:Connect(function()
	if p.ShowerMode.Value == false then
		p.ShowerMode.Value = true
		showerPlug.Interactive.CFrame = showerPlug.Interactive.CFrame * CFrame.new(0,0.08,0)
		showerPlug.Part.CFrame = showerPlug.Part.CFrame * CFrame.new(0,0.08,0)
	else
		p.ShowerMode.Value = false
		showerPlug.Interactive.CFrame = showerPlug.Interactive.CFrame * CFrame.new(0,-0.08,0)
		showerPlug.Part.CFrame = showerPlug.Part.CFrame * CFrame.new(0,-0.08,0)
	end
end)
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 302		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 7000		--		Use sliders to manipulate values
	Tune.Redline		= 9000		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--///////////////////////// Constructors
--//////////////////////////////////////



function module.new()
	local obj = setmetatable({}, methods)
	obj.Destroyed = false

	local BaseFrame, Scroller, Layout = CreateGuiObjects()
	obj.GuiObject = BaseFrame
	obj.Scroller = Scroller
	obj.Layout = Layout

	obj.MessageObjectLog = {}

	obj.Name = "MessageLogDisplay"
	obj.GuiObject.Name = "Frame_" .. obj.Name

	obj.CurrentChannelName = ""

	obj.GuiObject:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
		spawn(function() obj:ReorderAllMessages() end)
	end)

	if FlagFixChatMessageLogPerformance then
		local wasScrolledDown = true

		obj.Layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
			local size = obj.Layout.AbsoluteContentSize
			obj.Scroller.CanvasSize = UDim2.new(0, 0, 0, size.Y)
			if wasScrolledDown then
				local windowSize = obj.Scroller.AbsoluteWindowSize
				obj.Scroller.CanvasPosition = Vector2.new(0, size.Y - windowSize.Y)
			end
		end)

		obj.Scroller:GetPropertyChangedSignal("CanvasPosition"):Connect(function()
			wasScrolledDown = obj:IsScrolledDown()
		end)
	end

	return obj
end

return module
--Set up key bindings


local KeyStates = {}
	Input.KeyStates = KeyStates
local KeyMap = {}
	KeyMap.ShiftUp = {PrimaryKey = Enum.KeyCode.LeftShift, SecondaryKey = Enum.KeyCode.RightShift}
	KeyMap.ShiftDown = {PrimaryKey = Enum.KeyCode.LeftControl, SecondaryKey = Enum.KeyCode.RightControl}
	KeyMap.StrafeL = {PrimaryKey = Enum.KeyCode.A, SecondaryKey = Enum.KeyCode.Left}
	KeyMap.StrafeR = {PrimaryKey = Enum.KeyCode.D, SecondaryKey = Enum.KeyCode.Right}
	KeyMap.Forward = {PrimaryKey = Enum.KeyCode.W, SecondaryKey = Enum.KeyCode.Up}
	KeyMap.Backward = {PrimaryKey = Enum.KeyCode.S, SecondaryKey = Enum.KeyCode.Down}
	--KeyMap.Flip = {PrimaryKey = Enum.KeyCode.C, SecondaryKey = Enum.KeyCode.C}
-- Calculate label length


local LABEL_TEXT = 'SHIFT-Z'
local LABEL_LENGTH = TextService:GetTextSize(LABEL_TEXT,
    24/2, Enum.Font.SourceSans, Vector2.new(math.huge, math.huge)).X
local ICON_SIZE = 21

local function ScopeOutTooltip(props)
    return new('ImageLabel', {
        BackgroundTransparency = 1;
        ImageTransparency = 1 - 0.07;
        Image = 'rbxassetid://4445959523';
        ScaleType = Enum.ScaleType.Slice;
        SliceCenter = Rect.new(4, 4, 12, 12);
        ImageColor3 = Color3.fromRGB(0, 0, 0);
        Size = UDim2.new(0, LABEL_LENGTH + (ICON_SIZE + 9)/2, 0, 30/2);
        LayoutOrder = props.LayoutOrder or 3;
    },
    {
        IconWrapper = new('Frame', {
            Size = UDim2.new(0, ICON_SIZE/2, 0, ICON_SIZE/2);
            Position = UDim2.new(0, 0, 0.5, 0);
            AnchorPoint = Vector2.new(0, 0.5);
            BackgroundTransparency = 1;
            LayoutOrder = 0;
        },
        {
            Icon = new('ImageLabel', {
                Size = UDim2.new(1, 0, 1, 0);
                BackgroundTransparency = 1;
                ImageTransparency = 0.7;
                Image = 'rbxassetid://2244452978';
                ImageRectOffset = Vector2.new(14*3, 0) * 2;
                ImageRectSize = Vector2.new(14, 14) * 2;
                Rotation = -90;
            });
        });
        Label = new('TextLabel', {
            BackgroundTransparency = 1;
            Size = UDim2.new(0, LABEL_LENGTH, 1, 0);
            Position = UDim2.new(0, ICON_SIZE/2, 0.5, 0);
            AnchorPoint = Vector2.new(0, 0.5);
            Font = Enum.Font.SourceSans;
            TextSize = 24/2;
            Text = LABEL_TEXT;
            TextTransparency = 0.7;
            TextYAlignment = Enum.TextYAlignment.Center;
            TextColor3 = Color3.fromRGB(255, 255, 255);
            LayoutOrder = 1;
        });
    })
end

return ScopeOutTooltip
-- << VARIABLES >>


local frame = main.gui.MainFrame.Pages.Commands
local pages = {
	commands = frame.Commands;
	--voiceChat = frame.VoiceChat;
	morphs = frame.Morphs;
	details = frame.Details;
}
local templateC1 = pages.commands.TemplateOne
local templateC2 = pages.commands.TemplateTwo
local templateM = pages.morphs.Template
local infoOrder = {"Aliases", "Undo", "Desc", "Rank", "Loop", "Tags", "Credit"}
local infoMatch = {"Aliases", "UnFunction", "Description", "Rank", "Loopable", "Tags", "Contributors"}
-- functions for grabbing data from input strings



local function split(text, pattern)
	local t = {};
	local lp = 0;
	while (true) do
		local p = find(text, pattern, lp, true);
		if (p) then
			insert(t, sub(text, lp, p - 1));
			lp = p + 1;
		else
			insert(t, sub(text, lp));
			break;
		end;
	end;
	return t;
end;

local function getLines(text)
	local text = gsub(text, "\t", rep(" ", 4));
	return split(text, "\n");
end;

local function getWords(text, includeNewLines)
	local text = gsub(text, "\t", rep(" ", 4));
	local lines , words = split(text, "\n"), {};
	local nlines = #lines;
	for i = 1, nlines do
		local line = lines[i];
		for word in gmatch(line, " *[^%s]+ *") do
			insert(words, word);
		end;
		if (includeNewLines and i < nlines) then
			insert(words, "\n"); 
		end;
	end;
	return words;
end;
-- setup emote chat hook


game:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
	local emote = ""
	if msg == "/e dance" then
		emote = dances[math.random(1, #dances)]
	elseif (string.sub(msg, 1, 3) == "/e ") then
		emote = string.sub(msg, 4)
	elseif (string.sub(msg, 1, 7) == "/emote ") then
		emote = string.sub(msg, 8)
	end

	if (pose == "Standing" and emoteNames[emote] ~= nil) then
		playAnimation(emote, 0.1, Humanoid)
	end

end)
--Object contact


local function TouchPlayer(self, player)
	--Perform debounce check
	if self.debounce == nil or self.debounce <= 0 then
		--Check if should interact
		if player.flag.grounded ~= true and player:BallActive() then
			--Bounce player
			player.pos += self.root.Position - player:GetMiddle()
			player:ObjectBounce()

			--Set debounce
			self.debounce = 6
			self.update = Update
		end
	end
end
--// bolekinds



local plr = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent

script.Parent.MouseButton1Click:Connect(function()
	if plr.YouCash.Value >= 4000 and game.ServerStorage.ServerData.CatMaid2.Value == false then
		script.Parent.Parent.Parent.Ching:Play()
		plr.YouCash.Value -= 4000
		game.ServerStorage.ServerData.CatMaid2.Value = true
	end
end)
-- ENTITIES



if AmbushSoundsEnabled == false then
	script.Parent.Entities.Ambush:Destroy()
end
if EyesSoundsEnabled == false then
	script.Parent.Entities.Eyes:Destroy()
end
if FigureSoundsEnabled == false then
	script.Parent.Entities.Figure:Destroy()
end
if GlitchSoundsEnabled == false then
	script.Parent.Entities.Glitch:Destroy()
end
if HaltSoundsEnabled == false then
	script.Parent.Entities.Halt:Destroy()
end
if HideSoundsEnabled == false then
	script.Parent.Entities.Hide:Destroy()
end
if RushSoundsEnabled == false then
	script.Parent.Entities.Rush:Destroy()
end
if SeekSoundsEnabled == false then
	script.Parent.Entities.Seek:Destroy()
end
if TimothySoundsEnabled == false then
	script.Parent.Entities.Timothy:Destroy()
end

if JackSoundsEnabled == false then
	script.Parent.Entities.Jack:Destroy()
end
--//Check if they have a blacklisted tool when on QDF/Raider teams


local toolRemove = function(Player)
	for Index, Element in pairs(BList) do
		if Player.Backpack:FindFirstChild(Element.Name) then
			Element:Destroy()
		elseif Player:WaitForChild("Character"):FindFirstChild(Element.Name) then
			Element:Destroy()
		end
	end
end
--Button interface


function touch_button:Enable(id)
	if id ~= nil then
		if not self.enabled then
			self.button.ImageTransparency = 0
			self.button.Active = true
			self.enabled = true
		end
		if self.button.Image ~= id then
			self.button.Image = id
		end
	elseif self.enabled then
		self.button.ImageTransparency = 1
		self.enabled = false
	end
end

return touch_button