Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- Ensures that 'expected' is of type 'number'


local function ensureExpectedIsNumber(expected: any, matcherName: string, options: MatcherHintOptions?): ()
	-- ROBLOX deviation: we do not support a "bigint" type
	if typeof(expected) ~= "number" then
		-- Prepend maybe not only for backward compatibility
		local matcherString = matcherName

		if not options then
			matcherString = "[.never]" .. matcherString
		end

		error(
			Error(
				matcherErrorMessage(
					matcherHint(matcherString, nil, nil, options),
					EXPECTED_COLOR("expected") .. " value must be a number",
					printWithType("Expected", expected, printExpected)
				)
			)
		)
	end
end
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,VRecoil = {12,14}				--- Vertical Recoil
	,HRecoil = {14,16}				--- Horizontal Recoil
	,AimRecover = .8				---- Between 0 & 1
	
	,RecoilPunch = .15
	,VPunchBase = 2.74				--- Vertical Punch
	,HPunchBase = 2.25				--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless
	
	,AimRecoilReduction = 5 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0.2
	,MinRecoilPower = .25
	,MaxRecoilPower = 3.5
	,RecoilPowerStepAmount = .25
	
	,MinSpread = 0.56				--- Min bullet spread value | Studs
	,MaxSpread = 40					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 0.95
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0.25				--- Weapon Base Sway | Studs
	,MaxSway =	1.5					--- Max sway value based on player stamina | Studs
--edit the function below to return true when you want this response/prompt to be valid
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data


return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	if plrData.Character.Injuries.DryBlood.Value == true then
		return true
	end
	return false
end
--[[
				hitsound.Volume=.5+(.5*math.random())
				hitsound.Pitch=.5+math.random()
				hitsound:Play()
--]]


				if RightShoulder and LeftShoulder then
					RightShoulder.CurrentAngle=0
					LeftShoulder.CurrentAngle=0
				end
			end
		end
		lastattack=time
	end
end


Humanoid.Died:Connect(onDied)
Humanoid.Running:Connect(onRunning)
Humanoid.Jumping:Connect(onJumping)
Humanoid.Climbing:Connect(onClimbing)
Humanoid.GettingUp:Connect(onGettingUp)
Humanoid.FreeFalling:Connect(onFreeFall)
Humanoid.FallingDown:Connect(onFallingDown)
Humanoid.Seated:Connect(onSeated)
Humanoid.PlatformStanding:Connect(onPlatformStanding)

local DetectionRange = 200

function populatehumanoids()
	local Pos = Torso.CFrame.p + Vector3.new(1,1,1) * DetectionRange
	local Neg = Torso.CFrame.p - Vector3.new(1,1,1) * DetectionRange
	local Region = Region3.new(Neg,Pos)
	local Parts = workspace:FindPartsInRegion3WithIgnoreList(Region,{sp,sp:WaitForChild("creator").Value.Character},math.huge)
	for _,parts in pairs(Parts) do
		if parts and parts.Parent then
			local Hum,FF = parts.Parent:FindFirstChildOfClass("Humanoid"),parts.Parent:FindFirstChildOfClass("ForceField")
			if Hum and Hum.Health ~= 0 and not FF and not IsTeamMate(sp:WaitForChild("creator").Value,game:GetService("Players"):GetPlayerFromCharacter(Hum.Parent)) and not IsInTable(humanoids,Hum) then
				table.insert(humanoids,Hum)
			end
		end
	end
end
-- Provide functionality to the local API endpoint instance


SyncAPI.OnInvoke = function (...)

	-- Route requests to server endpoint if in filter mode
	if not RunService:IsServer() then
		return ServerEndpoint:InvokeServer(...)

	-- Perform requests locally if working locally
	else
		SyncModule = require(SyncAPI:WaitForChild 'SyncModule')
		return SyncModule.PerformAction(game.Players.LocalPlayer, ...)
	end;

