Pinkstack/roblox-luau-corpus-text huggingface dataset:
----------------------------------------------------------------------------------------------------
-------------------=[ PROJETIL ]=-------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,Distance = 10000
	,BDrop = .25
	,BSpeed = 2500

	,SuppressMaxDistance = 25	--- Studs
	,SuppressTime = 10			--- Seconds

	,BulletWhiz = true
	,BWEmitter = 25
	,BWMaxDistance = 200
	
	,BulletFlare = false
	,BulletFlareColor = Color3.fromRGB(255,255,255)

	,Tracer = true
	,TracerColor = Color3.fromRGB(255,255,255)
	,TracerLightEmission = 1
	,TracerLightInfluence = 0
	,TracerLifeTime = .2
	,TracerWidth = .1
	,RandomTracer = false
	,TracerEveryXShots = 5
	,TracerChance = 100
	
	,BulletLight = false
	,BulletLightBrightness = 1
	,BulletLightColor = Color3.fromRGB(255,255,255)
	,BulletLightRange = 10

	,ExplosiveHit = false
	,ExPressure = 500
	,ExpRadius = 25
	,DestroyJointRadiusPercent = 0	--- Between 0 & 1
	,ExplosionDamage = 100

	,LauncherDamage = 100
	,LauncherRadius = 25
	,LauncherPressure = 500
	,LauncherDestroyJointRadiusPercent = 0
--minutes.Changed:Connect(function(int)
--	if seconds > 9 then
--		script.Parent.Text = tostring(minutes.Value)..":"tostring(seconds)
--	else
--		script.Parent.Text = tostring(minutes.Value)..":0"tostring(seconds)
--	end
--end)



seconds.Changed:Connect(function(int)
	if seconds.Value <= 0 and minutes.Value <= 0 then
		return
	end
	if seconds.Value > 9 then
		script.Parent.Text = tostring(minutes.Value)..":"..tostring(seconds.Value)
	else
		script.Parent.Text = tostring(minutes.Value)..":0"..tostring(seconds.Value)
	end
end)

while wait(1) do
	if minutes.Value > 0 and seconds.Value == 0 then
		minutes.Value -= 1
		seconds.Value = 59
		continue
	end
	if seconds.Value > 0 then
		seconds.Value -= 1
	end
end
-- float rd_flt_basic(byte f1..8)
-- @f1..4 - The 4 bytes composing a little endian float


local function rd_flt_basic(f1, f2, f3, f4)
	local sign = bit.rshift(f4, 7)
	local exp = bit.rshift(f3, 7) + bit.lshift(bit.band(f4, 0x7F), 1)
	local frac = f1 + bit.lshift(f2, 8) + bit.lshift(bit.band(f3, 0x7F), 16)
	local normal = 1

	if exp == 0 then
		if frac == 0 then
			return sign * 0
		else
			normal = 0
			exp = 1
		end
	elseif exp == 0x7F then
		if frac == 0 then
			return sign * (1 / 0)
		else
			return sign * (0 / 0)
		end
	end

	return (-1) ^ sign * 2 ^ (exp - 127) * (1 + normal / 2 ^ 23)
end
--		print("Wha " .. pose)


		amplitude = 0.1
		frequency = 1
		setAngles = true
	end
	if (setAngles) then
		local desiredAngle = amplitude * math.sin(time * frequency)
		RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
		LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
		RightHip:SetDesiredAngle(-desiredAngle)
		LeftHip:SetDesiredAngle(-desiredAngle)
	end

	-- Tool Animation handling
	local tool = getTool()
	if tool then
		local animStringValueObject = getToolAnim(tool)
		if animStringValueObject then
			toolAnim = animStringValueObject.Value
			-- message recieved, delete StringValue
			animStringValueObject.Parent = nil
			toolAnimTime = time + .3
		end
		if time > toolAnimTime then
			toolAnimTime = 0
			toolAnim = "None"
		end
		animateTool()		
	else
		stopToolAnimations()
		toolAnim = "None"
		toolAnimTime = 0
	end
end
----------------------------------------




