Pinkstack/roblox-luau-corpus-text huggingface dataset:
--- Add a task to clean up. Tasks given to a maid will be cleaned when
--  maid[index] is set to a different value.
-- @usage
-- Maid[key] = (function)         Adds a task to perform
-- Maid[key] = (event connection) Manages an event connection
-- Maid[key] = (Maid)             Maids can act as an event connection, allowing a Maid to have other maids to clean up.
-- Maid[key] = (Object)           Maids can cleanup objects with a `Destroy` method
-- Maid[key] = nil                Removes a named task. If the task is an event, it is disconnected. If it is an object,
--                                it is destroyed.


function Maid:__newindex(index, newTask)
	if Maid[index] ~= nil then
		error(("'%s' is reserved"):format(tostring(index)), 2)
	end

	local tasks = self._tasks
	local oldTask = tasks[index]

	if oldTask == newTask then
		return
	end

	tasks[index] = newTask

	if oldTask then
		if type(oldTask) == "function" then
			oldTask()
		elseif typeof(oldTask) == "RBXScriptConnection" then
			oldTask:Disconnect()
		elseif oldTask.Destroy then
			oldTask:Destroy()
		end
	end
end
-- slash1


Attack(target,structureDamage)
end
wait(.3)
end
end

else
if not enRoute then
wait(math.random(1,4))
if not target then
ScanForPoint()
end
end

end

wait()
end -- end of loop
end)
movementCoroutine()

local scanCoroutine = coroutine.wrap(function()
while task.wait(3) do
local nearestPlayer,closestPlayerDist = nil,60
local nearestBuilding,closestBuildingDist = nil, 100

for _,player in next,game.Players:GetPlayers() do
if player.Character and player.Character:IsDescendantOf(workspace) then
local pos = player.Character.PrimaryPart.Position
local dist = (root.Position-pos).magnitude
if dist < closestPlayerDist then
nearestPlayer = player
closestPlayerDist = dist
end
end
game:GetService("RunService").Heartbeat:wait()
end

local structures = _G.worldStructures
for building,buildingData in next,structures do
local dist = (building.PrimaryPart.Position-root.Position).magnitude
if dist < closestBuildingDist then
nearestBuilding = building
closestBuildingDist = dist
end
game:GetService("RunService").Heartbeat:wait()
end

if nearestPlayer and nearestBuilding then
--------LIGHTED RECTANGLES--------



game.Workspace.pillar1.BrickColor = BrickColor.new(194)
game.Workspace.pillar2.BrickColor = BrickColor.new(194)
game.Workspace.pillar3.BrickColor = BrickColor.new(194)
game.Workspace.pillar4.BrickColor = BrickColor.new(194)
game.Workspace.pillar5.BrickColor = BrickColor.new(194)
game.Workspace.pillar6.BrickColor = BrickColor.new(194)
game.Workspace.pillar7.BrickColor = BrickColor.new(194)
game.Workspace.pillar8.BrickColor = BrickColor.new(194)
--[[Tires]]--
-- Tire Curve Profiler: https://www.desmos.com/calculator/og4x1gyzng


Tune.TireCylinders	= 4			-- How many cylinders are used for the tires. More means a smoother curve but way more parts meaning lag. (Default = 4)
Tune.TiresVisible	= false		-- Makes the tires visible (Debug)
--[[
	Event functions
]]



local function onHeartbeat()
	if target then
		-- Point towards the enemy
		maid.alignOrientation.Enabled = true
		maid.worldAttachment.CFrame = CFrame.new(maid.humanoidRootPart.Position, target.Position)
	else
		maid.alignOrientation.Enabled = false
	end

	if target then
		local inAttackRange = (target.Position - maid.humanoidRootPart.Position).magnitude <= ATTACK_RANGE + 1

		if inAttackRange then
			if not attacking and tick() - lastAttackTime > ATTACK_DELAY then
				attack()
			end
		else
			runToTarget()
		end
	end

	-- Check if the current target no longer exists or is not attackable
	if not target or not isInstaceAttackable(target) then
		findTargets()
	end
end

local function died()
	target = nil
	attacking = false
	newTarget = nil
	searchParts = nil
	searchingForTargets = false

	maid.heartbeatConnection:Disconnect()

	maid.humanoidRootPart.Anchored = true
	maid.deathAnimation:Play()
	
	wait(maid.deathAnimation.Length * 0.65)
	
	maid.deathAnimation:Stop()
	maid.humanoidRootPart.Anchored = false

	if RAGDOLL_ENABLED then
		Ragdoll(maid.instance, maid.humanoid)
	end

	if DESTROY_ON_DEATH then
		delay(DEATH_DESTROY_DELAY, function()
			destroy()
		end)
	end
end
----- Bath water level and temp handler -----



while true do
	if script.Parent.HotOn.Value == true and script.Parent.ColdOn.Value == true and script.Parent.Plugged.Value == true and water.Scale.Y <= 2.5 then -- if BOTH ON and PLUGGED		
		water.Scale = water.Scale + Vector3.new(0,0.01,0)
		water.Offset = Vector3.new(0,water.Scale.Y/2,0)
		hotWater = hotWater + 1
		coldWater = coldWater + 1
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == true or script.Parent.ColdOn.Value == true) and script.Parent.Plugged.Value == true and water.Scale.Y <= 2.5 then -- if ON and PLUGGED
		water.Scale = water.Scale + Vector3.new(0,0.01,0)
		water.Offset = Vector3.new(0,water.Scale.Y/2,0)
		if script.Parent.HotOn.Value == true then
			hotWater = hotWater + 1
		else
			coldWater = coldWater + 1
		end
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == true or script.Parent.ColdOn.Value == true) and script.Parent.Plugged.Value == false and water.Scale.Y <= 2.5 then -- if ON and NOT PLUGGED
		if script.Parent.HotOn.Value == true then
			coldWater = coldWater - 1			
		else
			hotWater = hotWater - 1
		end
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == false and script.Parent.ColdOn.Value == false) and script.Parent.Plugged.Value == false and water.Scale.Y > 0 then -- if NOT ON and NOT PLUGGED
		water.Scale = water.Scale + Vector3.new(0,-0.01,0)
		water.Offset = Vector3.new(0,water.Scale.Y/2,0)
		coldWater = coldWater - 1
		hotWater = hotWater - 1
		drainSound:Play()
	end
	
	if coldWater < 1 then
		coldWater = 1
	end
	if hotWater < 1 then
		hotWater = 1
	end
	
	waterTemp = hotWater/coldWater	
	
	if waterTemp > 1 then
		water.Parent.SteamEmitter.Enabled = true
	else
		water.Parent.SteamEmitter.Enabled = false
	end
	wait(0.1)
	
	if water.Scale.Y <= 0 then
		drainSound:Stop()
	end
	
	if (script.Parent.ColdOn.Value == true or script.Parent.HotOn.Value == true) and script.Parent.ShowerMode.Value == false then
		script.Parent.Splash.ParticleEmitter.Enabled = true
	else
		script.Parent.Splash.ParticleEmitter.Enabled = false
	end	
