Roblox/luau_corpus huggingface dataset:
--[[
	Returns false if the given table has any of the following:
		- a key that is neither a number or a string
		- a mix of number and string keys
		- number keys which are not exactly 1..#t
]]
return function(t)
	local containsNumberKey = false
	local containsStringKey = false
	local numberConsistency = true

	local index = 1
	for x, _ in pairs(t) do
		if type(x) == 'string' then
			containsStringKey = true
		elseif type(x) == 'number' then
			if index ~= x then
				numberConsistency = false
			end
			containsNumberKey = true
		else
			return false
		end

		if containsStringKey and containsNumberKey then
			return false
		end

		index = index + 1
	end

	if containsNumberKey then
		return numberConsistency
	end

	return true
end
--[[ Main Script ]]--

Players = game:GetService("Players")
Workspace = game:GetService("Workspace")

Seat = script.Parent
GUI = script.GUI
Active = false
Player = nil
NewGui = nil

Seat.ChildAdded:connect(function(Child)
	if Active == false then
		if Child.Name == "SeatWeld" then
			Active = true
			Player = Players:GetPlayerFromCharacter(Child.Part1.Parent)
			if Player ~= nil then
				PlayerGui = Player:FindFirstChild("PlayerGui")
				if PlayerGui ~= nil then
					NewGui = GUI:Clone()
					NewGui.Parent = PlayerGui
				end
			end
		end
	end
end)

Seat.ChildRemoved:connect(function(child)
	if child.Name == "SeatWeld" then
		if Active == true then
			Active = false
			pcall(function() NewGui:Destroy() end)
			Player = nil
			NewGui = nil
		end
	end
end)
--- Returns Maid[key] if not part of Maid metatable
-- @return Maid[key] value
function Maid:__index(Index)
	if Maid[Index] then
		return Maid[Index]
	else
		return self.Tasks[Index]
	end
end
-- Define the tool's color
Tools.NewPart.Color = BrickColor.new( "Really black" );
-- MODULES ---

local Remotes = require(ReplicatedStorage.Remotes)
local DataService = require(game.ServerScriptService.Services.DataService)
--boolean IsValid
--* returns whether this response is available.
--* if we have a condition set, we use it.
function Response:IsValid()
	if self.Condition then
		return self.Condition(self.Graph.ConversingPlayer, self.Graph.DialogueFolder)
	end
	return true
end

return Response
--inputS.TouchEnded:Connect(function(object)
--	if object == Enum.KeyCode.DPadUp or seat.Throttle == 0 or seat.Throttle == -1 then
--		w=false
--	elseif object == Enum.KeyCode.DPadLeft or seat.Steer == 0 or seat.Steer == 1 then
--		a=false
--	elseif object == Enum.KeyCode.DPadDown or seat.Throttle == 0 or seat.Throttle == 1 then
--		s=false	
--	elseif object == Enum.KeyCode.DPadRight or seat.Steer == 0 or seat.Steer == -1 then
--		d=false		
--	end
--end)

mouse.Move:connect(function() 
	if not engine:FindFirstChild("BodyGyro") then
		local gyro=engine.BodyGyro
		gyro.cframe = mouse.Hit
	end
end)

mouse.Button1Down:Connect(function()
	firing:FireServer(true,mouse.Hit,mouse.Target)
end)

mouse.Button1Up:Connect(function()
	firing:FireServer(false,mouse.Hit,mouse.Target)
end)

function rotorSpd(spd)
	rotor1.TopParamA=-spd
	rotor1.TopParamB=spd
	rotor2.BottomParamA=-spd
	rotor2.BottomParamB=spd
end

local chg=Vector3.new(0,0,0)
local rot=0
local inc=0
while wait(.1) do
	local lv=engine.CFrame.lookVector
	local Vector = ControlModule:GetMoveVector()
--local KeySequence = game:GetService("KeyframeSequenceProvider")
--humanoid.Animation.AnimationId = KeySequence:RegisterKeyframeSequence(humanoid.OrangeJustice)