local FriendlyReticleColor = Color3.new(0, 1, 0)
local EnemyReticleColor	= Color3.new(1, 0, 0)
local NeutralReticleColor	= Color3.new(1, 1, 1)

local Spread = MinSpread
local AmmoInClip = ClipSize

local Tool = script.Parent
local Handle = WaitForChild(Tool, 'Handle')
local WeaponGui = nil

local LeftButtonDown
local Reloading = false
local IsShooting = false
--[=[
	Returns whether a task is a valid job.

	@param job any
	@return boolean
]=]


function MaidTaskUtils.isValidTask(job)
	return type(job) == "function"
		or typeof(job) == "RBXScriptConnection"
		or type(job) == "table" and type(job.Destroy) == "function"
		or typeof(job) == "Instance"
end
-- Functions --



local function playSoundLocal(sId,sParent)
	local sound = Instance.new("Sound",sParent)
	sound.SoundId = "http://www.roblox.com/asset/?id="..sId
	sound:Play()
	sound:Destroy()
end

local function onClicked(player)
	print(player.Name.." clicked on Uniform Giver")
	
	playSoundLocal(152206246,player)	-- Declaring the sound ID and Parent
	
	
	
	
	local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt
	if not foundShirt then -- if there is no shirt
		print("No shirt found, creating for "..player.Name)
		local newShirt = Instance.new("Shirt",player.Character)
		newShirt.Name = "Shirt"
	else if foundShirt then -- if there is a shirt
		print("Shirt found, reconstructing for "..player.Name)
		player.Character.Shirt:remove()
		local newShirt = Instance.new("Shirt",player.Character)
		newShirt.Name = "Shirt"
	end
	end
	
	
	
	
	local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants
	if not foundPants then -- if there are no pants
		print("No pants found, creating for "..player.Name)
		local newPants = Instance.new("Pants",player.Character)
		newPants.Name = "Pants"
	else if foundPants then -- if there are pants
		print("Pants found, reconstructing for "..player.Name)
		player.Character.Pants:remove()
		local newPants = Instance.new("Pants",player.Character)
		newPants.Name = "Pants"
	end
	end
	
	player.Character.Shirt.ShirtTemplate = shirtId
	player.Character.Pants.PantsTemplate = pantsId
	end




local function onHoverEnter(player)
	cPart.Transparency = 0
	cPart.BrickColor = BrickColor.Dirt brown()
end



local function onHoverLeave(player)
	cPart.BrickColor = BrickColor.Dirt brown()
	cPart.Transparency = 0
end
--Weighted Random Function


function maths:WeightedRandom(Weights,Numbers,Round)
	if #Weights == #Numbers then
		local Sum = 0
		local Rand = {}

		for i,k in pairs(Weights)do
			if type(k) ~= "number"then continue end
			Sum += k

			for j=1,k do
				table.insert(Rand,Numbers[i])
			end
		end
		if Round then
			return math.round(Rand[math.random(1,Sum)])
		else
			return Rand[math.random(1,Sum)]
		end
	end
end

return maths
--// # key, Wail


mouse.KeyDown:connect(function(key)
	if key=="r" then 
		if veh.Lightbar.middle.Wail.IsPlaying == true then
		veh.Lightbar.middle.Wail:Stop()
		veh.Lightbar.middle.Yelp:Stop()
		veh.Lightbar.middle.Priority:Stop()
		script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		else
		veh.Lightbar.middle.Wail:Play()
		veh.Lightbar.middle.Yelp:Stop()
		veh.Lightbar.middle.Priority:Stop()
		script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(215, 135, 110)
		script.Parent.Parent.Sirens.Yelp.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		end
	end
end)
--[ FUNCTIONS ]--



game:GetService("UserInputService").WindowFocusReleased:Connect(function() -- tab in
	ReplicatedStorageEvent:FireServer(true)
end)

game:GetService("UserInputService").WindowFocused:Connect(function() -- tab out
	ReplicatedStorageEvent:FireServer(false)
end)