end;
-- returns the tangent vector in the direction of the path made by the bezier at t
-- in order to get a derivative of a Bezier, you need at least 2 points in the Bezier


function Bezier:CalculateDerivativeAt(t: number): Vector3?
	
	-- check if t is between 0 and 1
	if type(t) ~= "number" then
		error("Bezier:CalculateDerivativeAt() only accepts a number, got " .. tostring(t) .. "!")
	end
	
	-- start algorithm to calculate bezier derivative
	local points = self.Points
	local numPoints = #points
	
	-- check if there are at least 2 points
	if numPoints > 1 then
		
		-- important values
		local points = self:GetAllPoints()
		local n = #points
		local m = n - 1
		
		-- calculate derivative at t
		local cPrime_t do
			cPrime_t = Vector3.new()
			for i = 1, n - 1 do
				local p_i1, p_i = points[i + 1], points[i]
				local Q_i = (n - 1) * (p_i1 - p_i)
				local B_mit = B(n - 2, i - 1, t)
				cPrime_t += B_mit * Q_i
			end
		end
		
		-- return derivative
		return cPrime_t
	else 
		
		-- not enough points
		error("Bezier:CalculateDerivativeAt() only works if there are at least 2 BezierPoints!")
	end
end
--[[
	Adds a new context entry to this component's context table (which will be
	passed down to child components).
]]


function Component:__addContext(key, value)
	if config.internalTypeChecks then
		internalAssert(Type.of(self) == Type.StatefulComponentInstance, "Invalid use of `__addContext`")
	end
	local virtualNode = self[InternalData].virtualNode

	-- Make sure we store a reference to the component's original, unmodified
	-- context the virtual node. In the reconciler, we'll restore the original
	-- context if we need to replace the node (this happens when a node gets
	-- re-rendered as a different component)
	if virtualNode.originalContext == nil then
		virtualNode.originalContext = virtualNode.context
	end

	-- Build a new context table on top of the existing one, then apply it to
	-- our virtualNode
	local existing = virtualNode.context
	virtualNode.context = assign({}, existing, { [key] = value })
end
-- Create a new ray info object.
-- This is just a utility alias with some extra type checking.


function FastCast.newBehavior(): FastCastBehavior
	-- raycastParams, maxDistance, acceleration, canPierceFunction, cosmeticBulletTemplate, cosmeticBulletContainer, autoIgnoreBulletContainer
	return {
		RaycastParams = nil,
		Acceleration = Vector3.new(),
		MaxDistance = 1000,
		CanPierceFunction = nil,
		CosmeticBulletTemplate = nil,
		CosmeticBulletContainer = nil,
		AutoIgnoreContainer = true
	}
end

local DEFAULT_DATA_PACKET = FastCast.newBehavior()
function FastCast:Fire(origin: Vector3, direction: Vector3, velocity: Vector3 | number, castDataPacket: FastCastBehavior)
	if castDataPacket == nil then castDataPacket = DEFAULT_DATA_PACKET end
		
	local cast = ActiveCast.new(self, origin, direction, velocity, castDataPacket)
	cast.RayInfo.WorldRoot = self.WorldRoot
	return cast
end
--//Logic


game.Workspace.Changed:connect(function(p) --
	if p == "CurrentCamera" then
		Camera = game.Workspace.CurrentCamera
		if Blur and Blur.Parent then
			Blur.Parent = Camera
		else
			Blur = Instance.new("BlurEffect",Camera)
		end
	end
end)

game:GetService("RunService").Heartbeat:connect(function()
	if not Blur or Blur.Parent == nil then Blur = Instance.new("BlurEffect",Camera) end --
	
	local magnitude = (Camera.CFrame.lookVector - Last).magnitude -- 
	Blur.Size = math.abs(magnitude)*BlurAmount -- 
	Last = Camera.CFrame.lookVector -- 
end)
--Made by Superluck, Uploaded by FederalSignal_QCB.
--Made by Superluck, Uploaded by FederalSignal_QCB.
--Made by Superluck, Uploaded by FederalSignal_QCB.