humanoid:LoadAnimation(humanoid.Animation):Play()
--// 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 bar = gui.TextLabel
	local playergui = service.PlayerGui
	
	--[[
	local TopbarMatchAdmin = client.GetReturn("Setting","TopbarMatchAdmin")
	local TopbarColor = client.GetReturn("Setting","TopbarColor")
	local TopbarTransparency = client.GetReturn("Setting","TopbarTransparency")
	local TopbarText = client.GetReturn("Setting","TopbarText")
	
	if not TopbarMatchAdmin then
		local text=TopbarText
		if text=="%TIME" then
			cPcall(function()
				repeat
					local t4=GetTime()
					local nt4
					local hour=t4:match("%d+")
					if tonumber(hour)>12 or tonumber(hour)<1 then
						nt4=math.abs(tonumber(hour)-12)..t4:match(":%d+").." PM"
					else
						nt4=t4.." AM"
					end
					bar.Text=t4.." / "..nt4
				until not wait(1)
			end)
		else
			bar.Text=TopbarText
		end
		bar.BackgroundColor3=TopbarColor
		bar.BorderSizePixel=0
		bar.BackgroundTransparency=TopbarTransparency
	end
	--]]
	
	--bar.Position=UDim2.new(0,0,0,-35)
	gTable:Ready()
end
-- theObj : (variant) the table with values to print
return function(theObj)
	local function printAll(t, spaceIndex)
		if not spaceIndex then
			spaceIndex = 0
		elseif spaceIndex > 10 then
			return "... tree too deep ..."
		end
		local spacer = string.rep("  ", spaceIndex)

		local outStr
		if not t then
			outStr = "nil"
		elseif type(t) == "table" then
			local parts = {}
			table.insert(parts, "{")
			for k, v in pairs(t) do
				local substr = string.format("%s%s : %s", spacer, tostring(k), printAll(v, spaceIndex + 1))
				table.insert(parts, substr)
			end
			table.insert(parts, string.format("%s}", spacer))
			outStr = table.concat(parts, "\n")
		else
			outStr = string.format("<%s> - %s", type(t), tostring(t))
		end

		return string.format("%s", outStr)
	end

	local outString = table.concat({
		" ********************************* ",
		printAll(theObj),
		" ********************************* "
	}, "\n")
	return outString
end
-- Force direction
function EjectionForce.CalculateForce()
	return Vector3.new(
		math.random(95,135) / 10, -- Side to side
		math.random(45,55) / 10, -- Up
		-math.random(75,85) / 10 -- Front
	)
end
----------------------------------------------------------------------------------------------------
--------------------=[ CFRAME ]=--------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
	,EnableHolster = false
	,HolsterTo = 'Torso'				 -- Put the name of the body part you wanna holster to
	,HolsterPos = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
	
	,RightArmPos = CFrame.new(-0.85, 0.15, -1.2) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))	--Server
	,LeftArmPos = CFrame.new(1.05,0.9,-1.4) * CFrame.Angles(math.rad(-100),math.rad(25),math.rad(-20))	--server
	
	,ServerGunPos = CFrame.new(-.3, -1, -0.4) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))
	,GunPos = CFrame.new(0.15, -0.15, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))

	,RightPos = CFrame.new(-.65, -0.2, -.9) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))	--Client
	,LeftPos = CFrame.new(1,-0.05,-1.4) * CFrame.Angles(math.rad(-120),math.rad(35),math.rad(-20))	--Client
}

return Config
--------
SYNC_RATE:Connect(function()
	for Index, Object in ipairs(ActiveHitboxes) do
		if Object.deleted then
			Handler:remove(Object.object)
		else
			for _, Point in ipairs(Object.points) do
				if not Object.active then
					Point.LastPosition = nil
				else
					local rayStart, rayDir, RelativePointToWorld = Point.solver:solve(Point, Object.debugMode)
					local raycastResult = workspace:Raycast(rayStart, rayDir, Object.raycastParams)
					Point.solver:lastPosition(Point, RelativePointToWorld)

					if raycastResult then
						local hitPart = raycastResult.Instance
						local findModel = not Object.partMode and hitPart:FindFirstAncestorOfClass("Model")
						local humanoid = findModel and findModel:FindFirstChildOfClass("Humanoid")
						local target = humanoid or (Object.partMode and hitPart)

						if target and not Object.targetsHit[target] then
							Object.targetsHit[target] = true
							Object.OnHit:Fire(hitPart, humanoid, raycastResult, Point.group)
						end
					end
					
					if Object.endTime > 0 then
						if Object.endTime <= clock() then
							Object.endTime = 0
							Object:HitStop()
						end
					end
					
					Object.OnUpdate:Fire(Point.LastPosition)
				end
			end
		end
	end
end)