end
--[[Manage Plugins]]


	
script.Parent.Interface:WaitForChild("Bike").Value=bike
for i,v in pairs(script.Parent.Plugins:GetChildren()) do
	for _,a in pairs(v:GetChildren()) do
		if a:IsA("RemoteEvent") or a:IsA("RemoteFunction") then 
			a.Parent=bike
			for _,b in pairs(a:GetChildren()) do
				if b:IsA("Script") then b.Disabled=false end
			end	
		end
	end
	v.Parent = script.Parent.Interface
end
script.Parent.Plugins:Destroy()
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])
local on = 0


script:WaitForChild("Wheel")

if not FE then
	for i,v in pairs(car.Body.WHEEL:GetChildren()) do
		for _,a in pairs(script:GetChildren()) do
			if v.Name==a.Name then v:Stop() wait() v:Destroy() end
		end
	end
	for i,v in pairs(script:GetChildren()) do
		v.Parent=car.Body.WHEEL
	end
	
	
	car.Body.WHEEL.Wheel:Play()
	
	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		
car.Body.WHEEL.Wheel.Pitch = (car.Body.WHEEL.Wheel.SetPitch.Value + car.Body.WHEEL.Wheel.SetRev.Value*_RPM/_Tune.Redline)*on^2

		if _RPM == 700 then
	
			car.Body.WHEEL.Wheel.Volume = 0.1
	
			
		end

	end
else
	local handler = car.AC6_FE_Sounds
	
	handler:FireServer("newSound","Wheel",car.Body.WHEEL,script.Wheel.SoundId,0,script.Wheel.Volume,true)
	handler:FireServer("playSound","Wheel")
	
	local pitch4=0
	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		
		pitch4 = (script.Wheel.SetPitch.Value + script.Wheel.SetRev.Value*_RPM/_Tune.Redline)*on^2
	
		handler:FireServer("updateSound","Wheel",script.idle.SoundId,pitch4,script.Wheel.Volume)
	end