function Cancel()
wait(0.1)
script.Timer.Disabled = true
script.Timer.Disabled = false
script.Parent.Parent.Sound.Sound2.SoundId = script.Parent.Parent.Sound.Sound.SoundId
if bingbong == 0 then
bingbong = 0
script.Parent.Parent.Scripts.Scripts.Aux.Disabled = true
script.Parent.Parent.Scripts.Scripts.Off.Disabled = false
script.Parent.Parent.Scripts.Scripts.On.Disabled = true
script.Parent.Parent.Sound.Sound.EmitterSize = script.Parent.SoundblockSize.Value/10
script.Parent.Parent.Sound.Sound2.EmitterSize = script.Parent.SoundblockSize.Value/10
script.Wail.Disabled = true 
script.Parent.Parent.Scripts.Scripts.Hilo.Disabled = true
script.Parent.Parent.Scripts.Scripts.Pulse.Disabled = true
else
bingbong = 0
script.Parent.Parent.Scripts.Scripts.Aux.Disabled = true
script.Parent.Parent.Scripts.Scripts.Off.Disabled = true
script.Parent.Parent.Scripts.Scripts.On.Disabled = true
script.Parent.Parent.Sound.Sound.EmitterSize = 0
script.Parent.Parent.Sound.Sound2.EmitterSize = 0
script.Parent.Parent.Sound.Sound.PlaybackSpeed = 0.25
script.Parent.Parent.Sound.Sound2.PlaybackSpeed = 0.25
script.Wail.Disabled = true 
script.Parent.Parent.Scripts.Scripts.Hilo.Disabled = true
script.Parent.Parent.Scripts.Scripts.Pulse.Disabled = true
script.Parent.Amp.Value = false
end
end

function Wail()
script.Timer.Disabled = false
script.Parent.Scripts.On.MaxPitch.Value = 1
bingbong = 0
script.Parent.Parent.Sound.Sound.EmitterSize = script.Parent.SoundblockSize.Value/10
script.Parent.Parent.Sound.Sound2.EmitterSize = script.Parent.SoundblockSize.Value/10
script.Parent.Amp.Value = true
script.Parent.Parent.Scripts.Scripts.Off.Disabled = false
script.Parent.Parent.Scripts.Scripts.On.Disabled = true
script.Wail.Disabled = false
end
function Alert()
script.Timer.Disabled = false
script.Parent.Scripts.On.MaxPitch.Value = 1
bingbong = 0
script.Parent.Parent.Sound.Sound.EmitterSize = script.Parent.SoundblockSize.Value/10
script.Parent.Parent.Sound.Sound2.EmitterSize = script.Parent.SoundblockSize.Value/10
script.Parent.Amp.Value = true
script.Parent.Parent.Scripts.Scripts.Off.Disabled = true
script.Parent.Parent.Scripts.Scripts.On.Disabled = false
end
function Alt(tone)
bingbong = 0
script.Parent.Amp.Value = true
if tone == 1 then
script.Parent.Parent.Scripts.Scripts.Hilo.Disabled = false
script.Parent.Parent.Scripts.Scripts.Pulse.Disabled = true
elseif tone == 0 then
script.Parent.Parent.Scripts.Scripts.Hilo.Disabled = true
script.Parent.Parent.Scripts.Scripts.Pulse.Disabled = false
end
end
function Aux()
script.Parent.Amp.Value = true
bingbong = 1
script.Parent.Parent.Scripts.Scripts.Aux.Disabled = false
end
-- stops specific anim