return Handler
--// End Viewport
function RotateViewportModule:EndViewport()
	if (event) then
		event:Disconnect()
	end
end
--[[Brakes]]
	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 10		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.FBrakeForce	= 2500		-- Front brake force
	Tune.RBrakeForce	= 2000		-- Rear brake force
	Tune.PBrakeForce	= 5000		-- Handbrake force
	
	Tune.FLgcyBForce	= 15000		-- Front brake force [PGS OFF]
	Tune.RLgcyBForce	= 10000		-- Rear brake force [PGS OFF]
	Tune.LgcyPBForce	= 25000		-- Handbrake force [PGS OFF]
-- Enable CoreGui
	StarterGui = game:GetService('StarterGui')
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, true)
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local throt=0
local redline=0

script:WaitForChild("Rev")


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

handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true)
handler:FireServer("playSound","Rev")
car.DriveSeat:WaitForChild("Rev")

while wait() do
	local _RPM = script.Parent.Values.RPM.Value
	
	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.3,throt-.2)	
	else
		throt = math.min(1,throt+.1)	
	end	
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then
		redline=.5
	else
		redline=1
	end
	if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2),script.Rev.SetPitch.Value)
	handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,script.Rev.Volume)
end
--owner.CameraMode = "LockFirstPerson"
local part = Instance.new("Part", owner.Character.Head)
part.Size = Vector3.new(0.1,0.1,0.1)
part.Transparency = 1
part.CanCollide = false
part.Name = "camera"
part:BreakJoints()
local weld = Instance.new("Weld", part)
weld.Part0 = owner.Character.Head
weld.Part1 = part
weld.C0 = CFrame.new(0,0,-1)
cangoup = true
rolling = false
while game:GetService("RunService").RenderStepped:wait() do
	if (workspace.CurrentCamera.CFrame.p - part.Position).magnitude <= 1.7 then
		game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position,Vector3.new(mouse.Hit.p.x,game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position.y,mouse.Hit.p.z))
		workspace.CurrentCamera.FieldOfView = 80
		for i,v in pairs(owner.Character:GetChildren()) do
			if v.ClassName == "Part" or v.ClassName == "MeshPart" and v.Name ~= "Head" then
				v.LocalTransparencyModifier = 0
			end
			if v.ClassName == "Accessory" then
				v.Handle.Transparency = 1
	        end
		end
		if owner.Character.Head:findFirstChildOfClass("Decal") then
		    owner.Character.Head:findFirstChildOfClass("Decal").Transparency = 1
		end
		owner.Character.Head.Transparency = 1
		workspace.CurrentCamera.CameraSubject = part
	else
		for i,v in pairs(owner.Character:GetChildren()) do
			if v.ClassName == "Accessory" then
				v.Handle.Transparency = 0
	        end
		end
		workspace.CurrentCamera.FieldOfView = 70
		owner.Character.Head.Transparency = 0
		if owner.Character.Head:findFirstChildOfClass("Decal") then
		    owner.Character.Head:findFirstChildOfClass("Decal").Transparency = 0
		end
		workspace.CurrentCamera.CameraSubject = owner.Character
	end
end
--TextStuff
local Text = script.Parent

Text.Text = RebirthLevel.Value

RebirthLevel.Changed:Connect(function()
	Text.Text = RebirthLevel.Value
end)
--[=[
	Returns a boolean determining if the object is a ScriptSignal.

	```lua
	local janitor = Janitor.new()
	local signal = ScriptSignal.new()

	ScriptSignal.Is(signal) -> true
	ScriptSignal.Is(janitor) -> false
	```

	@param object any
	@return boolean
	@ignore
]=]
function ScriptSignal.Is(object): boolean
	return typeof(object) == 'table'
		and getmetatable(object) == ScriptSignal
end
-- Decompiled with the Synapse X Luau decompiler.