local uis = game:GetService("UserInputService")
local plrs = game:GetService("Players")
local lplr = plrs.LocalPlayer

local idle = false
local timer  = 0
uis.InputEnded:Connect(function()
	idle = true
	timer = 0
	while wait(1) do
		timer += 1
		if not idle then
			break
		end
		if timer >= 180 then
			ReplicatedStorageEvent:FireServer(true)
			break
		end
	end
end)

uis.InputBegan:Connect(function()
	idle = false
	ReplicatedStorageEvent:FireServer(false)
end)
-------------------------


 
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
				if key == "k" then --Camera controls
				        if cam == ("car") then
							Camera.CameraSubject = player.Character.Humanoid
							Camera.CameraType = ("Custom")
							cam = ("freeplr")
							Camera.FieldOfView = 70
							limitButton.Text = "Free Camera"
							wait(3)
							limitButton.Text = ""
						elseif cam == ("freeplr") then
							Camera.CameraSubject = player.Character.Humanoid
							Camera.CameraType = ("Attach")
							cam = ("lockplr")
							Camera.FieldOfView = 45
							limitButton.Text = "FPV Camera"
							wait(3)
							limitButton.Text = ""
				        elseif cam == ("lockplr") then
							Camera.CameraSubject = carSeat
							Camera.CameraType = ("Custom")
							cam = ("car")
							Camera.FieldOfView = 70
							limitButton.Text = "Standard Camera"
							wait(3)
							limitButton.Text = ""
				        end
			end
		end)
-- functions



local function Raycast(position, direction, ignore)
	local ray		= Ray.new(position, direction)
	local success	= false
	local h, p, n, humanoid
	
	table.insert(ignore, Workspace.Effects)
	
	repeat
		h, p, n	= Workspace:FindPartOnRayWithIgnoreList(ray, ignore)
		
		if h then
			humanoid	= h.Parent:FindFirstChildOfClass("Humanoid")
			if humanoid and humanoid.Health <= 0 then
				humanoid	= nil
			end
			if humanoid then
				success	= true
			else
				if h.CanCollide and h.Transparency < 1 then
					success	= true
				else
					table.insert(ignore, h)
					success	= false
				end
			end
		else
			success	= true
		end
	until success
	
	return h, p, n, humanoid
end
--Scripts


UserInputService.InputBegan:Connect(function(key) --When player holds shift key, run code
 if key.KeyCode == Enum.KeyCode.LeftShift then
 Character.Humanoid.WalkSpeed = SpeedBoost
 end 
end)

UserInputService.InputEnded:Connect(function(key)-- When player lets go of shift key, run code
 if key.KeyCode == Enum.KeyCode.LeftShift then
 Character.Humanoid.WalkSpeed = DefaultSpeed
 end
end)
-------- OMG HAX



r = game:service("RunService")


local damage = 5


local slash_damage = 20


sword = script.Parent.Handle
Tool = script.Parent


SlashSound = sword.Swoosh1

function isTurbo(character)
	return character:FindFirstChild("PaperHat") ~= nil
end


function blow(hit)

	local humanoid = hit.Parent:findFirstChild("Humanoid")
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
	if humanoid~=nil and humanoid ~= hum and hum ~= nil then
		-- final check, make sure sword is in-hand

		local right_arm = vCharacter:FindFirstChild("Right Arm")
		if (right_arm ~= nil) then
			local joint = right_arm:FindFirstChild("RightGrip")
			if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
				local d = damage
				if (isTurbo(vCharacter) == true) then d = d * 2.5 end
				tagHumanoid(humanoid, vPlayer)
				humanoid:TakeDamage(d)
				sword.Splat.Volume = 1
				wait(1)
				untagHumanoid(humanoid)
			end
		end


	end
end


function tagHumanoid(humanoid, player)
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = humanoid
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end


function attack()
	damage = slash_damage
	SlashSound:play()
	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Slash"
	anim.Parent = Tool
end


function swordUp()
	Tool.GripForward = Vector3.new(-1,0,0)
	Tool.GripRight = Vector3.new(0,1,0)
	Tool.GripUp = Vector3.new(0,0,1)