end
--Make sure players stay banned.


	
local DataStore = game:GetService("DataStoreService"):GetDataStore("motfAdminPanel")
function checkBan(player)	
	
	local Reason = DataStore:GetAsync(string.lower(player.Name))
	
	if Reason == nil or Reason == 0 then
		return
	end
	
	wait(1)
	if Reason == 1 then
		player:Kick("You are banned")
	else
		player:Kick("You are banned for the following reason: " .. Reason)
	end
end

game.Players.PlayerAdded:connect(checkBan)
-- A very simple module that only gives the included tools to people inside of the groupID.
-- Just place the



local module = {}

local function dostuff(p, core)
	--print("new player")
	local rank = core.getPlayerRank(p)
	--print(rank)
	if rank ~= 0 then
		p.CharacterAdded:Connect(function()
			--print("new char")
			for i, v in pairs(script:GetChildren()) do
				v:Clone().Parent = p.Backpack
			end
		end)
		-- for first spawn
		--print("first spawn")
		for i, v in pairs(script:GetChildren()) do
			v:Clone().Parent = p.Backpack
		end
	end
end

function module.loadServer(core)
	--print(core)
	game:GetService("Players").PlayerAdded:Connect(function(p)
		dostuff(p, core)
	end)
	
	for i, v in pairs(game:GetService("Players"):GetChildren()) do -- first load
		dostuff(v, core)
	end
end

return module
--//=================================\\
--|| 			FUNCTIONS
--\\=================================//



function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
	local NEWPART = IT("Part")
	NEWPART.formFactor = FORMFACTOR
	NEWPART.Reflectance = REFLECTANCE
	NEWPART.Transparency = TRANSPARENCY
	NEWPART.CanCollide = false
	NEWPART.Locked = true
	NEWPART.Anchored = true
	if ANCHOR == false then
		NEWPART.Anchored = false
	end
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
	NEWPART.Name = NAME
	NEWPART.Size = SIZE
	NEWPART.Position = TORSO.Position
	NEWPART.Material = MATERIAL
	NEWPART:BreakJoints()
	NEWPART.Parent = PARENT
	return NEWPART
end

function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
end
--I M P O R T A N T--
------------------------------------------------------------------------
--Don't change any of this unless you know what you are doing.
--This script is the blur affect but also the exit button script.
------------------------------------------------------------------------



local blur = game.Lighting.Blur
local frame = script.Parent
local close = script.Parent.CloseButton

if 
	frame.Visible == true
then
	blur.Enabled = true
end

close.MouseButton1Click:Connect(function()
	frame.Visible = false
end)

close.MouseButton1Click:Connect(function()
	blur.Enabled = false
end)
-- Public Functions



function PlayerManager:SetGameRunning(running)
	GameRunning = running
end

function PlayerManager:ClearPlayerScores()
	for _, player in ipairs(Players:GetPlayers()) do
		local leaderstats = player:FindFirstChild('leaderstats')
		if leaderstats then
			local Captures = leaderstats:FindFirstChild('Captures')
			if Captures then
				Captures.Value = 0
			end
		end
	end
end

function PlayerManager:LoadPlayers()
	for _, player in ipairs(Players:GetPlayers()) do
		player:LoadCharacter()
	end
end

function PlayerManager:AllowPlayerSpawn(allow)
	PlayersCanSpawn = allow
end

function PlayerManager:DestroyPlayers()
	for _, player in ipairs(Players:GetPlayers()) do
		player.Character:Destroy()
		for _, item in ipairs(player.Backpack:GetChildren()) do
			item:Destroy()
		end
	end
	ResetMouseIcon:FireAllClients()
end

function PlayerManager:AddPlayerScore(player, score)
	player.leaderstats.Captures.Value = player.leaderstats.Captures.Value + score
	local success, message = pcall(function() spawn(function() PointsService:AwardPoints(player.userId, score) end) end)
