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



This = script.Parent
Lift = This.Parent.Parent.Parent
CustomLabel = require(Lift.CustomLabel)
Characters = require(script.Characters)

CustomText = CustomLabel["CUSTOMFLOORLABEL"]

Lift:WaitForChild("Floor").Changed:connect(function(floor)
  --custom indicator code--
  ChangeFloor(tostring(floor))
end)

function ChangeFloor(SF)
	if CustomText[tonumber(SF)] then
		SF = CustomText[tonumber(SF)]
	end
	SetDisplay(1,(string.len(SF) == 2 and SF:sub(1,1) or "NIL"))		
	SetDisplay(2,(string.len(SF) == 2 and SF:sub(2,2) or SF))
end



function SetDisplay(ID,CHAR)
	if This.Display:FindFirstChild("DIG"..ID) and Characters[CHAR] ~= nil then
 		for i,l in pairs(Characters[CHAR]) do 
			for r=1,7 do	
				This.Display["DIG"..ID]["D"..r].BrickColor = (l:sub(r,r) == "1" and BrickColor.new("Institutional white") or BrickColor.new("Cyan"))
			end
		end
	end
end
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --



Lift:WaitForChild("Direction").Changed:connect(function(val)
	if val == 1 then
		This.Display.ARW1.U1.BrickColor = BrickColor.new("Lime green")
		This.Display.ARW1.U2.BrickColor = BrickColor.new("Lime green")
		This.Display.ARW1.D1.BrickColor = BrickColor.new("Really black")
		This.Display.ARW1.D2.BrickColor = BrickColor.new("Really black")
	elseif val == -1 then
		This.Display.ARW1.U1.BrickColor = BrickColor.new("Really black")
		This.Display.ARW1.U2.BrickColor = BrickColor.new("Really black")
		This.Display.ARW1.D1.BrickColor = BrickColor.new("Really red")
		This.Display.ARW1.D2.BrickColor = BrickColor.new("Really red")
	else
		This.Display.ARW1.U1.BrickColor = BrickColor.new("Really black")
		This.Display.ARW1.U2.BrickColor = BrickColor.new("Really black")
		This.Display.ARW1.D1.BrickColor = BrickColor.new("Really black")
		This.Display.ARW1.D2.BrickColor = BrickColor.new("Really black")
	end
end)
--waitTime = 10 -- DEBUGGING


local regenArea = script.Parent -- Regens Trees based off Regional Areas

while true do
	wait(waitTime)
	-- print "Regenerating!"
	local Trees = regenArea:GetChildren()	
	for i,tree in pairs(Trees) do
		if tree:IsA("Model") and not tree:IsA("Script") then -- Checks if the object is a model
-- << VARIABLES >>


local screen_changing = 0
local initialised = false
local framesToAdapt = {
	[main.gui.MainFrame] = 0.78;
	[main.gui.MenuTemplates.Template5] = 0.78;
	[main.gui.MenuTemplates.Template6] = 0.78;
	[main.gui.MenuTemplates.Template7] = 0.78;
	[main.gui.MenuTemplates.Template9] = 0.78;
	[main.gui.MenuTemplates.Template10] = 1.17;
	[main.gui.MenuTemplates.Template11] = 1.17;
	[main.gui.MenuTemplates.Template12] = 0.78;
	}
local deviceFrameSizes = {
	["Phone"] = 1;
	["Tablet"] = 0.8;
	["Computer"] = 0.6;
	}
-- left and right button actions


