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


wait (1)
local larm=script.Parent:FindFirstChild("Left Arm")
local rarm=script.Parent:FindFirstChild("Right Arm")
local head=script.Parent:FindFirstChild("Head")

local health=8000 ---zombies health
local speed=14 --zombies walkspeed

local a = 0
function findNearestTorso(pos) --thanks miked for this function <3
	local list = game.Workspace:children()
	local torso = nil
	local dist = script.Range.Value
	local temp = nil
	local human = nil
	local temp2 = nil
	for x = 1, #list do
		temp2 = list[x]
		if (temp2.className == "Model") and (temp2 ~= script.Parent) then
			temp = temp2:findFirstChild("Torso")
			human = temp2:findFirstChild("Humanoid")
			if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
				if (temp.Position - pos).magnitude < dist then
					torso = temp
					dist = (temp.Position - pos).magnitude
					a = a + 1
					if dist <= 3 and a == 10 then
						script.Parent.Torso["Right Shoulder"].MaxVelocity = 100000  ---attack anim <3
						script.Parent.Torso["Left Shoulder"].MaxVelocity = 100000
						script.Parent.Torso["Right Shoulder"].DesiredAngle = math.pi / 4 * 3
						script.Parent.Torso["Left Shoulder"].DesiredAngle = math.pi / 4 * -3
						script.Parent.Torso["Right Shoulder"].CurrentAngle = math.pi / 4 * 3
						script.Parent.Torso["Left Shoulder"].CurrentAngle = math.pi / 4 * -3
						wait()
						script.Parent.Torso["Right Shoulder"].MaxVelocity = 0.15
						script.Parent.Torso["Left Shoulder"].MaxVelocity = 0.15
					end
					if a == 10 then
					a = 0
					end
				end
			end
		end
	end
	return torso
end

function Hit(hit)
local human = hit.Parent:FindFirstChild("Humanoid")
if human and script.Parent.Zombie.Health>0 then
human.Health= human.Health-script.Damage.Value
end
end
larm.Touched:connect(Hit)
rarm.Touched:connect(Hit)
head.Touched:connect(Hit)

Spawn(function()
while wait(0.5) do
local target = findNearestTorso(script.Parent.Torso.Position)
if target then
script.Parent.Zombie:MoveTo(target.Position, target)
end
end
end)

script.Parent.Zombie.MaxHealth=health
script.Parent.Zombie.Health=script.Parent.Zombie.MaxHealth
script.Parent.Zombie.WalkSpeed=speed