end

function swordOut()
	Tool.GripForward = Vector3.new(0,0,1)
	Tool.GripRight = Vector3.new(0,-1,0)
	Tool.GripUp = Vector3.new(-1,0,0)
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

	

	attack()

	wait(2.2)

	sword.Splat.Volume = 0
	Tool.Enabled = true


end


function onEquipped()
	sword.Splat.Volume = 0
	SlashSound:play()
end


script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)


connection = sword.Touched:connect(blow)
-- When someone steps on the food, drop what they're holding and attach the food to them along with an eatingScript
-- (They must: Not be the creator, be alive, have a right arm, not be eating, and not be poisoned)


Food.Touched:connect(function(otherPart)
	if otherPart and otherPart.Parent and otherPart.Parent:IsA("Model") and otherPart.Parent ~= creator then
		local otherModel = otherPart.Parent
		if otherModel:FindFirstChild("Humanoid") and otherModel.Humanoid.Health > 0 and otherModel:FindFirstChild("Right Arm") then
			local otherHumanoid = otherModel.Humanoid
			if not otherHumanoid:FindFirstChild(eatingScript.Name) and not otherHumanoid:FindFirstChild("Poisoned") then
				if Food:FindFirstChild("SelfDestruct") then Food.SelfDestruct:Destroy() end -- lol
				if Food:FindFirstChild("BodyGyro") then Food.BodyGyro:Destroy() end
				local children = otherModel:GetChildren()
				for i = 1, #children do -- Remove current Tool
					local child = children[i]
					if child and child:IsA("Tool") then
						child.Parent = Workspace
						break
					end
				end
				Food.Parent = otherModel
				local weld = Instance.new("Weld", Game.JointsService)
				weld.Part0 = otherModel["Right Arm"]
				weld.Part1 = Food
				weld.C1 = CFrame.Angles(math.pi/2, 0, 0) + Vector3.new(0, 0, 1.4)
				local eatingScriptClone = eatingScript:Clone()
				Game:GetService("Debris"):AddItem(eatingScriptClone, 60) -- In case non-player humanoids pick it up
				eatingScriptClone.Parent = otherHumanoid
				eatingScriptClone.Disabled = false
				script:Destroy()
			end
		end
	end
end)
------//Sprinting Animations


self.RightSprint 	= CFrame.new(-1, 1.5, -0.45) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0));
self.LeftSprint 	= CFrame.new(1,1.35,-0.75) * CFrame.Angles(math.rad(-30),math.rad(35),math.rad(-25));

return self
-- Convenience function so that calling code does not have to first get the activeController
-- and then call GetMoveVector on it. When there is no active controller, this function returns
-- nil so that this case can be distinguished from no current movement (which returns zero vector).


function ControlModule:GetMoveVector()
	if self.activeController then
		return self.activeController:GetMoveVector()
	end
	return Vector3.new(0,0,0)
end

function ControlModule:GetActiveController()
	return self.activeController
end

function ControlModule:EnableActiveControlModule()
	if self.activeControlModule == ClickToMove then
		-- For ClickToMove, when it is the player's choice, we also enable the full keyboard controls.
		-- When the developer is forcing click to move, the most keyboard controls (WASD) are not available, only jump.
		self.activeController:Enable(
			true,
			Players.LocalPlayer.DevComputerMovementMode == Enum.DevComputerMovementMode.UserChoice,
			self.touchJumpController
		)
	elseif self.touchControlFrame then
		self.activeController:Enable(true, self.touchControlFrame)
	else
		self.activeController:Enable(true)
	end
end

function ControlModule:Enable(enable)
	if not self.activeController then
		return
	end

	if enable == nil then
		enable = true
	end
	if enable then
		self:EnableActiveControlModule()
	else
		self:Disable()
	end
