Roblox/luau_corpus huggingface dataset:
--- Wait for fire to be called, and return the arguments it was given.
-- @treturn ... Variable arguments from connection
function Signal:Wait()
	self._bindableEvent.Event:Wait()
	assert(self._argData, "Missing arg data, likely due to :TweenSize/Position corrupting threadrefs.")
	return unpack(self._argData, 1, self._argCount)
end
---Drivetrain Initialize
local wDia = 0
local Drive={}
if _Tune.Config == "FWD" or _Tune.Config == "AWD" then
	for i,v in pairs(car.Wheels:GetChildren()) do
		if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
			table.insert(Drive,v)
		end
	end
end
if _Tune.Config == "RWD" or _Tune.Config == "AWD" then
	for i,v in pairs(car.Wheels:GetChildren()) do
		if v.Name=="RL" or v.Name=="RR" or v.Name=="R" then
			table.insert(Drive,v)
		end
	end
end
for i,v in pairs(Drive) do
	if v.Size.x>wDia then wDia = v.Size.x end
end

for i,v in pairs(car.Wheels:GetChildren()) do
	if math.abs(v["#AV"].maxTorque.Magnitude-_Tune.PBrakeForce)<1 then
		_PBrake=true
	end
end
------------------------------------------
gui.Track.Text = radio.TName.Value
radio.TName.Changed:connect(function()
	gui.Track.Text = radio.TName.Value
	seat.Parent.Body.Dash.S.G.Song.Text = radio.TName.Value
	seat.Parent.Body.Dash.S0.G.Song.Text = radio.TName.Value
	seat.Parent.Body.Dash.S1.G.Song.Text = radio.TName.Value
end)
gui.Stop.MouseButton1Click:connect(function()
	if radio.Stopped.Value == false then
		radio.Stopped.Value = true
	end
end)
gui.Pause.MouseButton1Click:connect(function()
	if radio.Paused.Value == false and radio.Stopped.Value == false then
		radio.Paused.Value = true
	end
end)
gui.Play.MouseButton1Click:connect(function()
	if radio.Stopped.Value == true then
		radio.Play.Value = not radio.Play.Value
	else
		if radio.Paused.Value == true then
			radio.Paused.Value = false
		end
	end
end)
gui.Forward.MouseButton1Click:connect(function()
	local n = radio.Track.Value+1
	if n>#radio.Songs:GetChildren() then
		n = 1
	end
	radio.Track.Value = n
end)
gui.Back.MouseButton1Click:connect(function()
	local n = radio.Track.Value-1
	if n<=0 then
		n = #radio.Songs:GetChildren()
	end
	radio.Track.Value = n
end)
gui.AutoplayOn.MouseButton1Click:connect(function()
	if radio.Autoplay.Value == true then
		radio.Autoplay.Value = false
	end
end)
gui.AutoplayOff.MouseButton1Click:connect(function()
	if radio.Autoplay.Value == false then
		radio.Autoplay.Value = true
	end
end)
gui.List.MouseButton1Click:connect(function()
	gui.Menu.Visible=not gui.Menu.Visible
end)
gui.Id.MouseButton1Click:connect(function()
	gui.IdPlayer.Visible=not gui.IdPlayer.Visible
	if gui.IdPlayer.Visible then gui.Id.Rotation=180 else gui.Id.Rotation=0 end
end)
gui.IdPlayer.Play.MouseButton1Click:connect(function()
	if radio.IdPlay.Value==gui.IdPlayer.TextBox.Text then
		radio.IdPlay.Value=""
	wait()
	end
	radio.IdPlay.Value=gui.IdPlayer.TextBox.Text
end)
for i,v in pairs(gui.Menu:GetChildren()) do
	v.MouseButton1Click:connect(function()
		radio.Track.Value = i
	end)
end
function Stopped()
	if radio.Stopped.Value == true then
		gui.Pause.Visible = false
		gui.Play.Visible = true
	else
		gui.Play.Visible = false
		gui.Pause.Visible = true
	end