local l__math_pi__1 = math.pi;
local u2 = math.pi * 2;
return function(p1, p2)
	local v1 = p2 - p1;
	if l__math_pi__1 < v1 then
		return v1 - u2;
	end;
	if v1 < -l__math_pi__1 then
		v1 = v1 + u2;
	end;
	return v1;
end;
-- /**
--  * Handles more complex objects ( such as objects with circular references.
--  * maps and sets etc )
--  */
local function printComplexValue(
	val: any,
	config: Config,
	indentation: string,
	depth: number,
	refs: Refs,
	hasCalledToJSON: boolean?
): string
	if table.find(refs, val) ~= nil then
		return "[Circular]"
	end
	refs = { unpack(refs) }
	table.insert(refs, val)

	depth = depth + 1
	local hitMaxDepth = depth > config.maxDepth
	local min = config.min

	if
		config.callToJSON
		and not hitMaxDepth
		and val.toJSON
		and typeof(val.toJSON) == "function"
		and not hasCalledToJSON
	then
		return printer(val.toJSON(), config, indentation, depth, refs, true)
	end

	-- ROBLOX deviation start: rewrote this part since lua only has tables
	if hitMaxDepth then
		if getType(val) == "set" then
			return "[Set]"
		else
			return "[Table]"
		end
	end
	local retval = ""
	if not min then
		retval = if config.printBasicPrototype then "Table" .. " " else ""
	end

	if is_array(val) then
		return retval .. "{" .. printListItems(val, config, indentation, depth, refs, printer) .. "}"
	end

	if getType(val) == "set" then
		if hitMaxDepth then
			return "[Set]"
		else
			return "Set {" .. printListItems(val._array, config, indentation, depth, refs, printer) .. "}"
		end
	end

	return retval .. "{" .. printTableEntries(val, config, indentation, depth, refs, printer) .. "}"
	-- ROBLOX deviation end
end

local function isNewPlugin(plugin_: Plugin): boolean
	return (plugin_ :: NewPlugin).serialize ~= nil
end

function printPlugin(plugin_: Plugin, val: any, config: Config, indentation: string, depth: number, refs: Refs): string
	local printed

	local ok, err = pcall(function()
		if isNewPlugin(plugin_) then
			printed = (plugin_ :: NewPlugin).serialize(val, config, indentation, depth, refs, printer)
		else
			printed = (plugin_ :: OldPlugin).print(val, function(valChild)
				return printer(valChild, config, indentation, depth, refs)
			end, function(str)
				local indentationNext = indentation .. config.indent
				return indentationNext .. str:gsub("\n", "\n" .. indentationNext)
			end, {
				edgeSpacing = config.spacingOuter,
				min = config.min,
				spacing = config.spacingInner,
			}, config.colors)
		end
	end)
	if not ok then
		error(PrettyFormatPluginError(err))
	end

	if typeof(printed) ~= "string" then
		error(
			Error(
				string.format(
					'pretty-format: Plugin must return type "string" but instead returned "%s".',
					typeof(printed)
				)
			)
		)
	end
	return printed
end
--[[Susupension]]
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 800		-- Spring Dampening
	Tune.FSusStiffness	= 10000		-- Spring Force
	Tune.FAntiRoll 		= 90		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 800		-- Spring Dampening
	Tune.RSusStiffness	= 10000		-- Spring Force
	Tune.FAntiRoll 		= 85		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= true			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Really black"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
----- Private Variables -----

local Workspace = game:GetService("Workspace")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local Remotes = ReplicatedStorage.Remote
local Players = game:GetService("Players")
-- Connexion du clic sur le bouton GUI
script.Parent.MouseButton1Click:Connect(function()
	-- Activez la vitesse de marche à 16 lorsque le joueur clique sur le bouton
	player.Character:WaitForChild("Humanoid").WalkSpeed = 16

	-- Envoyez la demande au serveur
	game.ReplicatedStorage.TeamSelect:FireServer(script.Parent.Name)

	-- Désactivez le parent du bouton GUI
	script.Parent.Parent.Enabled = false
end)
-- Constants
local Local_Player = PlayersService.LocalPlayer
local Crosshair_Screen = script:WaitForChild("Crosshair")
local Crosshair_Frame = Crosshair_Screen.Frame
local Crosshair_Image = Crosshair_Frame.CrosshairImage
--end
--if SignalValues.Signal2.Value == 2 then
	SignalValues.Signal2.Value = 3