end
--[[
	DataStore2: A wrapper for data stores that caches, saves player's data, and uses berezaa's method of saving data.
	Use require(1936396537) to have an updated version of DataStore2.

	DataStore2(dataStoreName, player) - Returns a DataStore2 DataStore

	DataStore2 DataStore:
	- Get([defaultValue])
	- Set(value)
	- Update(updateFunc)
	- Increment(value, defaultValue)
	- BeforeInitialGet(modifier)
	- BeforeSave(modifier)
	- Save()
	- OnUpdate(callback)
	- BindToClose(callback)

	local coinStore = DataStore2("Coins", player)

	To give a player coins:

	coinStore:Increment(50)

	To get the current player's coins:

	coinStore:Get()
--]]
--// Recoil Settings	


	gunrecoil = -0.3; -- How much the gun recoils backwards when not aiming
	camrecoil = 0.03; -- How much the camera flicks when not aiming
	AimGunRecoil = -0.3; -- How much the gun recoils backwards when aiming
	AimCamRecoil = 0.01; -- How much the camera flicks when aiming
	
	Kickback = 3; -- Upward gun rotation when not aiming
	AimKickback = 2; -- Upward gun rotation when aiming
--Loop For Making Rays For The Bullet's Trajectory



local fallOfShot = 4.75

for i = 1, 120 do
	local thisOffset = offset + Vector3.new(0, yOffset*(i-fallOfShot), 0)
	local travelRay = Ray.new(point1,thisOffset)
	local hit, position = workspace:FindPartOnRay(travelRay, parts.Parent)

	local distance 		= (position - point1).magnitude
	round.Size				= Vector3.new(1.1, distance, 1.1)
	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 = 10
		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 - damage
			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 - damage
			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
-- Inject types


local TypeDefs = require(script.Parent.TypeDefinitions)
type CanPenetrateFunction = TypeDefs.CanPenetrateFunction
type CanHitFunction = TypeDefs.CanHitFunction
type GenericTable = TypeDefs.GenericTable
type Caster = TypeDefs.Caster
type FastCastBehavior = TypeDefs.FastCastBehavior
type CastTrajectory = TypeDefs.CastTrajectory
type CastStateInfo = TypeDefs.CastStateInfo
type CastRayInfo = TypeDefs.CastRayInfo
type ActiveCast = TypeDefs.ActiveCast

local TestService = game:GetService("TestService")
local table = require(script.Parent.Table)

local SignalStatic = {}
SignalStatic.__index = SignalStatic
SignalStatic.__type = "Signal" -- For compatibility with TypeMarshaller
local ConnectionStatic = {}
ConnectionStatic.__index = ConnectionStatic
ConnectionStatic.__type = "SignalConnection" -- For compatibility with TypeMarshaller

export type Signal = {
	Name: string,
	Connections: {[number]: Connection},
	YieldingThreads: {[number]: BindableEvent}
}

export type Connection = {
	Signal: Signal?,
	Delegate: any,
	Index: number	
}
--[[Steering]]


	Tune.SteerInner		= 70		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 70		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .5		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .5		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 320		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 10		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree
	
	--Steer Gyro Tuning
	Tune.SteerD			= 1200		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 7000		-- Steering Aggressiveness