function module.alreadPlayingAnim(name,hum, data)
	local stop = data.stop or nil
	local speed = data.speed or nil
	local resume = data.resume or nil
	local tim = data.tim or nil
	
	local AnimationTracks = hum:GetPlayingAnimationTracks()

	for i, track in pairs (AnimationTracks) do
		if stop~= nil then 
			if track.Name == name then
				track:Stop()
			end
		end
		if speed~= nil then 
			if track.Name == name then
				track:AdjustSpeed(speed)
				
				-- continue?
				if resume ~= nil then
					task.delay(tim or 1, function()
						track:AdjustSpeed(1)
					end)
				end
				
				-- delay?
				
				
			end
		end
	end

end
-- ANimation


local Sound = script:WaitForChild("Haoshoku Sound")

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.C and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" then
		Debounce = 2
		Track1 = plr.Character.Humanoid:LoadAnimation(script.AnimationCharge)
		Track1:Play()
		script.RemoteEventS:FireServer()
		for i = 1,math.huge do
			if Debounce == 2 then
				
				plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position, Mouse.Hit.p)
				plr.Character.HumanoidRootPart.Anchored = true
			else
				
				break
				end
	     wait()
	  end
	end
end)

UIS.InputEnded:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.C and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" then
		Debounce = 3
		local Track2 = plr.Character.Humanoid:LoadAnimation(script.AnimationRelease)
		Track2:Play()
		Track1:Stop()
		Sound:Play()
		local mousepos = Mouse.Hit
		script.RemoteEvent:FireServer(mousepos,Mouse.Hit.p)
		wait(1)
		Track2:Stop()
		plr.Character.HumanoidRootPart.Anchored = false
		wait(.5)
		Tool.Active.Value = "None"
		wait(3)
		Debounce = 1
	end
end)
-----------------------------------------------------------------------------------------------


local ButtonsFrame = script.Parent.Buttons

ButtonsFrame:WaitForChild("Speed")

local player=game.Players.LocalPlayer
local mouse=player:GetMouse()

local car = script.Parent.Car.Value
car.DriveSeat.HeadsUpDisplay = false

local _Tune = require(car["A-Chassis Tune"])

local _pRPM = _Tune.PeakRPM
local _lRPM = _Tune.Redline

local currentUnits = 1
local revEnd = math.ceil(_lRPM/1000)



script.Parent.Values.Velocity.Changed:connect(function(property)
	ButtonsFrame.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units
end)

ButtonsFrame.HornButton.MouseButton1Down:Connect(function()
	car.DriveSeat.Horn:Play()
end)

ButtonsFrame.HornButton.MouseButton1Up:Connect(function()
	car.DriveSeat.Horn:Stop()
end)

wait(.1)
--[[wait(.05)
	stat = p:WaitForChild("leaderstats")
	pris = stat:WaitForChild("Prison Time")
	pris.Changed:connect(function()
		if (pris.Value > 0) then
			p.TeamColor = BrickColor.new(Prison)
			wait(1)
			pris.Value = pris.Value - 1
		elseif (pris.Value == 0) then
			for i,v in pairs(p.Character:GetChildren()) do
				if v:IsA("BasePart") then
					v.Anchored = true
				end
			end
			p.Character.Humanoid.WalkSpeed = 0
			p.TeamColor = BrickColor.new(Visitor)
			p:LoadCharacter()
			pris.Value = -1
		end
end)--]]



while wait(1) do
	p = game.Players.LocalPlayer
	stat = p:WaitForChild("leaderstats")
	pris = stat:WaitForChild("Prison Time")
	if (pris.Value > 0) then
		p.TeamColor = BrickColor.new(Prison)
		pris.Value = pris.Value - 1
	end
end
--[[
	Used for setting the default selection for a gamepad.

	When mounted, this component will set its Parent as
	`GuiService.SelectedObject` so that the gamepad has an element to interact
	with by default.

	Usage:

	    Roact.createElement("ImageButton", {
	        Image = ...
	        Size = UDim2.fromOffset(200, 50),
	    }, {
	        SelectParent = Roact.createElement(SelectParent)
	    })
]]



local GuiService = game:GetService("GuiService")
local UserInputService = game:GetService("UserInputService")