end
--		print("Wha " .. pose)


		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

	if (setAngles) then
		local desiredAngle = amplitude * math.sin(time * frequency)

		RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
		LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
		RightHip:SetDesiredAngle(-desiredAngle)
		LeftHip:SetDesiredAngle(-desiredAngle)
	end

	-- Tool Animation handling
	local tool = getTool()
	if tool and tool:FindFirstChild("Handle") then
	
		local animStringValueObject = getToolAnim(tool)

		if animStringValueObject then
			toolAnim = animStringValueObject.Value
			-- message recieved, delete StringValue
			animStringValueObject.Parent = nil
			toolAnimTime = time + .3
		end

		if time > toolAnimTime then
			toolAnimTime = 0
			toolAnim = "None"
		end

		animateTool()		
	else
		stopToolAnimations()
		toolAnim = "None"
		toolAnimInstance = nil
		toolAnimTime = 0
	end
end
--[=[
	Chains a Promise from this one that is resolved if this Promise is already resolved, and rejected if it is not resolved at the time of calling `:now()`. This can be used to ensure your `andThen` handler occurs on the same frame as the root Promise execution.

	```lua
	doSomething()
		:now()
		:andThen(function(value)
			print("Got", value, "synchronously.")
		end)
	```

	If this Promise is still running, Rejected, or Cancelled, the Promise returned from `:now()` will reject with the `rejectionValue` if passed, otherwise with a `Promise.Error(Promise.Error.Kind.NotResolvedInTime)`. This can be checked with [[Error.isKind]].

	@param rejectionValue? any -- The value to reject with if the Promise isn't resolved
	@return Promise
]=]


function Promise.prototype:now(rejectionValue)
	local traceback = debug.traceback(nil, 2)
	if self._status == Promise.Status.Resolved then
		return self:_andThen(traceback, function(...)
			return ...
		end)
	else
		return Promise.reject(rejectionValue == nil and Error.new({
			kind = Error.Kind.NotResolvedInTime,
			error = "This Promise was not resolved in time for :now()",
			context = ":now() was called at:\n\n" .. traceback,
		}) or rejectionValue)
	end
end
--[[Susupension]]


	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 400		-- Spring Dampening
	Tune.FSusStiffness	= 17000		-- Spring Force
	Tune.FSusLength		= 1.9		-- Resting Suspension length (in studs)
	Tune.FSusMaxExt		= .15		-- Max Extension Travel (in studs)
	Tune.FSusMaxComp	= .05		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 75		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 6			-- Wishbone Length
	Tune.FWsBoneAngle	= 3			-- 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	= 400		-- Spring Dampening
	Tune.RSusStiffness	= 17000		-- Spring Force
	Tune.RSusLength		= 2.1		-- Resting Suspension length (in studs)
	Tune.RSusMaxExt		= .15		-- Max Extension Travel (in studs)
	Tune.RSusMaxComp	= .05		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
	
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 2			-- 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		= "Bronze"		-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 8				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
-- GUI


local weaponsGUI = script.Parent
local weapon1Label = weaponsGUI.Weapon1
local weapon2Label = weaponsGUI.Weapon2
local weapon3Label = weaponsGUI.Weapon3

local primaryWeaponSlot = localPlayer.Backpack:WaitForChild("Primary")
local secondaryWeaponSlot = localPlayer.Backpack:WaitForChild("Secondary")
local tertiaryWeaponSlot = localPlayer.Backpack:WaitForChild("Tertiary")

local heatBar = weaponsGUI.HeatBar
local images = weaponsGUI:WaitForChild("Images")
-- Automatically installs user-added maps on server start.
-- 
-- ForbiddenJ



LogHolder = require(game.ServerScriptService.LogHolder)

MapWorkspace = workspace.MapWorkspace
OwnerMapInstallFolder = game.ServerStorage.Maps

function InstallMap(map)
	local success, messages = script.Parent.InstallMap:Invoke(map)
	local log = LogHolder.new()
	log:BulkLog(messages)
	log:SendToServerLog()
----------------------------------
------------FUNCTIONS-------------
----------------------------------