end
function Paused()
	if radio.Paused.Value == true then
		gui.Pause.Visible = false
		gui.Play.Visible = true
	else
		if radio.Stopped.Value == false then
			gui.Play.Visible = false
			gui.Pause.Visible = true
		end
	end
end
function Autoplay()
	if radio.Autoplay.Value == true then
		gui.AutoplayOff.Visible = false
		gui.AutoplayOn.Visible = true
	else
		gui.AutoplayOn.Visible = false
		gui.AutoplayOff.Visible = true
	end
end
radio.Stopped.Changed:connect(Stopped)
radio.Paused.Changed:connect(Paused)
radio.Autoplay.Changed:connect(Autoplay)
Stopped()
Paused()
Autoplay()
while wait(.5) do
	if seat:FindFirstChild("SeatWeld") == nil then
		script.Parent:Destroy()
	end
end
--Evento del ProximityPrompt
Proximity.Triggered:Connect(function(Players)
	
	
	if open == false then
		open = true
		OpenSound:Play()
		Proximity.ActionText = "Close"
		for i = 1, 20 do 
			Proximity.MaxActivationDistance = 0
			script.Parent.Parent:SetPrimaryPartCFrame(PrimaryPart.CFrame*CFrame.Angles(0, math.rad(5), 0))
			wait()
			Proximity.MaxActivationDistance = 10
		end
	else
		open = false
		CloseSound:Play()
		Proximity.ActionText = "Open"
		for i = 1, 20 do
			Proximity.MaxActivationDistance = 0
			script.Parent.Parent:SetPrimaryPartCFrame(PrimaryPart.CFrame*CFrame.Angles(0, math.rad(-5), 0))
			wait()
			Proximity.MaxActivationDistance = 10
		end
	end
	
end)
--Plot Current Horsepower
function GetCurve(x,gear)
	local hp=math.max((FGC(x)*_Tune.Horsepower)/PeakFGC,0)
	return hp,hp*(_Tune.EqPoint/x)*_Tune.Ratios[gear+2]*fFD*hpScaling
end
-- float rd_flt_le(string src, int s)
-- @src - Source binary string
-- @s - Start index of little endian float
local function rd_flt_le(src, s) return rd_flt_basic(src:byte(s, s + 3)) end
--[[	
	Main RenderStep Update. The camera controller and occlusion module both have opportunities
	to set and modify (respectively) the CFrame and Focus before it is set once on CurrentCamera.
	The camera and occlusion modules should only return CFrames, not set the CFrame property of
	CurrentCamera directly.	
--]]
function CameraModule:Update(dt)
	if self.activeCameraController then
		local newCameraCFrame, newCameraFocus = self.activeCameraController:Update(dt)
		self.activeCameraController:ApplyVRTransform()
		if self.activeOcclusionModule then
			newCameraCFrame, newCameraFocus = self.activeOcclusionModule:Update(dt, newCameraCFrame, newCameraFocus)
		end
		
		-- Here is where the new CFrame and Focus are set for this render frame
		game.Workspace.CurrentCamera.CFrame = newCameraCFrame
		game.Workspace.CurrentCamera.Focus = newCameraFocus
		
		-- Update to character local transparency as needed based on camera-to-subject distance
		if self.activeTransparencyController then
			self.activeTransparencyController:Update()
		end
	end
end
--health.Changed:connect(function()
--root.Velocity = Vector3.new(0,5000,0)
--end)

local anims = {}
local lastAttack= tick()

local target,targetType

local lastLock = tick()

local fleshDamage = 30
local structureDamage = 25

local path = nil


for _,animObject in next,animations do
anims[animObject.Name] = hum:LoadAnimation(animObject)
end

function Attack(thing,dmg)
if tick()-lastAttack > 2 then
hum:MoveTo(root.Position)
lastAttack = tick()
anims.AntWalk:Stop()
anims.AntMelee:Play()