local ExperienceComponents = script:FindFirstAncestor("ExperienceComponents")

local Roact = require(ExperienceComponents.Parent.Roact)
local ExternalEventConnection = require(ExperienceComponents.Parent.ExternalEventConnection)
local onInstanceLoaded = require(ExperienceComponents.Modules.onInstanceLoaded)
local getCurrentDevice = require(ExperienceComponents.Modules.getCurrentDevice)
local enums = require(ExperienceComponents.enums)

local SelectParent = Roact.Component:extend("SelectParent")

export type Props = {
	playerGuiClass: string,
	GuiService: GuiService,
	UserInputService: UserInputService,
}

export type State = {
	device: string,
	selection: GuiObject,
}

SelectParent.defaultProps = {
	playerGuiClass = "PlayerGui",
	GuiService = GuiService,
	UserInputService = UserInputService,
}

function SelectParent:init()
	self.ref = Roact.createRef()

	self.setCurrentDevice = function()
		local props: Props = self.props

		local lastInputType = props.UserInputService:GetLastInputType() or Enum.UserInputType.Keyboard

		self:setState({
			device = getCurrentDevice(lastInputType),
		})
	end
end

function SelectParent:render()
	local props: Props = self.props

	return Roact.createElement("Folder", {
		[Roact.Ref] = self.ref,
	}, {
		LastInputTypeChanged = Roact.createElement(ExternalEventConnection, {
			event = props.UserInputService.LastInputTypeChanged,
			callback = self.setCurrentDevice,
		}),
	})
end

function SelectParent:didUpdate(_, prevState: State)
	local state: State = self.state
	local props: Props = self.props

	if state ~= prevState then
		if state.device == enums.Device.Gamepad then
			props.GuiService.SelectedObject = state.selection
		end
	end
end

function SelectParent:didMount()
	local props: Props = self.props
	local instance: Folder = self.ref:getValue()

	self.setCurrentDevice()

	onInstanceLoaded(instance, function()
		-- Setting SelectedObject to an instance that is not a descendant of a
		-- PlayerGui throws an error. This is used to suppress that error in stories
		-- since they are parented to CoreGui.
		if not instance:FindFirstAncestorOfClass(props.playerGuiClass) then
			return
		end

		self:setState({
			selection = instance.Parent,
		})
	end)
end

return SelectParent
--[[Controls]]