--orange 9
if k == "u" and ibo.Value==true then
	bin.Blade.BrickColor = BrickColor.new("Deep orange")
	bin.Blade2.BrickColor = BrickColor.new("Institutional white")
	bin.Blade.White.Enabled=false colorbin.white.Value = false
	bin.Blade.Blue.Enabled=false colorbin.blue.Value = false
	bin.Blade.Green.Enabled=false colorbin.green.Value = false
	bin.Blade.Magenta.Enabled=false colorbin.magenta.Value = false
	bin.Blade.Orange.Enabled=true colorbin.orange.Value = true
	bin.Blade.Viridian.Enabled=false colorbin.viridian.Value = false
	bin.Blade.Violet.Enabled=false colorbin.violet.Value = false
	bin.Blade.Red.Enabled=false colorbin.red.Value = false
	bin.Blade.Silver.Enabled=false colorbin.silver.Value = false
	bin.Blade.Black.Enabled=false colorbin.black.Value = false
	bin.Blade.NavyBlue.Enabled=false colorbin.navyblue.Value = false
	bin.Blade.Yellow.Enabled=false colorbin.yellow.Value = false
	bin.Blade.Cyan.Enabled=false colorbin.cyan.Value = false
    end
--Automatic: Revmatching
Tune.ShiftThrot		= 100		-- Throttle level when shifting down to revmatch, 0 - 100%
-- find player's head pos

	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)

	--local head = vCharacter:findFirstChild("Head")

	local head = locateHead()
	if head == nil then return end


	--computes a the intended direction of the projectile based on where the mouse was clicked in reference to the head
	local dir = mouse_pos - head.Position
	dir = computeDirection(dir)

	local launch = head.Position + 3 * dir

	local delta = mouse_pos - launch
	
	local dy = delta.y
	
	local new_delta = Vector3.new(delta.x, 0, delta.z)
	delta = new_delta

	local dx = delta.magnitude
	local unit_delta = delta.unit
	
	-- acceleration due to gravity in RBX units
	local g = (-9.81 * 20)

	local theta = computeLaunchAngle( dx, dy, g)

	local vy = math.sin(theta)
	local xz = math.cos(theta)
	local vx = unit_delta.x * xz
	local vz = unit_delta.z * xz
	

	local missile = Pellet:clone()
        

			missile.CanCollide = true

	missile.Position = launch
	missile.Velocity = Vector3.new(vx,vy,vz) * VELOCITY

	
	missile.StarScript.Disabled = false

	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = vPlayer
	creator_tag.Name = "creator"
	creator_tag.Parent = missile
	
	missile.Parent = game.Workspace

end

function locateHead()
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)

	return vCharacter:findFirstChild("Head")
end
	

function computeLaunchAngle(dx,dy,grav)
	-- arcane
	-- http://en.wikipedia.org/wiki/Trajectory_of_a_projectile
	
	local g = math.abs(grav)
	local inRoot = (VELOCITY*VELOCITY*VELOCITY*VELOCITY) - (g * ((g*dx*dx) + (2*dy*VELOCITY*VELOCITY)))
	if inRoot <= 0 then
		return .25 * math.pi
	end
	local root = math.sqrt(inRoot)
	local inATan1 = ((VELOCITY*VELOCITY) + root) / (g*dx)

	local inATan2 = ((VELOCITY*VELOCITY) - root) / (g*dx)
	local answer1 = math.atan(inATan1)
	local answer2 = math.atan(inATan2)
	if answer1 < answer2 then return answer1 end
	return answer2
end

function computeDirection(vec)
	local lenSquared = vec.magnitude * vec.magnitude
	local invSqrt = 1 / math.sqrt(lenSquared)
	return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
end




Tool.Enabled = true
function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return 
	end

	local targetPos = humanoid.TargetPoint

	fire(targetPos)

	wait(2)

	Tool.Enabled = true
	Tool.Handle.Transparency=0
end

script.Parent.Activated:connect(onActivated)