if thing.ClassName == "Player" then
root.FleshHit:Play()
ant:SetPrimaryPartCFrame(CFrame.new(root.Position,Vector3.new(target.Character.PrimaryPart.Position.X,root.Position.Y,target.Character.PrimaryPart.Position.Z)))

elseif thing.ClassName == "Model" then
root.StructureHit:Play()
end

rep.Events.NPCAttack:Fire(thing,dmg) 
end
end


function Move(point)
hum:MoveTo(point)
if not anims.AntWalk.IsPlaying then
anims.AntWalk:Play()
end
end

function ScanForPoint()
local newPoint
local rayDir = Vector3.new(math.random(-100,100)/100,0,math.random(-100,100)/100)
local ray = Ray.new(root.Position,rayDir*math.random(10,50),ant)
local part,pos = workspace:FindPartOnRay(ray)
Move(pos)
enRoute = true
end
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]

local mouse = game.Players.LocalPlayer:GetMouse()
local car = script.Parent.Car.Value
local horn = car.DriveSeat:WaitForChild("Horn")
local FE = workspace.FilteringEnabled
local handler = car:WaitForChild("Horn_FE")

mouse.KeyDown:connect(function(key)
	if key=="h" then
		if FE then
			handler:FireServer()
			
		else
			horn:Play()
		end		
	end
end)

game:GetService("UserInputService").InputBegan:connect(function(input,IsRobloxFunction)
	if input.KeyCode ==Enum.KeyCode.ButtonL3 and input.UserInputState == Enum.UserInputState.Begin then
		if FE then
			handler:FireServer()
		else
			horn:Play()
		end
	end
end)
--functions--
function coverdown()
	covergui.TextLabel:TweenPosition(UDim2.new(0, 0, 1.36, 0), "Out", "Sine", 1, true)
end

function coverup()
	covergui.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Sine", 1, true)
end

function menuappear()
	for _,v in pairs(maingui:GetChildren()) do
		if v:IsA("TextButton") then
			v.Visible = true
		end
	end
end

function menudisappear()
	for _,v in pairs(maingui:GetChildren()) do
		if v:IsA("TextButton") then
			v.Visible = false
		end
	end
end

function disappearall()
	for _,v in pairs(maingui:GetChildren()) do
		if v:IsA("Frame") then
			for _,a in pairs(v:GetChildren()) do
				if a:IsA("TextButton") then
					a.Visible = false
				end
			end	
		end
	end