btnRight.MouseButton1Click:Connect(function()
	
	local oldScreen = screens[curScreen]
	UITween.fade(oldScreen, 1, 0.5, 0)
	UITween.move(oldScreen, UDim2.new(0.5, -100, 0.5, 0), 0.5, 0)
	
	
	if(curScreen == #screens) then
		curScreen = 0
	end
	
	curScreen = curScreen + 1
	
	local newScreen = screens[curScreen]
	newScreen.Position = UDim2.new(0.5, 100, 0.5, 0)
	UITween.move(newScreen, UDim2.new(0.5, 0, 0.5, 0), 0.5, 0)
	UITween.fade(newScreen, 0, 0.5, 0)
end)

btnLeft.MouseButton1Click:Connect(function()

	local oldScreen = screens[curScreen]
	UITween.fade(oldScreen, 1, 0.5, 0)
	UITween.move(oldScreen, UDim2.new(0.5, 100, 0.5, 0), 0.5, 0)
	
	curScreen = curScreen - 1

	if(curScreen == 0) then
		curScreen = #screens
	end

	local newScreen = screens[curScreen]
	newScreen.Position = UDim2.new(0.5, -100, 0.5, 0)
	UITween.move(newScreen, UDim2.new(0.5, 0, 0.5, 0), 0.5, 0)
	UITween.fade(newScreen, 0, 0.5, 0)
end)
--[[Transmission]]


	Tune.TransModes		= {"Auto", "Semi", "Manual"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 200		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
	
	--Gear Ratios
	Tune.FinalDrive		= 7 			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3   		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3.6   		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		1.65   	    ,
	    --[[ 3 ]]		1.2 	    ,
	    --[[ 4 ]]		0.8 	    ,
	    --[[ 5 ]]		0.6 	    ,
     	--[[ 6 ]]		0.4 	    ,
	} 
	Tune.FDMult			= 1 			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--[[*
 * Scan a glob pattern to separate the pattern into segments.
 *
 * ```js
 * const picomatch = require('picomatch');
 * // picomatch.scan(input[, options]);
 *
 * const result = picomatch.scan('!./foo/*.js');
 * console.log(result);
 * { prefix: '!./',
 *   input: '!./foo/*.js',
 *   start: 3,
 *   base: 'foo',
 *   glob: '*.js',
 *   isBrace: false,
 *   isBracket: false,
 *   isGlob: true,
 *   isExtglob: false,
 *   isGlobstar: false,
 *   negated: true }
 * ```
 * @param {String} `input` Glob pattern to scan.
 * @param {Object} `options`
 * @return {Object} Returns an object with
 * @api public
 ]]



function picomatch.scan(input, options: Object?)
	return scan(input, options)
end
--Replace with the name of the tool in ServerStorage


local giver = script.Parent
local canGive = false

local function GiveTool(player)
	if canGive == false then
		canGive = true
		local clone = tool:Clone()
		clone.Parent = player.Backpack
		wait(1) --The time between times it can be clicked and the tool can be given
		canGive = false
	end
end

giver.ClickDetector.MouseClick:Connect(function(player)
	GiveTool(player)
end)
--add all the parts in the character to charParts, and accessories to accessoryParts


for i, v in pairs(character:GetDescendants()) do
	if v:IsA("BasePart") then
		if v.Name ~= "HumanoidRootPart" then
			table.insert(charParts, v)
		end
		if (v.Name ~= "Torso" or v.Name ~= "UpperTorso") and not v:IsA("Accoutrement") then
			local wrap = nil
			wrap = coroutine.wrap(function()
				task.wait(0.05)
				Weld(Torso, v)
				coroutine.yield(wrap)
			end)()
		end
	end
	--[[if v:IsA("Hat") or v:IsA("Accoutrement") or v:IsA("Accessory") then
		table.insert(charParts, v.Handle)
	end]]
	if v:IsA("CharacterMesh") then
		customPackageMeshes[v.BodyPart.Name] = v.MeshId
	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(5.9)
	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
--	setAnimationSpeed(speed / scale)


	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	if (jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	end
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end
-- Values


local EffectsInstance = Effects.new(Car.Chassis, Car.Effects, Car)
local RayParams = RaycastParams.new()

RayParams.FilterType = Enum.RaycastFilterType.Blacklist
RayParams.FilterDescendantsInstances = {workspace.Officers, workspace.IgnoreRaycast}

local Ignition = true
local RaycastDistance = 5000
local TargetHumanoid: Humanoid = nil

local StuckTick, ReverseTick, Speed = 0, 0, 0
local Reverse = false
--//



function Raycast.new(Params, Penetration, AllowCanCollideFalse, InvisiblePartsBlockRaycast, MaxPenetrations, MinTransparencyToBeInvisible)
	local ray = {}
	ray.Parameters = Params or RaycastParams.new()
	ray.Penetration = Penetration or 0
	ray.AllowCanCollideFalse = AllowCanCollideFalse or false
	ray.InvisiblePartsBlockRaycast = InvisiblePartsBlockRaycast or false
	ray.MaxPenetrations = MaxPenetrations or 1
	ray.MinTransparencyToBeInvisible = MinTransparencyToBeInvisible or 1
	
	return setmetatable(ray,Raycast)
end
--!strict


local function strict(t: { [any]: any }, name: string?)
	-- FIXME Luau: Need to define a new variable since reassigning `name = ...`
	-- doesn't narrow the type
	local newName = name or tostring(t)

	return setmetatable(t, {
		__index = function(_self, key)
			local message = ("%q (%s) is not a valid member of %s"):format(tostring(key), typeof(key), newName)

			error(message, 2)
		end,

		__newindex = function(_self, key, _value)
			local message = ("%q (%s) is not a valid member of %s"):format(tostring(key), typeof(key), newName)

			error(message, 2)
		end,
	})
end

return strict
-- A state object whose value is derived from other objects using a callback.


export type ForKeys<KI, KO, M> = PubTypes.ForKeys<KO, any> & {
	_oldDependencySet: Set<PubTypes.Dependency>,
	_processor: (KI) -> (KO),
	_destructor: (KO, M?) -> (),
	_inputIsState: boolean,
	_inputTable: PubTypes.CanBeState<{ [KI]: KO }>,
	_oldInputTable: { [KI]: KO },
	_outputTable: { [KO]: any },
	_keyOIMap: { [KO]: KI },
	_meta: { [KO]: M? },
	_keyData: {
		[KI]: {
			dependencySet: Set<PubTypes.Dependency>,
			oldDependencySet: Set<PubTypes.Dependency>,
			dependencyValues: { [PubTypes.Dependency]: any },
		},
	},
}
--!strict



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

local userNoUpdateOnLoopSuccess, userNoUpdateOnLoopValue = pcall(function() return UserSettings():IsUserFeatureEnabled("UserNoUpdateOnLoop") end)
local userNoUpdateOnLoop = userNoUpdateOnLoopSuccess and userNoUpdateOnLoopValue

local AnimationSpeedDampeningObject = script:FindFirstChild("ScaleDampeningPercent")
local HumanoidHipHeight = Humanoid.HipHeight

local EMOTE_TRANSITION_TIME = 0.1

local currentAnim = ""
local currentAnimInstance = nil
local currentAnimTrack = nil
local currentAnimKeyframeHandler = nil
local currentAnimSpeed = 1.0

local runAnimTrack = nil
local runAnimKeyframeHandler = nil

local PreloadedAnims = {}

local animTable = {}
local animNames = { 
	idle = 	{	
				{ id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
				{ id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
				{ id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
			},
	walk = 	{ 	
				{ id = "http://www.roblox.com/asset/?id=507777826", weight = 10 } 
			}, 
	run = 	{
				{ id = "http://www.roblox.com/asset/?id=507767714", weight = 10 } 
			}, 
	swim = 	{
				{ id = "http://www.roblox.com/asset/?id=507784897", weight = 10 } 
			}, 
	swimidle = 	{
				{ id = "http://www.roblox.com/asset/?id=507785072", weight = 10 } 
			}, 
	jump = 	{
				{ id = "http://www.roblox.com/asset/?id=507765000", weight = 10 } 
			}, 
	fall = 	{
				{ id = "http://www.roblox.com/asset/?id=507767968", weight = 10 } 
			}, 
	climb = {
				{ id = "http://www.roblox.com/asset/?id=507765644", weight = 10 } 
			}, 
	sit = 	{
				{ id = "http://www.roblox.com/asset/?id=2506281703", weight = 10 } 
			},	
	toolnone = {
				{ id = "http://www.roblox.com/asset/?id=507768375", weight = 10 } 
			},
	toolslash = {
				{ id = "http://www.roblox.com/asset/?id=522635514", weight = 10 } 
			},
	toollunge = {
				{ id = "http://www.roblox.com/asset/?id=522638767", weight = 10 } 
			},
	wave = {
				{ id = "http://www.roblox.com/asset/?id=507770239", weight = 10 } 
			},
	point = {
				{ id = "http://www.roblox.com/asset/?id=507770453", weight = 10 } 
			},
	dance = {
				{ id = "http://www.roblox.com/asset/?id=507771019", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=507771955", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=507772104", weight = 10 } 
			},
	dance2 = {
				{ id = "http://www.roblox.com/asset/?id=507776043", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=507776720", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=507776879", weight = 10 } 
			},
	dance3 = {
				{ id = "http://www.roblox.com/asset/?id=507777268", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=507777451", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=507777623", weight = 10 } 
			},
	laugh = {
				{ id = "http://www.roblox.com/asset/?id=507770818", weight = 10 } 
			},
	cheer = {
				{ id = "http://www.roblox.com/asset/?id=507770677", weight = 10 } 
			},
}
------------------------Checks if the area where the tree is regenerating has parts on it --------------------------


			local p = tree:GetChildren()
			--print (#p)
			local PPC = tree:GetPrimaryPartCFrame()
			--GetPartBoundsInBox Defines
			local filterObjects = {}
			local maxObjectsAllowed = math.huge
			local overlapParams = OverlapParams.new()
			overlapParams.CollisionGroup = "Default"
			overlapParams.FilterDescendantsInstances = filterObjects
			overlapParams.FilterType = Enum.RaycastFilterType.Blacklist
			overlapParams.MaxParts = maxObjectsAllowed
			local boundsbox = Vector3.new(12,31,12)
			local boundsboxCenter = CFrame.new(PPC.X, PPC.Y + 16.5, PPC.Z)
			local regenbox = workspace:GetPartBoundsInBox(boundsboxCenter, boundsbox, overlapParams)
			-- print (#regenbox)
			if #regenbox <= #p then -- Compares the # of parts in the tree model to the amount of parts in the tree model's region
--Sound of Stabbing--



local function AttachParticleControl(source_part)
	
	local prtc = nil
	local prtc2 = nil
	
	local function Start()
		prtc = script.Back:clone()
		prtc.Parent = source_part
		prtc2 = script.Stab: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
-- declarations



local sFallingDown = newSound("rbxasset://sounds/splat.wav")
local sGettingUp = newSound("rbxasset://sounds/action_get_up.mp3")
local sDied = newSound("rbxasset://sounds/uuhhh.mp3") 
local sJumping = newSound("rbxasset://sounds/action_jump.mp3")
local sLanding = newSound("rbxasset://sounds/action_jump_land.mp3")
local sSplash = newSound("rbxasset://sounds/impact_water.mp3")
local sRunning = newSound("rbxasset://sounds/action_footsteps_plastic.mp3")
sRunning.Looped = true
local sSwimming = newSound("rbxasset://sounds/action_swim.mp3")
sSwimming.Looped = true
local sClimbing = newSound("rbxasset://sounds/action_footsteps_plastic.mp3")
sClimbing.Looped = true

local Figure = script.Parent
local Head = waitForChild(Figure, "Head")
local Humanoid = waitForChild(Figure, "Humanoid")

local prevState = "None"
--[[ Local Constants ]]

--
local VR_ANGLE = math.rad(15)
local VR_PANEL_SIZE = 512
local VR_ZOOM = 7
local VR_FADE_SPEED = 10 -- 1/10 second
local VR_SCREEN_EGDE_BLEND_TIME = 0.14
local VR_SEAT_OFFSET = Vector3.new(0,4,0)

local CameraInput = require(script.Parent:WaitForChild("CameraInput"))
local ZoomController = require(script.Parent:WaitForChild("ZoomController"))

local Players = game:GetService("Players")
local player = Players.LocalPlayer

local Lighting = game:GetService("Lighting")
local UserGameSettings = UserSettings():GetService("UserGameSettings")
--[[
	Combine a number of dictionary-like tables into a new table.

	Keys specified in later tables will overwrite keys in previous tables.

	Use `Cryo.None` as a value to remove a key. This is necessary because
	Lua does not distinguish between a value not being present in a table and a
	value being `nil`.
]]


local function join(...)
	local new = {}

	for i = 1, select("#", ...) do
		local source = select(i, ...)

		for key, value in pairs(source) do
			if value == None then
				new[key] = nil
			else
				new[key] = value
			end
		end
	end

	return new
end

return join
---------------
--// Code
---------------


for i,v in pairs(PlayerGui:GetDescendants()) do
	if v:IsA("TextButton") or v:IsA("ImageButton") then
		v.MouseButton1Down:Connect(function()
			game.SoundService.Effects.popDown:Play()
		end)
		v.MouseButton1Up:Connect(function()
			game.SoundService.Effects.popUp:Play()
		end)
	end
end
-- Check for change event in input. Used for thumbstick input as those are analog


userInputService.InputChanged:connect(function(input, processed)
	if input.UserInputType == Enum.UserInputType.Gamepad1 then
		-- Check left thumbstick and move character on change
		if input.KeyCode == Enum.KeyCode.Thumbstick1 then
			character.Humanoid:Move(Vector3.new(input.Position.X, 0, -input.Position.Y), true)
		end
		-- Check right thumbstick and change camera angle on change
		if input.KeyCode == Enum.KeyCode.Thumbstick2 then
			deltaAngle = input.Position.X * 5
		end
	end
end)
-- Functions 



function SPRING.create(self, mass, force, damping, speed)

	local spring	= {
		Target		= Vector3.new();
		Position	= Vector3.new();
		Velocity	= Vector3.new();
		
		Mass		= mass or 5;
		Force		= force or 50;
		Damping		= damping or 4;
		Speed		= speed  or 4;
	}
	
	function spring.shove(self, force)
		local x, y, z	= force.X, force.Y, force.Z
		if x ~= x or x == math.huge or x == -math.huge then
			x	= 0
		end
		if y ~= y or y == math.huge or y == -math.huge then
			y	= 0
		end
		if z ~= z or z == math.huge or z == -math.huge then
			z	= 0
		end
		self.Velocity	= self.Velocity + Vector3.new(x, y, z)
	end
	
	function spring.update(self, dt)
		local scaledDeltaTime = math.min(dt,1) * self.Speed / ITERATIONS
		
		for i = 1, ITERATIONS do
			local iterationForce= self.Target - self.Position
			local acceleration	= (iterationForce * self.Force) / self.Mass
			
			acceleration		= acceleration - self.Velocity * self.Damping
			
			self.Velocity	= self.Velocity + acceleration * scaledDeltaTime
			self.Position	= self.Position + self.Velocity * scaledDeltaTime
		end
		
		return self.Position
	end
	
	return spring
end
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 616		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 7000		--		Use sliders to manipulate values
	Tune.Redline		= 7500		--		Copy and paste slider values into the respective tune values
	Tune.ComfortShift   = 3500
	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)
--// All global vars will be wiped/replaced except script



return function(data, env)
	if env then
		setfenv(1, env)
	end

	local gui = script.Parent.Parent--client.UI.Prepare(script.Parent.Parent)
	local frame = gui.Frame
	local frame2 = frame.Frame
	local msg = frame2.Message
	local ttl = frame2.Title

	local gIndex = data.gIndex
	local gTable = data.gTable

	local title = data.Title
	local message = data.Message
	local scroll = data.Scroll
	local tim = data.Time

	local gone = false

	if not data.Message or not data.Title then gTable:Destroy() end

	ttl.Text = title
	msg.Text = message
	ttl.TextTransparency = 1
	msg.TextTransparency = 1
	ttl.TextStrokeTransparency = 1
	msg.TextStrokeTransparency = 1
	frame.BackgroundTransparency = 1

	local fadeSteps = 10
	local blurSize = 10
	local textFade = 0.1
	local strokeFade = 0.5
	local frameFade = 0.3

	local blurStep = blurSize/fadeSteps
	local frameStep = frameFade/fadeSteps
	local textStep = 0.1
	local strokeStep = 0.1

	local function fadeIn()
		gTable:Ready()
		for i = 1,fadeSteps do
			if msg.TextTransparency>textFade then
				msg.TextTransparency = msg.TextTransparency-textStep
				ttl.TextTransparency = ttl.TextTransparency-textStep
			end
			if msg.TextStrokeTransparency>strokeFade then
				msg.TextStrokeTransparency = msg.TextStrokeTransparency-strokeStep
				ttl.TextStrokeTransparency = ttl.TextStrokeTransparency-strokeStep
			end
			if frame.BackgroundTransparency>frameFade then
				frame.BackgroundTransparency = frame.BackgroundTransparency-frameStep
				frame2.BackgroundTransparency = frame.BackgroundTransparency
			end
			service.Wait("Stepped")
		end
	end

	local function fadeOut()
		if not gone then
			gone = true
			for i = 1,fadeSteps do
				if msg.TextTransparency<1 then
					msg.TextTransparency = msg.TextTransparency+textStep
					ttl.TextTransparency = ttl.TextTransparency+textStep
				end
				if msg.TextStrokeTransparency<1 then
					msg.TextStrokeTransparency = msg.TextStrokeTransparency+strokeStep
					ttl.TextStrokeTransparency = ttl.TextStrokeTransparency+strokeStep
				end
				if frame.BackgroundTransparency<1 then
					frame.BackgroundTransparency = frame.BackgroundTransparency+frameStep
					frame2.BackgroundTransparency = frame.BackgroundTransparency
				end
				service.Wait("Stepped")
			end
			service.UnWrap(gui):Destroy()
		end
	end

	gTable.CustomDestroy = function()
		fadeOut()
	end

	fadeIn()
	if not tim then
		local _,time = message:gsub(" ","")
		time = math.clamp(time/2,4,11)+1
		wait(time)
	else
		wait(tim)
	end
	if not gone then
		fadeOut()
	end
end
--Shockwave--



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

return AttachParticleControl
--[[
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(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)
	--mouse.Button1Up:connect(function() unButton1Down(mouse) end)
end
-------------Motor6Ding Section------------------------



Character.Humanoid.Died:connect(function()
	Stand()
	_G.Proned = false
	_G.Crouched = false
	_G.Sprinting = false
end)

game:GetService("RunService").RenderStepped:connect(function()
	Mouse.TargetFilter = game.Workspace
	if not _G.Viewing then	
	local HRPCF =  HumanoidRootPart.CFrame * CFrame.new(0, 1.5, 0)* CFrame.new(Humanoid.CameraOffset)
	if Lean then
		HRPCF = HRPCF
	end
	Neck.C0 =  Torso.CFrame:toObjectSpace(HRPCF)
	Neck.C1 =  CFrame.Angles(-math.asin(Camera.CoordinateFrame.lookVector.y), 0, 0) 
	elseif _G.Viewing then	
	Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
	Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
	end
	if player.PlayerScripts.CameraScript.RootCamera:FindFirstChild("Sensitivity") then
		if Aiming then
			player.PlayerScripts.CameraScript.RootCamera.Sensitivity.Value = Player.PlayerGui.MouseSensitivity.Frame.Data.Value
		else
			player.PlayerScripts.CameraScript.RootCamera.Sensitivity.Value = 1
		end
	Mouse.Button2Down:connect(function()
		if not Aiming then
			Aiming = true
		end
	end)
	Mouse.Button2Up:connect(function()
		if Aiming then
			Aiming = false
		end
	end)	
	end
end)