--
	
	Tune.Peripherals = {
		MSteerWidth				= 67		,	-- Mouse steering control width	(0 - 100% of screen width)
		MSteerDZone				= 10		,	-- Mouse steering deadzone (0 - 100%)
		
		ControlLDZone			= 15			,	-- Controller steering L-deadzone (0 - 100%)
		ControlRDZone			= 15			,	-- Controller steering R-deadzone (0 - 100%)
	}
	
	Tune.Controls = {
		
	--Keyboard Controls
		--Mode Toggles
		ToggleTCS				= Enum.KeyCode.T					,
		ToggleABS				= Enum.KeyCode.Y					,
		ToggleTransMode			= Enum.KeyCode.M					,
		ToggleMouseDrive		= Enum.KeyCode.R					,
		
		--Primary Controls
		Throttle				= Enum.KeyCode.Up					,
		Brake					= Enum.KeyCode.Down					,
		SteerLeft				= Enum.KeyCode.Left					,
		SteerRight				= Enum.KeyCode.Right				,
		
		--Secondary Controls
		Throttle2				= Enum.KeyCode.W					,
		Brake2					= Enum.KeyCode.S					,
		SteerLeft2				= Enum.KeyCode.A					,
		SteerRight2				= Enum.KeyCode.D					,
		
		--Manual Transmission
		ShiftUp					= Enum.KeyCode.E					,
		ShiftDown				= Enum.KeyCode.Q					,
		Clutch					= Enum.KeyCode.P					,
		
		--Handbrake
		PBrake					= Enum.KeyCode.LeftShift			,
		
	--Mouse Controls
		MouseThrottle			= Enum.UserInputType.MouseButton1	,
		MouseBrake				= Enum.UserInputType.MouseButton2	,
		MouseClutch				= Enum.KeyCode.W					,
		MouseShiftUp			= Enum.KeyCode.E					,
		MouseShiftDown			= Enum.KeyCode.Q					,
		MousePBrake				= Enum.KeyCode.LeftShift			,
		
	--Controller Mapping
		ContlrThrottle			= Enum.KeyCode.ButtonR2				,
		ContlrBrake				= Enum.KeyCode.ButtonL2				,
		ContlrSteer				= Enum.KeyCode.Thumbstick1			,
		ContlrShiftUp			= Enum.KeyCode.ButtonY				,
		ContlrShiftDown			= Enum.KeyCode.ButtonX				,
		ContlrClutch			= Enum.KeyCode.ButtonR1				,
		ContlrPBrake			= Enum.KeyCode.ButtonL1				,
		ContlrToggleTMode		= Enum.KeyCode.DPadUp				,
		ContlrToggleTCS			= Enum.KeyCode.DPadDown				,
		ContlrToggleABS			= Enum.KeyCode.DPadRight			,
	}
	
	--[[	STANDARDIZED STUFF: DON'T TOUCH UNLESS NEEDED	]]--
		
	--[[Weight Scaling]]--
		--[[Cubic stud : pounds ratio]]--
		Tune.WeightScaling = 1/130 --Default = 1/130 (1 cubic stud = 130 lbs)
		
	
	return Tune
-- Roblox character sound script



local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local FootstepsSoundGroup = game:GetService("SoundService"):WaitForChild("Footsteps")

local SOUND_DATA = {
	Climbing = {
		SoundId = "rbxassetid://145180175",
		Looped = true,
	},
	Died = {
		SoundId = "rbxassetid://155288625",
	},
	FreeFalling = {
		SoundId = "rbxasset://sounds/action_falling.mp3",
		Looped = true,
	},
	GettingUp = {
		SoundId = "rbxasset://sounds/action_get_up.mp3",
	},
	Jumping = {
		SoundId = "rbxasset://sounds/action_jump.mp3",
	},
	Landing = {
		SoundId = "rbxasset://sounds/action_jump_land.mp3",
	},
	Running = {
		SoundId = '' ,
		Looped = true,
		Playing = true,
		Pitch = 1,
	},
	Splash = {
		SoundId = "rbxasset://sounds/impact_water.mp3",
	},
	Swimming = {
		SoundId = "rbxasset://sounds/action_swim.mp3",
		Looped = true,
		Pitch = 1.6,
	},
}

 -- wait for the first of the passed signals to fire
local function waitForFirst(...)
	local shunt = Instance.new("BindableEvent")
	local slots = {...}

	local function fire(...)
		for i = 1, #slots do
			slots[i]:Disconnect()
		end

		return shunt:Fire(...)
	end

	for i = 1, #slots do
		slots[i] = slots[i]:Connect(fire)
	end

	return shunt.Event:Wait()
end
Rocket.CanCollide = false





Tool.Note:clone().Parent = Rocket

Tool.RocketScript:clone().Parent = Rocket

--Tool.Explosion:clone().Parent = Rocket

--Tool.Swoosh:clone().Parent = Rocket





function fire(vTarget)



	local vCharacter = Tool.Parent;

	

	local vHandle = Tool:findFirstChild("Handle")

	if vHandle == nil then

		print("Handle not found")

		return 

	end



	local chord = nil



	if (Tool.mode.Value==1) then

		chord = Tool.uno:clone()

	elseif (Tool.mode.Value==2) then

		chord = Tool.dos:clone()

	elseif (Tool.mode.Value==3) then

		chord = Tool.tres:clone()

	elseif (Tool.mode.Value==4) then

		chord = Tool.cuatro:clone()

	elseif (Tool.mode.Value==5) then

		chord = Tool.cinco:clone()

	elseif (Tool.mode.Value==6) then

		chord = Tool.seis:clone()

	elseif (Tool.mode.Value==7) then

		chord = Tool.siete:clone()

	end

	

	chord.Name = "chord"



	local dir = Vector3.new(math.random()-.5, 1, math.random() - .5).unit



	local missile = Rocket:clone()



	chord.Parent = missile



	local pos = vHandle.Position + Vector3.new(0, 5 ,0)

	

	--missile.Position = pos

	missile.CFrame = CFrame.new(pos,  pos + dir)

	missile.BodyVelocity.velocity = dir * 30

	local vPlayer = game.Players:playerFromCharacter(vCharacter)



	if vPlayer == nil then

		print("Player not found")

	end
	

	missile.RocketScript.Disabled = false


	missile.Parent = game.Workspace

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)



	Tool.Enabled = true

end





script.Parent.Activated:connect(onActivated)
--	elseif stream == "Fog" then --fog
--		script.Parent.Handle.Sound.PlaybackSpeed = 0.75
--		wait(0.07)
--		script.Parent.Nozzle.Water2.Enabled = true
--		script.Parent.Nozzle.Water.Enabled = false
--		local missile = Instance.new("Part")
--		missile.Name = "Water"
--		missile.formFactor = 1
--		missile.Size = Vector3.new(1,1,1)
--		missile.CanCollide = true
--		missile.Transparency = 0.5
--		local waterscript = script.Parent.WaterScript2:clone()
--		waterscript.Disabled = false
--		waterscript.Parent = missile
--		local thrust = script.Parent.BodyThrust:clone()
--		thrust.Parent = missile
--		if swap == true then
--		num = num * -1
--		missile.CFrame = script.Parent.Nozzle.CFrame * CFrame.new(0, -1, .5) * CFrame.Angles(math.rad(90)+num,0,0)
--		swap = false
--		else
--		num2 = num2 * -1
--		missile.CFrame = script.Parent.Nozzle.CFrame * CFrame.new(0, -1, .5) * CFrame.Angles(math.rad(90),num2,0)
--		swap = true
--		end
--		missile.Parent = game.Workspace
--		missile:SetNetworkOwner(player)
--	end


end)
--[=[
	Like Blend.Spring, but for AccelTween

	@param source any -- Source observable (or convertable)
	@param acceleration any -- Source acceleration (or convertable)
	@return Observable
]=]