--[[
Classes.Slider

This class creates a slider object which can be dragged for different values.

Constructors:
	new(frame [instance], axis [string])
		> Slider frames must have the following format:
			>> SliderFrame
				>>> Dragger
				>>> Background
		> axis defines if the slider is horizontal "x" or vertical "y"
	Create(axis [string])
		> Creates a slider frame from the default, simply define whether it's horizontal "x" or vertical "y".

Properties:
	Frame [instance]
		> The container frame for the slider. Can be used for positioning and resizing.
	Interval [number] [0, 1]
 		> Set this to force an interval step on the slider. For example if you only wanted steps of 1/10th then you'd write
		> Slider.Interval = 0.1
	IsActive [boolean]
		> When true the slider can be interacted with by the user, when false its values can only be set by the developer.
	TweenClick [boolean]
		> If true then when the user clicks on the slider the dragger will tween to that target. If not it will be instant.
	Inverted [boolean]
		> If true then the value of the slider will be inverted (e.g. when horizontal the right-most position will be zero and left-most 1)
		> This is useful for when you have a vertical slider as typically users envision the down-most position to be zero.

Methods:
	:Get() [number]
		> Returns the slider position from 0 to 1
	:Set(value [number], doTween [boolean]) [void]
		> Sets the slider to a specific position or closest possible if interval > 0. If doTween is true then the slider will tween to that position.
	:Destroy() [void]
		> Destroys the slider frame and all the events, etc that were running it

Events:
	.Changed:Connect(function(value [number])
		> When the slider's position changes this fires the slider's current position
	.Clicked:Connect(function(value [number])
		> When the user clicks somewhere on the slider this fires the clicked position
	.DragStart:Connect(function()
		> Fires when the user starts dragging the slider
	.DragStop:Connect(function()
		> Fires when the user stops dragging the slider
--]]
-- Reload animation


function reload()
	if not reloading then
		reloading=true;
		updateAmmo()
		local reloadTime = tankStats.ReloadTime.Value;	


		local Timer = 0
	

		for i = 7, 1, -1 do
			wait(reloadTime/8);
			Timer = Timer + 1
			
			if Timer >= 2 and Loaded == false then
				GUI.ReloadSound:Play()
				Loaded = true
			end
		end
		wait(reloadTime/4);


		if Timer >= 7 then
		
		GUI.Loaded.Visible = true	
		
		
		
		Timer = 0
			reloading = false;
			
		end
		
		
	end
end

function fire()
	
	if reloading then return end;
	local APAmmo = tankStats.APAmmo;
	local HEAmmo = tankStats.HEAmmo;
	if currRound.Value == "AP" and APAmmo.Value <= 0 then return end
	if currRound.Value == "HE" and HEAmmo.Value <= 0 then return end
	GUI.Loaded.Visible = false
	
	TFE:FireServer('Fire',parts,currRound,APAmmo,HEAmmo,tankStats)
	
	reload(GUI);
	
end
--attachmentWorldCFrame = part1.CFrame * attachment.CFrame --how attachment.WorldCFrame is calculated
--inverse both sides by attachment.CFrame
--attachmentWorldCFrame * attachment.CFrame:Inverse() = part1.CFrame



local part1 = script.Parent
local attachment1 = script.Parent.Attachment
local attachment2 = script.Parent.Parent.Partw.Attachment

part1.CFrame = attachment2.WorldCFrame * attachment1.CFrame:Inverse()
------------------------------------------------------------------------



local cameraPos = Vector3.new()
local cameraRot = Vector2.new()
local cameraFov = 0

local velSpring = Spring.new(VEL_STIFFNESS, Vector3.new())
local panSpring = Spring.new(PAN_STIFFNESS, Vector2.new())
local fovSpring = Spring.new(FOV_STIFFNESS, 0)
-- find player's head pos



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

	local head = vCharacter:findFirstChild("Head")
	if head == nil then return end


	local launch = head.Position + 10 * v

		

	local missile = Pellet:clone()
        

	Tool.Handle.Mesh:clone().Parent = missile
		

	missile.Position = launch
	missile.Velocity = v * 80




	local force = Instance.new("BodyForce")
	force.force = Vector3.new(0,40,0)
	force.Parent = missile

	if (turbo) then
		missile.Velocity = v * 100
		force.force = Vector3.new(0,45,0)
	end

	missile.StarScript.Disabled = false

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

end



function rndDir()
	return Vector3.new(math.random() - .5, math.random() - .5, math.random() - .5).unit
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
if loaded==true then
	loaded=false

	local targetPos = humanoid.TargetPoint
	local lookAt = (targetPos - character.Head.Position).unit

	fire(lookAt, isTurbo(character) )

	if (isTurbo(character) == true) then
		wait(.1)
		Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.6
		Tool.Parent.Torso["Right Shoulder"].DesiredAngle = -3.6
		wait(.1)
		fire(lookAt * .9 + rndDir() * .1, isTurbo(character) )
		Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.6
		Tool.Parent.Torso["Right Shoulder"].DesiredAngle = -3.6
		wait(.1)
		fire(lookAt * .8 + rndDir() * .2, isTurbo(character) )
		wait(.1)
	else
		wait(.3)
	end

	Tool.Enabled = true
elseif loaded==false then
Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.6
Tool.Parent.Torso["Right Shoulder"].DesiredAngle = -3.6
	wait(.1)
Tool.Handle.Transparency=0
wait(.1)
	loaded=true
	end
	Tool.Enabled = true
end

script.Parent.Activated:connect(onActivated)
--[[
Classes.CheckboxLabel

This class creates a single checkbox label

Constructors:
	new(frame [instance])
		>
	Create(text)
		> Creates a CheckboxLabel from the text provided.

Properties:
	Frame [instance]
		> The container frame for the CheckboxLabel. Can be used for positioning and resizing.
	Button [instance]
 		> The button used to track when the user clicks on the checkbox button or not

Methods:
	:GetValue() [boolean]
		> Returns whether the checkbox is selected or not.
	:SetValue(bool [boolean]) [void]
		> Sets if the checkbox is selected or not.
	:Destroy() [void]
		> Destroys the RadioButtonLabel and all the events, etc that were running it.

Events:
	.Changed:Connect(function(bool [boolean])
		> Fired when the user clicks the checkbox.
--]]