Roblox/luau_corpus huggingface dataset:
-- Initialize the tool
local RotateTool = {
	Name = 'Rotate Tool';
	Color = BrickColor.new 'Bright green';

	-- Default options
	Increment = 15;
	Pivot = 'Center';
}

RotateTool.ManualText = [[<font face="GothamBlack" size="16">Rotate Tool  🛠</font>
Allows you to rotate parts.<font size="12"><br /></font>
<font size="12" color="rgb(150, 150, 150)"><b>Pivot</b></font>
This option lets you choose what to rotate the parts around.<font size="6"><br /></font>
 <font color="rgb(150, 150, 150)">•</font>  <b>CENTER</b> <font color="rgb(150, 150, 150)">—</font> Relative to the <b>center of the selection</b>
 <font color="rgb(150, 150, 150)">•</font>  <b>LOCAL</b> <font color="rgb(150, 150, 150)">—</font> Each part around its <b>own center</b>
 <font color="rgb(150, 150, 150)">•</font>  <b>LAST</b> <font color="rgb(150, 150, 150)">—</font> Relative to the <b>center of the last part clicked</b><font size="6"><br /></font>

<b>TIP:</b> Click on any part to focus the handles on it.<font size="6"><br /></font>
<b>TIP: </b>Hit the <b>Enter</b> key to switch between Pivot modes quickly.<font size="12"><br /></font>

<font size="12" color="rgb(150, 150, 150)"><b>Increment</b></font>
Lets you choose how many degrees to rotate by.<font size="6"><br /></font>

<b>TIP: </b>Hit the – key to quickly type increments.<font size="6"><br /></font>

<b>TIP: </b>Use your number pad to rotate exactly by the current increment. Holding <b>Shift</b> reverses the increment.<font size="4"><br /></font>
   <font color="rgb(150, 150, 150)">•</font>  4 & 6 — Y axis (green)
   <font color="rgb(150, 150, 150)">•</font>  1 & 9 — Z axis (blue)
   <font color="rgb(150, 150, 150)">•</font>  2 & 8 — X axis (red)<font size="12"><br /></font>

<font size="12" color="rgb(150, 150, 150)"><b>Snapping</b></font>
Press <b><i>R</i></b> and click on a part's <b>snap point</b> to rotate around it.
]]
---------------
--// Functions
---------------
local function dayMode()
	
end

local function nightMode()
	
end
-- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}

math.randomseed(tick())

function findExistingAnimationInSet(set, anim)
	if set == nil or anim == nil then
		return 0
	end
	
	for idx = 1, set.count, 1 do 
		if set[idx].anim.AnimationId == anim.AnimationId then
			return idx
		end
	end
	
	return 0
end