script.Parent.Zombie.Died:connect(function()
--// All global vars will be wiped/replaced except script
--// All guis are autonamed client.Variables.CodeName..gui.Name



return function(data)
	local gui = client.UI.Prepare(script.Parent.Parent)
	local ques = gui.Frame.Main.Question
	local yes = gui.Frame.Main.Yes
	local no = gui.Frame.Main.No
	
	local question = data.Question
	local gTable = data.gTable
	local ans
	
	ques.Text = question
	
	yes.MouseButton1Click:connect(function()
		ans = "Yes"
		gui:Destroy()
	end)
	
	no.MouseButton1Click:connect(function()
		ans = "No"
		gui:Destroy()
	end)
	
	gTable:Ready()
	repeat wait(0.1) until ans
	return ans
end
-- Made by Crozur


script.Parent.BillboardGui.Enabled = false

game.Players.PlayerAdded:Connect(function(plr)
	if plr.Name == ("NAME HERE") then -- Insert your name in between the ""
		wait(3) -- waits just in case player isn't loaded
		script.Parent.BillboardGui.Enabled = true -- makes it visible
		script.Parent.BillboardGui.Parent = plr.Character.Head -- Puts the title above your head, you can change the offset under BillboardGui.StudsOffset
	end
end)
--[[
local ss = script.Sound:Clone()
ss.Parent = Cha.Torso
ss.Pitch = math.random(11, 13)/10
ss:Play()]]

--
Torso = Cha.Torso
coroutine.resume(coroutine.create(function()
local direction = Instance.new("BodyGyro", Cha.Torso)
direction.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
direction.cframe = CFrame.new(Cha.Torso.Position, mouse.Hit.p)
repeat wait()
if Cha.Torso:FindFirstChild("BodyGyro") then
direction.cframe = CFrame.new(Cha.Torso.Position, mouse.Hit.p)*CFrame.Angles(math.rad(-90),0,0)
Cha.Torso.Velocity = (direction.cframe*CFrame.Angles(math.rad(90),0,0)).lookVector.unit * 50
end
until db == false
end))
wait(15)
FlyOff()
end
-- given an Instance and a property-value table subset
-- returns true if all property-values in the subset table exist in the Instance
-- and returns false otherwise
-- returns nil for undefined behavior


local function instanceSubsetEquality(instance: any, subset: any): boolean | nil
	local function subsetEqualityWithContext(seenReferences)
		return function(localInstance, localSubset)
			seenReferences = seenReferences or {}

			if getType(localInstance) ~= "Instance" or not isObjectWithKeys(localSubset) then
				return nil
			end

			local instanceProperties = getRobloxProperties(localInstance.ClassName)
			local instanceChildren = {}
			for _, v in ipairs(localInstance:getChildren()) do
				instanceChildren[v.Name] = true
			end

			return Array.every(Object.keys(localSubset), function(prop)
				local subsetVal = localSubset[prop]
				if isObjectWithKeys(subsetVal) then
					-- return false for circular references
					if seenReferences[subsetVal] then
						return false
					end
					seenReferences[subsetVal] = true
				end
				local result = localInstance ~= nil
					and (table.find(instanceProperties, prop) ~= nil or instanceChildren[prop] ~= nil)
					and equals(localInstance[prop], subsetVal, { subsetEqualityWithContext(seenReferences) })

				seenReferences[subsetVal] = nil
				return result
			end)
		end
	end

	local inner = subsetEqualityWithContext()

	if inner then
		return inner(instance, subset)
	end
	return inner
end
-- # CODE BELOW # --
-- ^    Do not change anything else



local GoreFolder = game.ReplicatedStorage["Gore by Leveled Development"];
local Core = require(GoreFolder.Modules.Core);

local Character = script.Parent.Parent;
local Humanoid = Character:WaitForChild("Humanoid");

Humanoid.BreakJointsOnDeath = false;
Humanoid.Died:Connect(function()
	Core.Ragdoll("", Character);
end);
----- lock -----



lockInteractive.ClickDetector.MouseClick:Connect(function()
	if not doorOpen and not changingState then
		changingState = true
		if doorLocked then
			doorLocked = false
			interactive.ClickDetector.MaxActivationDistance = 12
			for i = 1, 5 do
				lock.CFrame = lock.CFrame * CFrame.new(0,0.02,0)
				handle.CFrame = handle.CFrame * CFrame.Angles(math.rad(-18),0,0)
				wait()
			end
		else
			doorLocked = true
			interactive.ClickDetector.MaxActivationDistance = 0
			for i = 1, 5 do
				lock.CFrame = lock.CFrame * CFrame.new(0,-0.02,0)
				handle.CFrame = handle.CFrame * CFrame.Angles(math.rad(18),0,0)
				wait()
			end
		end
		changingState = false
	end
end)
--[[
	Change is used to generate special prop keys that can be used to connect to
	GetPropertyChangedSignal.

	Generally, Change is indexed by a Roblox property name:

		Roact.createElement("TextBox", {
			[Roact.Change.Text] = function(rbx)
				print("The TextBox", rbx, "changed text to", rbx.Text)
			end,
		})
]]



local Type = require(script.Parent.Parent.Type)

local Change = {}

local changeMetatable = {
	__tostring = function(self)
		return ("RoactHostChangeEvent(%s)"):format(self.name)
	end,
}

setmetatable(Change, {
	__index = function(_self, propertyName)
		local changeListener = {
			[Type] = Type.HostChangeEvent,
			name = propertyName,
		}

		setmetatable(changeListener, changeMetatable)
		Change[propertyName] = changeListener

		return changeListener
	end,
})

return Change
--(FL.RotVelocity.Magnitude+FR.RotVelocity.Magnitude+RL.RotVelocity.Magnitude+RR.RotVelocity.Magnitude+(speed/1.33034))/5



while wait() do
speed = carSeat.Velocity.Magnitude
power = 0
average = 10*((carSeat.Storage.BrakeBias.Value/100))
track = carSeat.Velocity.Unit*carSeat.CFrame.lookVector
	slipDetection = track.X+track.Z
	
	Right = (carSeat.Parent.Parent.Wheels.RR.Wheel.Velocity.Magnitude+carSeat.Parent.Parent.Wheels.FR.Wheel.Velocity.Magnitude)/2
	Left = (carSeat.Parent.Parent.Wheels.RL.Wheel.Velocity.Magnitude+carSeat.Parent.Parent.Wheels.FL.Wheel.Velocity.Magnitude)/2
	
	if Right > Left then
	left = true
	else
		left = false
	end
	
if script.OVERRIDE.Value == false then
if carSeat.Storage.ASC.Value == true then
	if carSeat.Steer ~= 0 then
		if slipDetection > 0.999 and left == true then
			script.Toggle.Value = true
		else
			script.Toggle.Value = false
		end
	else
		script.Toggle.Value = false
	end
end

if carSeat.Storage.Handbrake.Value == true then
	RLBRAKE.CanCollide = true
	RLBRAKEU.CanCollide = true
else
	if speed > 0 then
		if script.Parent.Parent.Storage.Brake.Value ~= 0 or script.Toggle.Value == true then
				if RL.RotVelocity.Magnitude + power > average then
					script.Read.Value = true
					RLBRAKE.CanCollide = true
					RLBRAKEU.CanCollide = true --print("RL")

				elseif RL.RotVelocity.Magnitude + power < average then
					 RLBRAKE.CanCollide = false script.Read.Value = false
					 RLBRAKEU.CanCollide = false	
			end
			
		elseif script.Parent.Parent.Storage.Brake.Value == 0 and script.Toggle.Value == false then
			script.Read.Value = false
			RLBRAKE.CanCollide = false
			RLBRAKEU.CanCollide = false
		end
	end
end
else
	RLBRAKE.CanCollide = true
	RLBRAKEU.CanCollide = true
	end
end
------------------------------------------------------------------------
-- saves the given character into the token buffer
-- * buffer handling code removed, not used in this implementation
-- * test for maximum token buffer length not used, makes things faster
------------------------------------------------------------------------



function luaX:save(ls, c)
  local buff = ls.buff
  -- if you want to use this, please uncomment luaX.MAX_SIZET further up
  --if #buff > self.MAX_SIZET then
  --  self:lexerror(ls, "lexical element too long")
  --end
  ls.buff = buff..c
end
----------SCRIPTED BY ZEDARKALIEN----------



local button = script.Parent
local frame = script.Parent.Parent:WaitForChild("Frame")
local debounce = false

button.MouseButton1Up:Connect(function()
	
	script.Parent.ClickSound:Play()
	
	if debounce == false then
		debounce = true
		
		frame.Visible = true
		script.Parent.Text = "CLOSE"
		
	elseif debounce == true then
		debounce = false
		
		frame.Visible = false
		script.Parent.Text = "SHOP"
		
	end
end)
-- Disable PickupInfo when player is seated


local runningWhenSeated = false
local function onCharacterAdded(character)
	local characterHumanoid = character:WaitForChild("Humanoid")
	characterHumanoid.Seated:Connect(function(isSeated)
		if isSeated and PickupInfoHandler.instance.isRunning then
			runningWhenSeated = true
			PickupInfoHandler.instance:stop()
		elseif not isSeated and not PickupInfoHandler.instance.isRunning and runningWhenSeated == true then
			runningWhenSeated = false
			PickupInfoHandler.instance:start()
		end
	end)
end

localPlayer.CharacterAdded:Connect(onCharacterAdded)
if localPlayer.Character then
	onCharacterAdded(localPlayer.Character)
end

return PickupInfoHandler
-- Parts


local TopBarPart = Home:WaitForChild("TopBarPart")


local Hook1 = Tire:WaitForChild("Hook1")
local Hook2 = Tire:WaitForChild("Hook2")
local TireMesh = Tire:WaitForChild("TireMesh")
local TireSeat = Tire:WaitForChild("TireSeat")

local RopeSupport1 = TopBar:WaitForChild("RopeSupport1")
local RopeSupport2 = TopBar:WaitForChild("RopeSupport2")
--			local frame = Instance.new("Frame", game.Workspace.PlotDisplay.SurfaceGui)
--			frame.Name = tostring(x) .. "_" .. tostring(z)
--			frame.Size = UDim2.new(1/stepsX,0,1/stepsZ,0)
--			frame.Position = UDim2.new(x/stepsX,0,z/stepsZ,0)
--			frame.BackgroundColor3 = Color3.new(0,1,0)


		end
	end
end

local function nodeInList(list, node)
	for _, otherNode in pairs(list) do
		if node.X == otherNode.X and node.Z == otherNode.Z and otherNode.f <= node.f then
			return true
		end
	end
	return false
end
-- Return the number of common items that precede in reverse direction.
-- The length of what Myers paper calls a “snake” in a reverse path.


local function countCommonItemsR(
	aStart: number,
	aIndex: number,
	bStart: number,
	bIndex: number,
	isCommon: IsCommon
): number
	local nCommon = 0
	while aStart <= aIndex and bStart <= bIndex and isCommon(aIndex, bIndex) do
		aIndex = aIndex - 1
		bIndex = bIndex - 1
		nCommon = nCommon + 1
	end
	return nCommon
end
--[[
	Registers the creation of an object which can be used as a dependency.

	This is used to make sure objects don't capture dependencies originating
	from inside of themselves.
]]



local Package = script.Parent.Parent
local PubTypes = require(Package.PubTypes)
local sharedState = require(Package.Dependencies.sharedState)

local initialisedStack = sharedState.initialisedStack

local function initDependency(dependency: PubTypes.Dependency)
	local initialisedStackSize = sharedState.initialisedStackSize

	for index, initialisedSet in ipairs(initialisedStack) do
		if index > initialisedStackSize then
			return
		end

		initialisedSet[dependency] = true
	end
end

return initDependency
--Star Dust--



local function AttachParticleControl(source_part)
	
	local prtc = nil
	local prtc2 = nil
	
	local function Start()
		prtc = script.Stars:clone()
		prtc.Parent = source_part
		prtc2 = script.Space:clone()
		prtc2.Parent = source_part
	end
	
	local function Update()
		
	end
	
	local function Stop()
		if prtc ~= nil then
			prtc:destroy()
			prtc = nil
		end
		if prtc2 ~= nil then
			prtc2:destroy()
			prtc2 = nil
		end
	end
	
	return {Start = Start, Update = Update, Stop = Stop}
end

return AttachParticleControl
--TODO: investigate - does ordering matter here? need to check all the faces


return {
	[Enum.NormalId.Front] = {
		{ 1, 1, -1 }, --v1 - top front right
		{ 1, -1, -1 }, --v2 - bottom front right
		{ -1, -1, -1 }, --v3 - bottom front left
		{ -1, 1, -1 }, --v4 - top front left
	},
	[Enum.NormalId.Back] = {
		{ 1, 1, 1 }, --v5 - top back right
		{ 1, -1, 1 }, --v6 - bottom back right
		{ -1, -1, 1 }, --v7 - bottom back left
		{ -1, 1, 1 },  --v8 - top back left
	},
	[Enum.NormalId.Left] = {
		{ -1, -1, -1 }, --v3 - bottom front left
		{ -1, 1, -1 }, --v4 - top front left
		{ -1, -1, 1 }, --v7 - bottom back left
		{ -1, 1, 1 },  --v8 - top back left
	},
	[Enum.NormalId.Right] = {
		{ 1, 1, -1 }, --v1 - top front right
		{ 1, -1, -1 }, --v2 - bottom front right
		{ 1, 1, 1 }, --v5 - top back right
		{ 1, -1, 1 }, --v6 - bottom back right
	},
	[Enum.NormalId.Top] = {
		{ 1, 1, -1 }, --v1 - top front right
		{ -1, 1, -1 }, --v4 - top front left
		{ 1, 1, 1 }, --v5 - top back right
		{ -1, 1, 1 },  --v8 - top back left
	},
	[Enum.NormalId.Bottom] = {
		{ 1, -1, -1 }, --v2 - bottom front right
		{ -1, -1, -1 }, --v3 - bottom front left
		{ 1, -1, 1 }, --v6 - bottom back right
		{ -1, -1, 1 }, --v7 - bottom back left
	},
}
--// All global vars will be wiped/replaced except script
--// All guis are autonamed client.Variables.CodeName..gui.Name



return function(data)
	local gui = script.Parent.Parent
	local playergui = service.PlayerGui
	local str = data.Message
	local time = data.Time or 15

	--client.UI.Make("HintHolder")
	local container = client.UI.Get("HintHolder",nil,true)
	if not container then
		local holder = service.New("ScreenGui")
		local hTable = client.UI.Register(holder)
		local frame = service.New("ScrollingFrame", holder)
		client.UI.Prepare(holder)
		hTable.Name = "HintHolder"
		frame.Name = "Frame"
		frame.BackgroundTransparency = 1
		frame.Size = UDim2.new(1, 0, 0,150)
		frame.CanvasSize = UDim2.new(0, 0, 0, 0)
		frame.ChildAdded:Connect(function(c)
			if #frame:GetChildren() == 0 then
				frame.Visible = false
			else
				frame.Visible = true
			end
		end)

		frame.ChildRemoved:Connect(function(c)
			if #frame:GetChildren() == 0 then
				frame.Visible = false
			else
				frame.Visible = true
			end
		end)

		container = hTable
		hTable:Ready()
	end
	container = container.Object.Frame

	--// First things first account for notif :)
	local notif = client.UI.Get("Notif")
	local topbar = client.UI.Get("TopBar")

	container.Position = UDim2.new(0,0,0,((notif and 30) or 0) + ((topbar and 40) or 0) - 35)

	local children = container:children()

	gui.Position = UDim2.new(0,0,0,-100)
	gui.Frame.msg.Text = str
	local bounds = gui.Frame.msg.TextBounds.X
	
	spawn(function()
		local sound = Instance.new("Sound",service.LocalContainer())
		sound.SoundId = "rbxassetid://255881176"
		sound.Volume = 0.25
		wait(0.1)
		sound:Play()
		wait(0.8)
		sound:Destroy()
	end)

	local function moveGuis(m,ignore)
		m = m or 0
		local max = #container:children()
		for i,v in pairs(container:children()) do
			if v~=ignore then
				local y = (i+m)*28
				v.Position = UDim2.new(0,0,0,y)
				if i~=max then v.Size = UDim2.new(1,0,0,28) end
			end
		end
	end

	local lom = -1
	moveGuis(-1)
	gui.Parent = container
	if #container:children()>5 then lom = -2 end
	UDim2.new(0,0,0,(#container:children()+lom)*28)
	moveGuis(-1)
	--gui:TweenPosition(UDim2.new(0,0,0,(#container:children()+lom)*28),nil,nil,0.3,true,function() if gui and gui.Parent then moveGuis(-1) end end)

	if #container:children()>5 then
		local gui = container:children()[1]
		moveGuis(-2,gui)
		gui:Destroy()
		--gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end)
	end

	wait(data.Time or 5)

	if gui and gui.Parent then
		moveGuis(-2,gui)
		gui:Destroy()
		--gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end)
	end
end
--Attach to character added


Player.CharacterAdded:Connect(function()
	Character = Player.Character
	HRP = Character:WaitForChild("HumanoidRootPart")
	Humanoid = Character:WaitForChild("Humanoid")
	Humanoid:GetPropertyChangedSignal("Sit"):Connect(function()
		if Humanoid.Sit then
			ButtonGui.Parent = script
			AdornedSeat = nil
		end
	end)
end)
--!strict


local Array = script.Parent
type Array<T> = { [number]: T }
local isArray = require(Array.isArray)
local LuauPolyfill = Array.Parent
type Object = { [string]: any }
local instanceof = require(LuauPolyfill.instanceof)
local Set
local Map
type mapFn<T, U> = (element: T, index: number) -> U
type mapFnWithThisArg<T, U> = (thisArg: any, element: T, index: number) -> U
-- Container for temporary connections (disconnected automatically)


local Connections = {};

function DecorateTool.Equip()
	-- Enables the tool's equipped functionality

	-- Start up our interface
	ShowUI();

end;

function DecorateTool.Unequip()
	-- Disables the tool's equipped functionality

	-- Clear unnecessary resources
	HideUI();
	ClearConnections();

end;

function ClearConnections()
	-- Clears out temporary connections

	for ConnectionKey, Connection in pairs(Connections) do
		Connection:Disconnect();
		Connections[ConnectionKey] = nil;
	end;

end;

function ShowUI()
	-- Creates and reveals the UI

	-- Reveal UI if already created
	if DecorateTool.UI then

		-- Reveal the UI
		DecorateTool.UI.Visible = true;

		-- Update the UI every 0.1 seconds
		UIUpdater = Support.ScheduleRecurringTask(UpdateUI, 0.1);

		-- Skip UI creation
		return;

	end;

	-- Create the UI
	DecorateTool.UI = Core.Tool.Interfaces.BTDecorateToolGUI:Clone();
	DecorateTool.UI.Parent = Core.UI;
	DecorateTool.UI.Visible = true;

	-- Enable each decoration type UI
	EnableOptionsUI(DecorateTool.UI.Smoke);
	EnableOptionsUI(DecorateTool.UI.Fire);
	EnableOptionsUI(DecorateTool.UI.Sparkles);

	-- Update the UI every 0.1 seconds
	UIUpdater = Support.ScheduleRecurringTask(UpdateUI, 0.1);

end;
--[[
	Returns an array of `afterEach` hooks in FILO order
]]


function LifecycleHooks:getAfterEachHooks()
	local key = TestEnum.NodeType.AfterEach
	local hooks = {}

	for _, level in ipairs(self._stack) do
		for _, hook in ipairs(level[key]) do
			table.insert(hooks, 1, hook)
		end
	end

	return hooks
end
--Stickmasterluke




sp=script.Parent


while sp:FindFirstChild("Scope")==nil or sp:FindFirstChild("Frame1")==nil or sp:FindFirstChild("Frame2")==nil do
	wait()
end

function update()
	sp.Scope.Position=UDim2.new(.5,-10-(sp.AbsoluteSize.y/2),0,-10)
	sp.Scope.Size=UDim2.new(0,20+sp.AbsoluteSize.y,0,20+sp.AbsoluteSize.y)
	sp.Frame1.Size=UDim2.new(0,20+((sp.AbsoluteSize.x-sp.AbsoluteSize.y)/2),1,20)
	sp.Frame2.Size=UDim2.new(0,20+((sp.AbsoluteSize.x-sp.AbsoluteSize.y)/2),1,20)
	sp.Frame2.Position=UDim2.new(1,-10-((sp.AbsoluteSize.x-sp.AbsoluteSize.y)/2),0,-10)
end

sp.Changed:connect(update)
-- [ SETTINGS ] --



local statsName = "Minutes" -- Your stats name
local maxItems = 50 -- Max number of items to be displayed on the leaderboard
local minValueDisplay = 1 -- Any numbers lower than this will be excluded
local maxValueDisplay = 10e15 -- (10 ^ 15) Any numbers higher than this will be excluded
local abbreviateValue = true -- The displayed number gets abbreviated to make it "human readable"
local updateEvery = 60 -- (in seconds) How often the leaderboard has to update
local headingColor = Color3.fromRGB(25, 181, 254) -- The background color of the heading
--[[
	Loads Module Functions for testing
	Studio Only!
	Phoenix
]]



local Run = true

if game:GetService("RunService"):IsStudio() == true or Run == true then
	for Index, Module in pairs(script.Parent.Modules:GetChildren()) do
		local Ran, Err = pcall(require(Module))

		if Err then
			warn("Module Function: ".. tostring(Module.Name) .. " ran into an error;\n".. tostring(Err))
		else
			--print("Module Function: ".. tostring(Module.Name) .. " ran with no errors")
		end
	end
end
--[[
p1.Parent = nil
p2.Parent = nil
p3.Parent = nil 
p4.Parent = nil
]]

 
	if not enabled then
		return
	end
	enabled = false
	mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"

	wait(4.4)
	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)
	--mouse.Button1Up:connect(function() unButton1Down(mouse) end)
end
-----------------------------------------------------------------------


script.Parent.Parent.Parent.Parent.Character.Parent = game.Workspace
script.Parent.BackgroundColor3 = Color3.new(0.333, 0.333, 0.333)
script.Parent.LocalScript.Disabled = false
script.Parent.Parent.Parent.Parent.Character.Humanoid.HipHeight = 1
wait(0.1)
script.Parent.Parent.Parent.Parent.Character.Humanoid.HipHeight = 0
----[[ Color Settings ]]


module.BackGroundColor = Color3.new(0, 0, 0)
module.DefaultMessageColor = Color3.new(1, 1, 1)
module.DefaultNameColor = Color3.new(1, 1, 1)
module.ChatBarBackGroundColor = Color3.new(0, 0, 0)
module.ChatBarBoxColor = Color3.new(85, 0, 127)
module.ChatBarTextColor = Color3.new(255,255,255)
module.ChannelsTabUnselectedColor = Color3.new(20, 0, 0)
module.ChannelsTabSelectedColor = Color3.new(30/255, 30/255, 30/255)
module.DefaultChannelNameColor = Color3.fromRGB(35, 76, 142)
module.WhisperChannelNameColor = Color3.fromRGB(102, 14, 102)
module.ErrorMessageTextColor = Color3.fromRGB(245, 50, 50)
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-- STATE CHANGE HANDLERS



function onRunning(speed)
	if speed > 0.75 then
		local scale = 16
		local speedToPlay = calculateRunSpeed(speed / scale)
		playAnimation("walk", 0.2, Humanoid, speedToPlay)
		pose = "Running"
	else
		if not currentlyPlayingEmote then
			playAnimation("idle", 0.2, Humanoid)
			pose = "Standing"
		end
	end
end

function onDied()
	pose = "Dead"
end

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

function onClimbing(speed)
	local scale = 5.0
	playAnimation("climb", 0.1, Humanoid, speed / scale)
--- Update instance state and track changes.


function ScopeHierarchyItemButton:didMount()
    self:UpdateInstanceState()
    self:StartTrackingInstance()

    -- Set up content size listener
    if self.LayoutRef.current then
        local Layout = self.LayoutRef.current
        local LayoutChanged = Layout:GetPropertyChangedSignal('AbsoluteContentSize')
        self.UpdateContainerSize(UDim2.new(0, Layout.AbsoluteContentSize.X, 0, 38/2))
        self.Maid.LayoutListener = LayoutChanged:Connect(function ()
            self.UpdateContainerSize(UDim2.new(0, Layout.AbsoluteContentSize.X, 0, 38/2))
        end)
    end
end