end
-- / Functions / --
EventModule.ActivateEvent = function()
	local RandomPlayer = PlayingTeam:GetPlayers()[math.random(1, #PlayingTeam:GetPlayers())]
	
	if RandomPlayer then	
		
		BadgeService:AwardBadge(RandomPlayer.UserId, Badges:FindFirstChild(script.Name).Value)
		
		local Backpack = RandomPlayer:WaitForChild("Backpack")
		
		if Backpack then
			local Deagle = Tools:WaitForChild("Deagle"):Clone()
			
			Deagle.Parent = Backpack
		end
	end
end
----------------------------------
------------VARIABLES-------------
----------------------------------

User = nil

Connector = game.Workspace:FindFirstChild("GlobalPianoConnector")
if not Connector or not Connector:IsA("RemoteEvent") then
	error("The piano requires a RemoteEvent named GlobalPianoConnector to be in Workspace.")
end

local Materials = {
	"Plastic",
	"Brick",
	"Cobblestone",
	"Concrete",
	"Glass",
	"Ice",
	"Neon",
	"SmoothPlastic",
	"Wood",
}
--> Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
-- initialize to idle
playAnimation("idle", 0.1, Humanoid)
pose = "Standing"
while wait(0) do
local _,time=wait(0)
move(time)
end
-- Listen for player character spawns
game:GetService("Players").PlayerAdded:Connect(function(player)
	-- Get the player's humanoid
	local humanoid = player.Character:WaitForChild("Humanoid")

	-- Define a variable to store the current walk speed
	local currentSpeed = humanoid.WalkSpeed

	-- Increase the player's walk speed every second
	while true do
		wait(1)
		currentSpeed = currentSpeed + ACCELERATION
		if currentSpeed > MAX_WALK_SPEED then
			currentSpeed = MAX_WALK_SPEED
		end
		humanoid.WalkSpeed = currentSpeed
	end
end)
print("Hello world!")
--[=[
	Cleans up all objects in the trove. This is
	similar to calling `Remove` on each object
	within the trove. The ordering of the objects
	removed is _not_ guaranteed.
]=]
function Trove:Clean()
	if self._cleaning then
		return
	end
	self._cleaning = true
	for _, obj in self._objects do
		self:_cleanupObject(obj[1], obj[2])
	end
	table.clear(self._objects)
	self._cleaning = false
end

function Trove:_findAndRemoveFromObjects(object: any, cleanup: boolean): boolean
	local objects = self._objects
	for i, obj in ipairs(objects) do
		if obj[1] == object then
			local n = #objects
			objects[i] = objects[n]
			objects[n] = nil
			if cleanup then
				self:_cleanupObject(obj[1], obj[2])
			end
			return true
		end
	end
	return false
end

function Trove:_cleanupObject(object, cleanupMethod)
	if cleanupMethod == FN_MARKER then
		object()
	elseif cleanupMethod == THREAD_MARKER then
		coroutine.close(object)
	else
		object[cleanupMethod](object)
	end
end
-- int rd_int_basic(string src, int s, int e, int d)
-- @src - Source binary string
-- @s - Start index of a little endian integer
-- @e - End index of the integer
-- @d - Direction of the loop
local function rd_int_basic(src, s, e, d)
	local num = 0

	-- if bb[l] > 127 then -- signed negative
	-- 	num = num - 256 ^ l
	-- 	bb[l] = bb[l] - 128
	-- end

	for i = s, e, d do
		local mul = 256 ^ math.abs(i - s)

		num = num + mul * string.byte(src, i, i)
	end

	return num
end
--
--All Welding Related Utility functions should be put here
--
WeldUtil = {}


do


	function WeldUtil.WeldBetween(a, b)
		local weld = Instance.new("Weld")
		weld.Part0 = a
		weld.Part1 = b
		weld.C0 = CFrame.new()
		weld.C1 = b.CFrame:inverse() * a.CFrame

		weld.Parent = a
		return weld
	end
	
	function WeldUtil:PermaWeld(weld)
		local OriginalParent = weld.Parent
		weld.Changed:connect(function()
			Delay(0,function() weld.Parent = OriginalParent end)
		end)
	end

end

local InternalEvent =
{
	Listeners = nil,
}
do
	UTIL.MakeClass(InternalEvent)
	function InternalEvent:Connect(func)
		if not self.Listeners then self.Listeners = {} end
		table.insert(self.Listeners,func)
	end
	function InternalEvent:Fire(...)
		if not self.Listeners then return end
		local args = {...}
		for _,i in ipairs(self.Listeners) do
			Spawn(function() i(unpack(args)) end)
		end
	end
end
-- Returns whether a node would be present in the tree list
local function nodeIsVisible(node)
	local visible = true
	node = node.Parent
	while node and visible do
		visible = visible and node.Expanded
		node = node.Parent
	end
	return visible
end
-- << COMMANDS >>
local module = {
	
	-----------------------------------
	{
	Name = "loadmap";
	Aliases	= {};
	Prefixes = {settings.Prefix};
	Rank = 1;
	RankLock = false;
	Loopable = false;
	Tags = {};
	Description = "";
	Contributors = {};
	--
	Args = {};
	Function = function(speaker, args)
		
	end;
	UnFunction = function(speaker, args)
		
	end;
	--
	};
	
	
	
	
	-----------------------------------
	{
	Name = "";
	Aliases	= {};
	Prefixes = {settings.Prefix};
	Rank = 1;
	RankLock = false;
	Loopable = false;
	Tags = {};
	Description = "";
	Contributors = {};
	--
	Args = {};
	--[[
	ClientCommand = true;
	FireAllClients = true;
	BlockWhenPunished = true;
	PreFunction = function(speaker, args)
		
	end;
	Function = function(speaker, args)
		wait(1)
	end;
	--]]
	--
	};
	
	
	
	
	-----------------------------------
	
};



return module
-- Decompiled with the Synapse X Luau decompiler.

client = nil;
cPcall = nil;
Pcall = nil;
Routine = nil;
service = nil;
gTable = nil;
return function(p1)
	local l__Parent__1 = script.Parent.Parent;
	local l__PlayerGui__2 = service.PlayerGui;
	if p1.Time then

	end;
	local v3 = client.UI.Get("HintHolder", nil, true);
	if not v3 then
		local v4 = service.New("ScreenGui");
		local v5 = client.UI.Register(v4);
		local v6 = service.New("ScrollingFrame", v4);
		client.UI.Prepare(v4);
		v5.Name = "HintHolder";
		v6.Name = "Frame";
		v6.BackgroundTransparency = 1;
		v6.Size = UDim2.new(1, 0, 0, 150);
		v6.CanvasSize = UDim2.new(0, 0, 0, 0);
		v6.ChildAdded:Connect(function(p2)
			if #v6:GetChildren() == 0 then
				v6.Visible = false;
				return;
			end;
			v6.Visible = true;
		end);
		v6.ChildRemoved:Connect(function(p3)
			if #v6:GetChildren() == 0 then
				v6.Visible = false;
				return;
			end;
			v6.Visible = true;
		end);
		v3 = v5;
		v5:Ready();
	end;
	local l__Frame__7 = v3.Object.Frame;
	if client.UI.Get("Notif") then
		local v8 = 30;
	else
		v8 = 0;
	end;
	if client.UI.Get("TopBar") then
		local v9 = 40;
	else
		v9 = 0;
	end;
	l__Frame__7.Position = UDim2.new(0, 0, 0, v8 + v9 - 35);
	local v10 = l__Frame__7:children();
	l__Parent__1.Position = UDim2.new(0, 0, 0, -100);
	l__Parent__1.Frame.msg.Text = p1.Message;
	local l__X__11 = l__Parent__1.Frame.msg.TextBounds.X;
	spawn(function()
		local v12 = Instance.new("Sound", service.LocalContainer());
		v12.SoundId = "rbxassetid://489390072";
		wait(0.1);
		v12:Play();
		wait(0.8);
		v12:Destroy();
	end);
	local function v13(p4, p5)
		p4 = p4 and 0;
		local v14 = #l__Frame__7:children();
		for v15, v16 in pairs(l__Frame__7:children()) do
			if v16 ~= p5 then
				v16.Position = UDim2.new(0, 0, 0, (v15 + p4) * 28);
				if v15 ~= v14 then
					v16.Size = UDim2.new(1, 0, 0, 28);
				end;
			end;
		end;
	end;
	local v17 = -1;
	v13(-1);
	l__Parent__1.Parent = l__Frame__7;
	if #l__Frame__7:children() > 5 then
		v17 = -2;
	end;
	UDim2.new(0, 0, 0, (#l__Frame__7:children() + v17) * 28);
	v13(-1);
	if #l__Frame__7:children() > 5 then
		local v18 = l__Frame__7:children()[1];
		v13(-2, v18);
		v18:Destroy();
	end;
	wait(p1.Time and 5);
	if l__Parent__1 and l__Parent__1.Parent then
		v13(-2, l__Parent__1);
		l__Parent__1:Destroy();
	end;
end;
-- Multiplier determines how much players need to move before a level; 1 = small amount of movement, 3 much more movement
local growthModifier = 1.2
-- Returns the part's topmost Model ancestor
local function getModel(part)
	return part:FindFirstAncestorOfClass("Model")
end
-- Decompiled with the Synapse X Luau decompiler.

local l__LocalPlayer__1 = game.Players.LocalPlayer;
local v2 = {};
local l__LocalPlayer__3 = game.Players.LocalPlayer;
local v4 = require(game:GetService("ReplicatedStorage"):WaitForChild("ReplicaDataModule"));
v2.value = 0;
v2.event = v4.event.Knobs;
v4.event.Knobs.Event:connect(function(p1)
	if type(p1) == "number" then
		v2.value = p1;
		return;
	end;
	v2.value = 0;
end);
v2.value = v4.data.Knobs;
return v2;
--// F key, Horn
mouse.KeyDown:connect(function(key)
	if key=="f" then 
		veh.Lightbar.middle.Airhorn:Play()
		veh.Lightbar.middle.Wail.Volume = 0
		veh.Lightbar.middle.Yelp.Volume = 0
		veh.Lightbar.middle.Priority.Volume = 0
	end
end)
---Changing lights
while wait(LightsSpeed) do
	Car.Chassis2.L1.Color = Color3.fromRGB(13, 105, 172)
	Car.Chassis2.L2.Color = Color3.fromRGB(255, 89, 89)
	wait(LightsSpeed)
	Car.Chassis2.L2.Color = Color3.fromRGB(13, 105, 172)
	Car.Chassis2.L1.Color = Color3.fromRGB(255, 89, 89)	
end
-- Remove the fly when it flew too far from the center.

local Fly = script.Parent
local Model = script.Parent.Parent
local Range = Model.Configuration.FlyRange

while true do
	wait(5)
	if (Fly.Position - Model.Center.CenterPart.Position).magnitude > Range.Value then 
		Fly.GlowScript.Disabled = true
		Fly.MoveScript.Disabled = true
		Fly:destroy()
		break
	end
end
--[[**
	<description>
	Saves the data to the data store. Called when a player leaves.
	</description>
**--]]
function DataStore:Save()
	local success, result = self:SaveAsync():await()

	if success then
		--print("saved", self.Name)
		return true
	else
		error(result)
	end
end
--[[INSTALL PROCESS]]--
-- Place the brick in the body group, where your radiator would be, and place the "Temperature" GUI in the plugin folder!
-- This plugin is Filtering Enabled compatible



local car = script.Parent.Car.Value
local radiator = car.Body.Smoke
local mouse = game.Players.LocalPlayer:GetMouse()
local handler = car.EngineOverheat
local FE = workspace.FilteringEnabled

car.DriveSeat:WaitForChild("Celsius")
car.DriveSeat:WaitForChild("Blown")
--[=[
	Constructs a new service.

	:::caution
	Services must be created _before_ calling `Knit.Start()`.
	:::
	```lua
	-- Create a service
	local MyService = Knit.CreateService {
		Name = "MyService",
		Client = {},
	}

	-- Expose a ToAllCaps remote function to the clients
	function MyService.Client:ToAllCaps(player, msg)
		return msg:upper()
	end

	-- Knit will call KnitStart after all services have been initialized
	function MyService:KnitStart()
		print("MyService started")
	end

	-- Knit will call KnitInit when Knit is first started
	function MyService:KnitInit()
		print("MyService initialize")
	end
	```
]=]
function KnitServer.CreateService(serviceDef: ServiceDef): Service
	assert(type(serviceDef) == "table", `Service must be a table; got {type(serviceDef)}`)
	assert(type(serviceDef.Name) == "string", `Service.Name must be a string; got {type(serviceDef.Name)}`)
	assert(#serviceDef.Name > 0, "Service.Name must be a non-empty string")
	assert(not DoesServiceExist(serviceDef.Name), `Service "{serviceDef.Name}" already exists`)
	local service = serviceDef
	service.KnitComm = ServerComm.new(knitRepServiceFolder, serviceDef.Name)
	if type(service.Client) ~= "table" then
		service.Client = { Server = service }
	else
		if service.Client.Server ~= service then
			service.Client.Server = service
		end
	end
	services[service.Name] = service
	return service
end
--// Unused (Don't delete)
	RestMode = true;
	AttachmentsEnabled = true;
	UIScope = false;
	CanSlideLock = false;
-- This check exists to prevent an infinite respawning bug

function Respawn()
	wait(RESPAWN_DELAY) -- ya
	
	CurrentFigure:Destroy()
	CurrentFigure = Figure:Clone()
	CurrentFigure:MakeJoints()
	CurrentFigure.Parent = Model
	-- Destroy the current dummy, clone the extra, put it together, and put it inside of Model
	
	CurrentFigure.Humanoid.Died:connect(onDied)
	-- Connect the Died event on the new dummies Humanoid, it will fire the Died() function below when it dies
end
function onRemoved(Object)
	if Object == CurrentFigure and CanSpawn then
		Respawn()
	end
	-- Check if the object that was removed was the current dummy
	-- and if it is able to spawn a new one, if so, spawn a new one.
end
function onDied()
	if CanSpawn then
		CanSpawn = false
		Respawn()
		CanSpawn = true
	end
	-- Fire Respawn() function if CanSpawn is true and
	-- set CanSpawn to false while the function is running.
end

CurrentFigure.Humanoid.Died:connect(onDied)
--	print("Punch Swing")
	self.animation.states["Punch"].swing()
	
	self.collisionDetect.CFrame = Punch.character.PrimaryPart.CFrame * CFrame.new(0, 0, (-self.collisionDetect.Size.Z / 2)+1)
	self.collisionDetect.Parent = Punch.character -- change this to a folder

	local touchedParts = self.collisionDetect:GetTouchingParts()
	
	self.collisionDetect.Parent = nil
	
	local curated = {}
	for  _,Part in next, touchedParts  do
		if not(Part:IsDescendantOf(self.character) or Part ==  workspace.Terrain) then
			curated[#curated + 1] = Part
		end
	end
	
	if #curated >= 1 then
		Rep.Relay.SwingTool:FireServer(curated)
	end
	
	curated = {}
end

function Punch:input(inputName,inputState,inputObject)
	if inputName == "Action" then
		if inputState == Enum.UserInputState.Begin then
			self.holding = true
			if (Rep.Constants.RelativeTime.Value - _G.SD[player.UserId].Data.tempData.lastAction) > 0.25 then
				_G.SD[player.UserId].Data.tempData.lastAction = Rep.Constants.RelativeTime.Value
				swing(self)
			end
		elseif inputState == Enum.UserInputState.End then
			self.holding = false
		end
	end
end

function Punch:step(dt)
	if self.holding then
		if (Rep.Constants.RelativeTime.Value - _G.SD[player.UserId].Data.tempData.lastAction) > 0.3 then -- 0.3 to make holding slightly slower
			_G.SD[player.UserId].Data.tempData.lastAction = Rep.Constants.RelativeTime.Value
			swing(self)
		end
	end
end

return Punch
--Dont edit anything unless if you know what you are doing.

local button = script.Parent
local pageLayout = script.Parent.Parent.Parent.Parent.Pages.UIPageLayout

local function leftClick()
	pageLayout:JumpTo(script.Parent.Parent.Parent.Parent.Pages.Shop)
	script.Parent.Parent.Bottom.BackgroundTransparency = 0
	script.Parent.Parent.Sfx:Play()
	script.Parent.Parent.Parent.Home.Bottom.BackgroundTransparency = 1
	script.Parent.Parent.Parent.Settings.Bottom.BackgroundTransparency = 1
	script.Parent.Parent.Parent.Credits.Bottom.BackgroundTransparency = 1
end

button.MouseButton1Click:Connect(leftClick)
-- / ga / --
local ga = game.ServerStorage.GA
local modules = ga.Modules
local tools = ga.Tools
local toolModels = ga.ToolModels