function Receive(player, action, ...)
	local args = {...}
	if player == User and action == "play" then
		HighlightPianoKey(args[1])
		Connector:FireAllClients("play", User, args[1], Settings.SoundSource.Position, Settings.PianoSoundRange, Settings.PianoSounds)
	elseif player == User and action == "abort" then
		Deactivate()
		if SeatWeld then
			SeatWeld:remove()
		end
	end
end
function Activate(player)
	Connector:FireClient(player, "activate", Settings.CameraCFrame, Settings.PianoSounds)
	User = player
end
function Deactivate()
	Connector:FireClient(User, "deactivate")
	User = nil
end
----- sink plug handler -----



plug.Interactive.ClickDetector.MouseClick:Connect(function()
	if plugged.Value == false then
		plugged.Value = true
		plug.Plug.CFrame = plug.Plug.CFrame * CFrame.new(0, -0.08, 0)
		plug.Interactive.CFrame = plug.Interactive.CFrame * CFrame.new(0, 0.14, 0)
		plug.Shaft.CFrame = plug.Shaft.CFrame * CFrame.new(0, 0.14, 0)
	else
		plugged.Value = false
		plug.Plug.CFrame = plug.Plug.CFrame * CFrame.new(0, 0.08, 0)
		plug.Interactive.CFrame = plug.Interactive.CFrame * CFrame.new(0, -0.14, 0)
		plug.Shaft.CFrame = plug.Shaft.CFrame * CFrame.new(0, -0.14, 0)
	end
end)
--// Handling Settings		


	Firerate = 60 / 600; -- 60 = 1 Minute, 600 = 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
--		print(animName .. " " .. idx .. " [" .. origRoll .. "]")


		local anim = animTable[animName][idx].anim

		-- load it to the humanoid; get AnimationTrack
		oldAnimTrack = currentAnimTrack
		currentAnimTrack = humanoid:LoadAnimation(anim)
		 
		-- play the animation
		currentAnimTrack:Play(transitionTime)
		currentAnim = animName

		-- set up keyframe name triggers
		if (currentAnimKeyframeHandler ~= nil) then
			currentAnimKeyframeHandler:Disconnect()
		end
		currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:Connect(keyFrameReachedFunc)
	end
end
-- Tween variables


local tweenInfo = TweenInfo.new(
	TWEEN_TIME,  -- Time
	Enum.EasingStyle.Quad,  -- EasingStyle
	Enum.EasingDirection.InOut,  -- EasingDirection
	-1,  -- RepeatCount (when less than zero the tween will loop indefinitely)
	true  -- Reverses (tween will reverse once reaching its goal)
)
local function startTween()
	-- If the part is already tweening, prevent it from starting a new tween
	if inTween == true then
		return
	end
	-- Calculate new CFrame for part position
	local offsetCFrame = CFrame.new(0, TWEEN_MOVE_DISTANCE, 0)
	local newCFrame = partToTween.CFrame:ToWorldSpace(offsetCFrame)
	-- Create a tween and play it
	local tweenPart = TweenService:Create(partToTween, tweenInfo, {CFrame = newCFrame})
	tweenPart:Play()
	inTween = true
	-- On tween completion, make part ready for another tween
	tweenPart.Completed:Connect(function()
		inTween = false
	end)
end

startTween()
--[[
	Creates the initial systems
]]


function SystemManager.createSystems()
	local generatorModel = CollectionService:GetTagged(Constants.Tag.System.Generator)[1]
	systems.generator = Generator.new(generatorModel)

	local engineModel = CollectionService:GetTagged(Constants.Tag.System.Engine)[1]
	systems.engine = Engine.new(engineModel)

	local gravityModel = CollectionService:GetTagged(Constants.Tag.System.Gravity)[1]
	systems.gravity = Gravity.new(gravityModel)

	local lightsModel = CollectionService:GetTagged(Constants.Tag.System.Lights)[1]
	systems.lights = Lights.new(lightsModel)

	local cameraModel = CollectionService:GetTagged(Constants.Tag.System.Camera)[1]
	systems.camera = Camera.new(cameraModel)

	local shieldModel = CollectionService:GetTagged(Constants.Tag.System.Shield)[1]
	systems.shield = Shield.new(shieldModel)
end