function configureAnimationSet(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 = {}

	local allowCustomAnimations = true

	local success, msg = pcall(function() allowCustomAnimations = game:GetService("StarterPlayer").AllowCustomAnimations end)
	if not success then
		allowCustomAnimations = true
	end

	-- check for config values
	local config = script:FindFirstChild(name)
	if (allowCustomAnimations and config ~= nil) then
		table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
		table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
		
		local idx = 0
		for _, childPart in pairs(config:GetChildren()) do
			if (childPart:IsA("Animation")) then
				local newWeight = 1
				local weightObject = childPart:FindFirstChild("Weight")
				if (weightObject ~= nil) then
					newWeight = weightObject.Value
				end
				animTable[name].count = animTable[name].count + 1
				idx = animTable[name].count
				animTable[name][idx] = {}
				animTable[name][idx].anim = childPart
				animTable[name][idx].weight = newWeight
				animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
				table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
				table.insert(animTable[name].connections, childPart.ChildAdded:connect(function(property) configureAnimationSet(name, fileList) end))
				table.insert(animTable[name].connections, childPart.ChildRemoved:connect(function(property) configureAnimationSet(name, fileList) end))
			end
		end
	end
	
	-- fallback to defaults
	if (animTable[name].count <= 0) then
		for idx, anim in pairs(fileList) do
			animTable[name][idx] = {}
			animTable[name][idx].anim = Instance.new("Animation")
			animTable[name][idx].anim.Name = name
			animTable[name][idx].anim.AnimationId = anim.id
			animTable[name][idx].weight = anim.weight
			animTable[name].count = animTable[name].count + 1
			animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
		end
	end
	
	-- preload anims
	for i, animType in pairs(animTable) do
		for idx = 1, animType.count, 1 do
			if PreloadedAnims[animType[idx].anim.AnimationId] == nil then
				Humanoid:LoadAnimation(animType[idx].anim)
				PreloadedAnims[animType[idx].anim.AnimationId] = true
			end				
		end
	end
end
--partClone.Anchored = true --NOTE: DOES NOT WORK if part is anchored!
DebrisService:AddItem(partClone, 0.1)
partClone.Parent = Workspace
partClone.Touched:connect(OnTouched)
--Variables
local Seats = {}
local EnterKeyDown = false
local AdornedSeat = nil
--// Handling Settings		
	Firerate = 60 / 1000; -- 60 = 1 Minute, 1000 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 2; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
--[[
TheNexusAvenger

Runs the fire animation.
--]]

local Resources = require(script.Parent)
local Configuration = require(Resources:GetResource("Configuration"))

local ANIMATION_TIME = Configuration.ANIMATION_TIME
local ANIMATION_DELAY_TIME = Configuration.ANIMATION_DELAY_TIME
local RELOAD_TIME = Configuration.RELOAD_TIME



local EggCreator = {}

local Tool = script.Parent.Parent
local Egg = Tool:WaitForChild("Egg")
local Body = Tool:WaitForChild("Body")
local ReleaseMotor = Body:WaitForChild("Release")
--- Handler

function Module.Start()
	RunService:BindToRenderStep("ViewportResizer", Enum.RenderPriority.Camera.Value + 1, function()
		Camera.CFrame = Camera.CFrame * Module._getOffset()
	end)
end

function Module.Stop()
	RunService:UnbindFromRenderStep("ViewportResizer")
end

return Module
-- enumName, enumValue, additionalProperty
return {
	{"WholeBody", 1}, -- Multiple checks will be casted over an entire players character
	{"Centre", 2}, -- A singular check will be performed on the players HumanoidRootPart
	--{"Automatic", 3}, -- REMOVED DUE TO UNECESSARY COMPLEXITY. ZonePlus will dynamically switch between 'WholeBody' and 'Centre' depending upon the number of players in a server (this typically only occurs for servers with 100+ players when volume checks begin to exceed 0.5% in script performance).
}
----- EXAMPLE CODE -----
local weldList1 = WeldAllToPart(P, P.Engine) -- Weld a model, returns a list of welds.
UnanchorWeldList(weldList1) -- Unanchores the list of welds given.

script:Destroy() -- Clean up this script.
-- When a player clicks on the sphere, they will be asked if they wish to purchase the DevProduct
script.Parent.ClickDetector.MouseClick:connect(function(player)
	Game:GetService("MarketplaceService"):PromptProductPurchase(player, bloxyColaId)
end)
-- Initialize resize tool
local ResizeTool = require(CoreTools.ResizeTool)
Core.AssignHotkey('X', Core.Support.Call(Core.EquipTool, ResizeTool));
Core.Dock.AddToolButton(Core.Assets.ResizeIcon, 'X', ResizeTool, 'ResizeInfo');
--Loop For Making Rays For The Bullet's Trajectory
for i = 1, 30 do
	local thisOffset = offset + Vector3.new(0, yOffset*(i-1), 0)
	local travelRay = Ray.new(point1,thisOffset)
	local hit, position = workspace:FindPartOnRay(travelRay, parts.Parent)

	local distance 		= (position - point1).magnitude
	round.Size				= Vector3.new(.6, distance, .6)
	round.CFrame			= CFrame.new(position, point1)
								* CFrame.new(0, 0, -distance/2)
								* CFrame.Angles(math.rad(90),0,0)
	round.Parent			= workspace
	point1					= point1 + thisOffset
	
	

	if hit then
		round:remove()
		local e = Instance.new("Explosion")
		e.BlastRadius = 5
		e.BlastPressure = 0
		e.Position = position
		e.Parent = workspace
		e.DestroyJointRadiusPercent = 0
		
		

			if hit and hit.Parent then
		if hit.Parent:FindFirstChild("Humanoid") then
			return hit.Parent.Humanoid
		elseif hit.Parent.Parent:FindFirstChild("Humanoid") then
			return hit.Parent.Parent.Humanoid
		
		elseif (hit.Parent.Name ==  "Hull") or (hit.Parent.Name ==  "Turret") or (hit.Parent.Name ==  "Gun") or (hit.Parent.Name ==  "Parts") then
			print("You Have Damaged a Vehicle")
			local HitSound = hit.Parent:findFirstChild("Pen"):Clone()
			HitSound.Parent = hit
			HitSound:Play()
			hit.Parent.Parent:findFirstChild("Damage").Value = hit.Parent.Parent:findFirstChild("Damage").Value - dealingdamage
			if hit.Parent.Parent:findFirstChild("Damage").Value<1 and hit.Parent.Parent:findFirstChild("Destroyed").Value == false then
				
			local DestroyScript = hit.Parent.Parent:findFirstChild("DestroyScript"):clone()
			DestroyScript.Parent = hit.Parent.Parent
			DestroyScript.Disabled = false		
		
			print("Vehicle Disabled")
		
		
			end

		elseif hit.Name == "Left Arm" or hit.Name == "Left Leg" or hit.Name == "Right Arm" or hit.Name == "Right Leg" or hit.Name == "Torso" or hit.Name == "HumanoidRootPart" then
			hit.Parent:findFirstChild("Humanoid").Health = hit.Parent:findFirstChild("Humanoid").Health - dealingdamage
			print("Direct Hit a Player lmao")
			
		elseif hit.Parent.Name == "Face" then
			hit.Parent.Parent:findFirstChild("Humanoid").Health = hit.Parent.Parent:findFirstChild("Humanoid").Health - dealingdamage
			print("Direct Hit a Morph of a Player lmao")
			
				
			
		end
		end

		

		local players = game.Players:getChildren()
		for i = 1, #players do
		
			
			-- if players[i].TeamColor ~= script.Parent.Parent.Tank.Value then --if he's not an ally
				character = players[i].Character
				torso = character:findFirstChild'Torso'
				if character and torso then
						
						torsoPos = torso.Position
						origPos = round.Position
						
						local ray = Ray.new(origPos, torsoPos-origPos)
						local hit, position = game.Workspace:FindPartOnRayWithIgnoreList(ray,ignoreList)
						if hit then
							if hit.Parent == character then
								human = hit.Parent:findFirstChild("Humanoid")
								human2 = hit.Parent.Parent:findFirstChild("Humanoid")
								if human then
									distance = (position-origPos).magnitude
--[[
    A Base State class with boilerplate enter and leave functions. Streamlines State scripts.
]]
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local ClassUtils = require(ReplicatedStorage.Dependencies.LuaUtils.ClassUtils)
local Logger = require(ReplicatedStorage.Dependencies.GameUtils.Logger)

local BaseState = ClassUtils.makeClass("BaseState")
--[ Hooks ]--
-- Controls
Mouse.KeyDown:connect(function(Key)
	if (Hold ~= nil) then return end
	if (string.upper(Key) ~= "C") and (string.lower(Key) ~= " ") then return end
	Hold = true

	if (Torso:FindFirstChild("LegWeld") == nil) and (string.lower(Key) ~= " ") then
		-- Right Leg
		RH.Part1 = nil
		CreateWeld(RL, CFrame.new(-0.5, 0.495, 1.25)* CFrame.Angles(math.rad(90), 0, 0))

		-- Left Leg
		LH.Part1 = nil
		CreateWeld(LL, CFrame.new(0.5, 0.495, 1.25) * CFrame.Angles(math.rad(90), 0, 0))
		
		-- Lower Character
		RJ.C0 = CFrame.new(0, -1.25, 0) * CFrame.Angles(0, 0, 0)
		RJ.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
		
		-- Slow Walk Speed
		Humanoid.WalkSpeed = 5
	else
		StandUp()

		-- Normal Walk Speed
		Humanoid.WalkSpeed = 16
	end

	wait(0.5)

	Hold = nil
end)

Mouse.KeyUp:connect(function(Key)
	if (Hold ~= nil) then return end
	if (string.upper(Key) ~= "C") or (HoldKey.Value == false) then return end
	Hold = true

	StandUp()

	-- Normal Walk Speed
	Humanoid.WalkSpeed = 16

	wait(0.5)

	Hold = nil
end)
--// Give the Tool to the Player
local GiveTool = function(Player, ToolName, Retain)
	local Tool = GetTool(ToolName)
	
	if Retain == true then
		Tool:Clone().Parent = Player:WaitForChild("StarterGear")
	end
	
	Tool.Parent = Player:WaitForChild("Backpack")
end
--- Alias for DoCleaning()
-- @function Destroy
Maid.destroy = Maid.doCleaning
Maid.clean = Maid.doCleaning

return Maid
--[[
	Get the afterAll hooks from the current level.
]]
function LifecycleHooks:getAfterAllHooks()
	return self._stack[#self._stack][TestEnum.NodeType.AfterAll]
end

function LifecycleHooks:_getHooksOfType(nodes, key)
	local hooks = {}

	for _, node in ipairs(nodes) do
		if node.type == key then
			table.insert(hooks, node.callback)
		end
	end

	return hooks
end

return LifecycleHooks
--// Services
local L_95_ = game:GetService('RunService').RenderStepped
local L_96_ = game:GetService('UserInputService')
--[[
	Assert that our expectation value is truthy
]]
function Expectation:ok()
	local result = (self.value ~= nil) == self.successCondition

	local message = formatMessage(self.successCondition,
		("Expected value %q to be non-nil"):format(
			tostring(self.value)
		),
		("Expected value %q to be nil"):format(
			tostring(self.value)
		)
	)

	assertLevel(result, message, 3)
	self:_resetModifiers()

	return self
end
-----------------
--| Constants |--
-----------------

local BLAST_RADIUS = 6
local BLAST_PRESSURE = 750000
-- declarations

local sDied = newSound("rbxasset://sounds/uuhhh.wav")
local sFallingDown = newSound("rbxasset://sounds/splat.wav")
local sFreeFalling = newSound("rbxasset://sounds/swoosh.wav")
local sGettingUp = newSound("rbxasset://sounds/hit.wav")
local sJumping = newSound("rbxasset://sounds/button.wav")
local sRunning = newSound("rbxasset://sounds/bfsl-minifigfoots1.mp3")
sRunning.Looped = true

local Figure = script.Parent
local Head = waitForChild(Figure, "Head")
local Humanoid = waitForChild(Figure, "Humanoid")
--[[ The Module ]]--
local BaseOcclusion = {}
BaseOcclusion.__index = BaseOcclusion
setmetatable(BaseOcclusion, {
	__call = function(_, ...)
		return BaseOcclusion.new(...)
	end
})

function BaseOcclusion.new()
	local self = setmetatable({}, BaseOcclusion)
	return self
end
-- Player's tank GUI
GUI = script.Parent.Parent.Parent.PlayerGui.TankGUI;
GUI.HP.Hitpoints.Text = parts.Parent:findFirstChild("Damage").Value

local Hull = parts.Parent:findFirstChild("Damage")

if Hull.Value<0 then
	GUI.HP.Hitpoints.Text = "DISABLED"
end

	
local MGDamage = math.random(35,45)


braking = false;
firingMg = false;
reloading = false;
currRound = tankStats.Round; -- Current loaded ammo (AP/HE)


myMouse = nil;

function updateAmmo()
	GUI.Ammo.Text = "Cannon Ammo = " .. tankStats[tankStats.Round.Value .. "Ammo"].Value;
	GUI.MG_Ammo.Text = tankStats.MGAmmo.Value;
	GUI.HP.Hitpoints.Text = parts.Parent:findFirstChild("Damage").Value
end


function Brakes()
	for i = 1, 5 do
	parts.Engine.BodyVelocity.Velocity = Vector3.new(0,0,0)
	print("Brakes activated")
	end
end
-- VARIABLES --
local Player = Players.LocalPlayer
local Character
local Humanoid
local HRP
local Tool = script.Parent

local attackRemote = script:WaitForChild("Attack")
local Equipped = script:WaitForChild("Equipped")
--[[
	
	USAGE EXAMPLE:
	
		--------
		local dataStoreService = game:GetService("DataStoreService")
		
		-- Mock service if the game is offline:
		if (game.PlaceId == 0) then
			dataStoreService = require(game.ServerStorage.MockDataStoreService)
		end
		
		-- dataStoreService will act exactly like the real one
		--------
	
	The mocked data store service should function exactly like the
	real service. What the mocked service does is "override" the
	core methods, such as GetAsync. If you try to index a property
	that hasn't been overridden (such as dataStoreService.Name), it
	will reference the actual property in the real dataStoreService.
	
	NOTE:
		This has been created based off of the DataStoreService on
		August 20, 2014. If a change has been made to the service,
		this mocked version will not reflect the changes.
	
--]]



local DataStoreService = {}
local API = {}
local MT = {}
-- !!! PUT ME IN STARTERPLAYERSCRIPTS !!! PUT ME IN STARTERPLAYERSCRIPTS !!! PUT ME IN STARTERPLAYERSCRIPTS !!! PUT ME IN STARTERPLAYERSCRIPTS !!! PUT ME IN STARTERPLAYERSCRIPTS !!!

local ts = game:GetService("TweenService")
--Automatic Settings
Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
Tune.AutoUpThresh	= -500		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
Tune.AutoDownThresh = 2400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
--// SS3 controls for AC6 by Itzt, originally for 2014 Infiniti QX80. i don't know how to tune ac lol
 
wait(0.1)
local player = game.Players.LocalPlayer
local HUB = script.Parent.HUB
local TR = script.Parent.Tracker
local limitButton = HUB.Name
local lightOn = false
local Camera = game.Workspace.CurrentCamera
local cam = script.Parent.nxtcam.Value
local carSeat = script.Parent.CarSeat.Value
local mouse = game.Players.LocalPlayer:GetMouse()
local windows = false
local winfob = HUB.Parent.Windows
-- Note: DotProduct check in CoordinateFrame::lookAt() prevents using values within about
-- 8.11 degrees of the +/- Y axis, that's why these limits are currently 80 degrees
local MIN_Y = math.rad(-80)
local MAX_Y = math.rad(80)

local VR_ANGLE = math.rad(15)
local VR_LOW_INTENSITY_ROTATION = Vector2.new(math.rad(15), 0)
local VR_HIGH_INTENSITY_ROTATION = Vector2.new(math.rad(45), 0)
local VR_LOW_INTENSITY_REPEAT = 0.1
local VR_HIGH_INTENSITY_REPEAT = 0.4

local ZERO_VECTOR2 = Vector2.new(0,0)
local ZERO_VECTOR3 = Vector3.new(0,0,0)

local SEAT_OFFSET = Vector3.new(0,5,0)
local VR_SEAT_OFFSET = Vector3.new(0,4,0)
local HEAD_OFFSET = Vector3.new(0,1.5,0)
local R15_HEAD_OFFSET = Vector3.new(0, 1.5, 0)
local R15_HEAD_OFFSET_NO_SCALING = Vector3.new(0, 2, 0)
local HUMANOID_ROOT_PART_SIZE = Vector3.new(2, 2, 1)

local GAMEPAD_ZOOM_STEP_1 = 0
local GAMEPAD_ZOOM_STEP_2 = 10
local GAMEPAD_ZOOM_STEP_3 = 20

local ZOOM_SENSITIVITY_CURVATURE = 0.5
local FIRST_PERSON_DISTANCE_MIN = 0.5

local Util = require(script.Parent:WaitForChild("CameraUtils"))
local ZoomController = require(script.Parent:WaitForChild("ZoomController"))
local CameraToggleStateController = require(script.Parent:WaitForChild("CameraToggleStateController"))
local CameraInput = require(script.Parent:WaitForChild("CameraInput"))
local CameraUI = require(script.Parent:WaitForChild("CameraUI"))
--local PathLib = require(game.ServerStorage.PathfindingLibrary).new()
local HumanoidList = require(game.ServerStorage.ROBLOX_HumanoidList)
local AIUtilities = require(game.ServerStorage.ROBLOX_AIUtilities)

local ZombieAI = {}

function updateDisplay(display, state)
	local thread = coroutine.create(function()
		while true do
			wait()
			if state then
				display.Text = state.Name
			end
		end
	end)
	coroutine.resume(thread)
end

ZombieAI.new = function(model)	
	local zombie = {}	
	
	-- CONFIGURATION VARIABLES
-- functions

function onDied()
	stopLoopedSounds()
	sDied:Play()
end

local fallCount = 0
local fallSpeed = 0
function onStateFall(state, sound)
	fallCount = fallCount + 1
	if state then
		sound.Volume = 0
		sound:Play()
		Spawn( function()
			local t = 0
			local thisFall = fallCount
			while t < 1.5 and fallCount == thisFall do
				local vol = math.max(t - 0.3 , 0)
				sound.Volume = vol
				wait(0.1)
				t = t + 0.1
			end
		end)
	else
		sound:Stop()
	end
	fallSpeed = math.max(fallSpeed, math.abs(Head.Velocity.Y))
end


function onStateNoStop(state, sound)
	if state then
		sound:Play()
	end
end


function onRunning(speed)
	sClimbing:Stop()
	sSwimming:Stop()
	if (prevState == "FreeFall" and fallSpeed > 0.1) then
		local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
		sLanding.Volume = vol
		sLanding:Play()
		fallSpeed = 0
	end
	if speed>0.5 then
		sRunning:Play()
		sRunning.Pitch = 1.6
	else
		sRunning:Stop()
	end
	prevState = "Run"
end

function onSwimming(speed)
	if (prevState ~= "Swim" and speed > 0.1) then
		local volume = math.min(1.0, speed / 350)
		sSplash.Volume = volume
		sSplash:Play()
		prevState = "Swim"
	end
	sClimbing:Stop()
	sRunning:Stop()
	sSwimming.Pitch = 1.6
	sSwimming:Play()
end

function onClimbing(speed)
	sRunning:Stop()
	sSwimming:Stop()	
	if speed>0.01 then
		sClimbing:Play()
		sClimbing.Pitch = speed / 5.5
	else
		sClimbing:Stop()
	end
	prevState = "Climb"
end
-- Disconnect all handlers. Since we use a linked list it suffices to clear the
-- reference to the head handler.
--[=[
	Disconnects all connections from the signal.
	```lua
	signal:DisconnectAll()
	```
]=]
function Signal:DisconnectAll()
	local item = self._handlerListHead
	while item do
		item.Connected = false
		item = item._next
	end
	self._handlerListHead = false
end
--frame:WaitForChild("Listen").MouseButton1Click:connect(function()
	--local input = tonumber(frame:WaitForChild("Input").Text)
	--if input then
		--sound:Stop()
		--sound.SoundId=Format:gsub("##ID##", tostring(input))
		--sound:Play()
	--end
-- SERVICES --
local TS = game:GetService("TweenService")
local CS = game:GetService("CollectionService")
local RS = game:GetService("ReplicatedStorage")
local PS = game:GetService("PhysicsService")
local UIS = game:GetService("UserInputService")
local Players = game:GetService("Players")
--Private functions
local function IsInFrame(v)

	local X = Mouse.X
	local Y = Mouse.Y

	if X>v.AbsolutePosition.X and Y>v.AbsolutePosition.Y and X<v.AbsolutePosition.X+v.AbsoluteSize.X and Y<v.AbsolutePosition.Y+v.AbsoluteSize.Y then
		return true
	else 
		return false
	end
end

local function CheckMouseExited(Object)

	if not Object.MouseIsInFrame and Object.MouseWasIn then --Mouse was previously over object, fire leave event
		Object.MouseWasIn = false
		Object.LeaveEvent:Fire()
	end
end


local function CheckMouseEntered(Object)
	if Object.MouseIsInFrame and not Object.MouseWasIn then
		Object.MouseWasIn = true
		Object.EnteredEvent:Fire()
	end
end

game:GetService("RunService").Heartbeat:Connect(function()
	--Check each UI object
	--All exit events fire before all enter events for ease of use, so check for mouse exit events here
	for _, Object in pairs(CurrentItems) do
		Object.MouseIsInFrame = IsInFrame(Object.UIObj)
		CheckMouseExited(Object)
	end

	--Now check if the mouse entered any frames
	for _, Object in pairs(CurrentItems) do
		CheckMouseEntered(Object)
	end
end)
--CONFIG VARIABLES
local tweenTime = 4
local closeWaitTime = 3
local easingStyle = Enum.EasingStyle.Quad
local easingDirection = Enum.EasingDirection.InOut
local repeats = 0
local reverse = false
local delayTime = 0
------Modules------
local modules = script.Parent.Parent.Modules
local core = require(modules.CoreModule)
local actions = require(modules.ActionsModule)
local combat = require(modules.CombatModule)
local targeting = require(modules.TargetModule)
local movement = require(modules.MovementModule)
local status = require(modules.Status)
local troubleshoot = require(modules.Troubleshoot)