function Blend.AccelTween(source, acceleration)
	local sourceObservable = Blend.toPropertyObservable(source) or Rx.of(source)
	local accelerationObservable = Blend.toNumberObservable(acceleration)

	local function createAccelTween(maid, initialValue)
		local accelTween = AccelTween.new(initialValue)

		if accelerationObservable then
			maid:GiveTask(accelerationObservable:Subscribe(function(value)
				assert(type(value) == "number", "Bad value")
				accelTween.a = value
			end))
		end

		return accelTween
	end

	-- TODO: Centralize and cache
	return Observable.new(function(sub)
		local accelTween
		local maid = Maid.new()

		local startAnimate, stopAnimate = StepUtils.bindToRenderStep(function()
			sub:Fire(accelTween.p)
			return accelTween.rtime > 0
		end)

		maid:GiveTask(stopAnimate)
		maid:GiveTask(sourceObservable:Subscribe(function(value)
			accelTween = accelTween or createAccelTween(maid, value)
			accelTween.t = value
			startAnimate()
		end))

		return maid
	end)
end
---Set Interpolated Camera


function module.SetCamera(Player,Target)
	local camera = workspace.CurrentCamera
	camera.CameraType = Enum.CameraType.Scriptable

	local tween = TweenService:Create(
		camera,
		TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut),
		{
			CFrame = Target,
			--Focus = Cached_Dealership.PrimaryPart.CFrame
		}
	)
	tween:Play()
end