Pinkstack/roblox-luau-corpus-text huggingface dataset:
--GreenEgg--



Event.Hitbox.Touched:Connect(function(hit)
	if hit.Parent:IsA("Tool") and hit.Parent.Name == ToolRequired then
		if game.ReplicatedStorage.ItemSwitching.Value == true then
			hit.Parent:Destroy()
		end
		Event.LocksLeft.Value = Event.LocksLeft.Value - 1
		Event.Robot.Transparency = 0
		Event.TeleportEffectPad.Insert:Play()
		Event.Hitbox.RobotHint:Destroy()
		script.Disabled = true
	end
end)

Event.Hitbox.ClickDetector.MouseClick:Connect(function(plr)
	if plr.Backpack:FindFirstChild(ToolRequired) then
		if game.ReplicatedStorage.ItemSwitching.Value == true then
			plr.Backpack:FindFirstChild(ToolRequired):Destroy()
		end
		Event.LocksLeft.Value = Event.LocksLeft.Value - 1
		Event.Robot.Transparency = 0
		Event.TeleportEffectPad.Insert:Play()
		Event.Hitbox.RobotHint:Destroy()
		script.Disabled = true
	end
end)
--local roPrompts = require(game.ReplicatedStorage.roPrompts)



ReplicatedStorage.BuyEvent.OnServerEvent:Connect(function(player, toolname)

	--local prompt = roPrompts.New({
	--	Type = roPrompts.PromptType.Confirm,
	--	Title = 'Confirm Purchase',
	--	Description = 'Are you sure you would like to buy this tool?',
	--	PrimaryButton = 'Confirm',
	--	SecondaryButton = 'Cancel'
	--})

	--roPrompts:PromptPlayer(player, prompt)

	--if roPrompts:PromptPlayer(player, prompt) then

		local Setting = ToolSettings[toolname]

		if not Setting then return end

		local Price = (player.MembershipType == Premium and Setting.PremiumPrice) or Setting.Price

		local Cash = player.leaderstats.Cash

		local Backpack = player:WaitForChild("Backpack")

		if Cash.Value >= Price then
			Cash.Value -= Price
			Setting.Tool:Clone().Parent = Backpack
		end

	--end

end)
--// SS Controls - remastered for 4/2020. it's been long enough


 
wait(.5)
local player = game.Players.LocalPlayer
local HB = script.Parent.HB
local HUB = HB.HUB
local radio = HB.Radio
local Camera = game.Workspace.CurrentCamera
local cam = script.Parent.nxtcam.Value
local carSeat = script.Parent.CarSeat.Value
local mouse = game.Players.LocalPlayer:GetMouse()
local windows = false
local handler = carSeat:WaitForChild('Filter')
local ts = game:GetService("TweenService")

local ctrl = false
local dd = false
local mph = (10/12) * (60/88)
local stt = 0
local st = false

local mode = 0
--// Positioning


	RightArmPos = CFrame.new(-0.902175903, 0.295501232, -1.07592201, 1, 0, 0, 0, 1.19248806e-08, 1, 0, -1, 1.19248806e-08);
	LeftArmPos = CFrame.new(-0.0318467021, -0.0621779114, -1.67288721, 0.787567914, -0.220087856, 0.575584888, -0.615963876, -0.308488727, 0.724860668, 0.0180283934, -0.925416589, -0.378522098);
	GunPos = CFrame.new(0.284460306, -0.318524063, 1.06423128, 1, 0, 0, 0, -2.98023224e-08, -0.99999994, 0, 0.99999994, -2.98023224e-08);
	
	}

return Settings
------------------------------------------
--Digets




function Click0()
Input = Input..0
print("0") 
script.Parent.B0.Decal.Texture = "http://www.roblox.com/asset/?id=2767674"
wait(0.1)
script.Parent.B0.Decal.Texture = "http://www.roblox.com/asset/?id=2761903"
end

script.Parent.B0.ClickDetector.MouseClick:connect(Click0)

function Click1()
Input = Input..1
print("1")
script.Parent.B1.Decal.Texture = "http://www.roblox.com/asset/?id=2767677"
wait(0.1)
script.Parent.B1.Decal.Texture = "http://www.roblox.com/asset/?id=2761913"
end

script.Parent.B1.ClickDetector.MouseClick:connect(Click1)

function Click2()
Input = Input..2
print("2")
script.Parent.B2.Decal.Texture = "http://www.roblox.com/asset/?id=2767680"
wait(0.1)
script.Parent.B2.Decal.Texture = "http://www.roblox.com/asset/?id=2761922"
end

script.Parent.B2.ClickDetector.MouseClick:connect(Click2)

function Click3()
Input = Input..3
print("3")
script.Parent.B3.Decal.Texture = "http://www.roblox.com/asset/?id=2767686"
wait(0.1)
script.Parent.B3.Decal.Texture = "http://www.roblox.com/asset/?id=2761927"
end

script.Parent.B3.ClickDetector.MouseClick:connect(Click3)

function Click4()
Input = Input..4
print("4")
script.Parent.B4.Decal.Texture = "http://www.roblox.com/asset/?id=2767693"
wait(0.1)
script.Parent.B4.Decal.Texture = "http://www.roblox.com/asset/?id=2761938"
end

script.Parent.B4.ClickDetector.MouseClick:connect(Click4)

function Click5()
Input = Input..5
print("5")
script.Parent.B5.Decal.Texture = "http://www.roblox.com/asset/?id=2767695"
wait(0.1)
script.Parent.B5.Decal.Texture = "http://www.roblox.com/asset/?id=2761943"
end

script.Parent.B5.ClickDetector.MouseClick:connect(Click5)

function Click6()
Input = Input..6
print("6")
script.Parent.B6.Decal.Texture = "http://www.roblox.com/asset/?id=2767699"
wait(0.1)
script.Parent.B6.Decal.Texture = "http://www.roblox.com/asset/?id=2761948"
end

script.Parent.B6.ClickDetector.MouseClick:connect(Click6)

function Click7()
Input = Input..7
print("7")
script.Parent.B7.Decal.Texture = "http://www.roblox.com/asset/?id=2767701"
wait(0.1)
script.Parent.B7.Decal.Texture = "http://www.roblox.com/asset/?id=2761956"
end

script.Parent.B7.ClickDetector.MouseClick:connect(Click7)

function Click8()
Input = Input..8
print("8")
script.Parent.B8.Decal.Texture = "http://www.roblox.com/asset/?id=2767707"
wait(0.1)
script.Parent.B8.Decal.Texture = "http://www.roblox.com/asset/?id=2761961"
end

script.Parent.B8.ClickDetector.MouseClick:connect(Click8)

function Click9()
Input = Input..9
print("9")
script.Parent.B9.Decal.Texture = "http://www.roblox.com/asset/?id=2767714"
wait(0.1)
script.Parent.B9.Decal.Texture = "http://www.roblox.com/asset/?id=2761971"
end

script.Parent.B9.ClickDetector.MouseClick:connect(Click9)
-- I have seen this script so many times in many free models that
-- I don't know who made this in the first place, I just modified
-- some parts of the script to serve my purposes.



function onClicked(hit)
    print(hit.Name)
    print(hit.Parent.Name)
	if hit.Character:findFirstChild("Humanoid") ~= nil and hit.Character:findFirstChild("Chest") == nil then
		local g = script.Parent.Parent.Chest:clone()
		g.Parent = hit.Character
		local C = g:GetChildren()
		for i=1, #C do
			if C[i].className == "Part" or C[i].className == "UnionOperation" or  C[i].className == "MeshPart" then
				local W = Instance.new("Weld")
				W.Part0 = g.Middle
				W.Part1 = C[i]
				local CJ = CFrame.new(g.Middle.Position)
				local C0 = g.Middle.CFrame:inverse()*CJ
				local C1 = C[i].CFrame:inverse()*CJ
				W.C0 = C0
				W.C1 = C1
				W.Parent = g.Middle
			end
				local Y = Instance.new("Weld")
				Y.Part0 = hit.Character.Torso
				Y.Part1 = g.Middle
				Y.C0 = CFrame.new(0, 0, 0)
				Y.Parent = Y.Part0
		end

		local h = g:GetChildren()
		for i = 1, # h do
			if h[i].className == "Part" or C[i].className == "UnionOperation"  or C[i].className == "MeshPart" then
				h[i].Anchored = false
				h[i].CanCollide = false
			end
		end
		
	end
	
	if hit.Character:findFirstChild("Humanoid") ~= nil and hit.Character:findFirstChild("Headgear") == nil then
		local g = script.Parent.Parent.Headgear:clone()
		g.Parent = hit.Character
		local C = g:GetChildren()
		for i=1, #C do
			if C[i].className == "Part" or C[i].className == "UnionOperation" or  C[i].className == "MeshPart" then
				local W = Instance.new("Weld")
				W.Part0 = g.Middle
				W.Part1 = C[i]
				local CJ = CFrame.new(g.Middle.Position)
				local C0 = g.Middle.CFrame:inverse()*CJ
				local C1 = C[i].CFrame:inverse()*CJ
				W.C0 = C0
				W.C1 = C1
				W.Parent = g.Middle
			end
				local Y = Instance.new("Weld")
				Y.Part0 = hit.Parent.Head
				Y.Part1 = g.Middle
				Y.C0 = CFrame.new(0, 0, 0)
				Y.Parent = Y.Part0
		end

		local h = g:GetChildren()
		for i = 1, # h do
			if h[i].className == "Part" or C[i].className == "UnionOperation" or  C[i].className == "MeshPart" then
				h[i].Anchored = false
				h[i].CanCollide = false
			end
		end
		
	end	
	
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- This function should handle all controller enabling and disabling without relying on
-- ControlModule:Enable() and Disable()


function ControlModule:SwitchToController(controlModule)
	-- controlModule is invalid, just disable current controller
	if not controlModule then
		if self.activeController then
			self.activeController:Enable(false)
		end
		self.activeController = nil
		self.activeControlModule = nil
		return
	end

	-- first time switching to this control module, should instantiate it
	if not self.controllers[controlModule] then
		self.controllers[controlModule] = controlModule.new(CONTROL_ACTION_PRIORITY)
	end

	-- switch to the new controlModule
	if self.activeController ~= self.controllers[controlModule] then
		if self.activeController then
			self.activeController:Enable(false)
		end
		self.activeController = self.controllers[controlModule]
		self.activeControlModule = controlModule -- Only used to check if controller switch is necessary

		if self.touchControlFrame and (self.activeControlModule == ClickToMove
					or self.activeControlModule == TouchThumbstick
					or self.activeControlModule == DynamicThumbstick) then
			if not self.controllers[TouchJump] then
				self.controllers[TouchJump] = TouchJump.new()
			end
			self.touchJumpController = self.controllers[TouchJump]
			self.touchJumpController:Enable(true, self.touchControlFrame)
		else
			if self.touchJumpController then
				self.touchJumpController:Enable(false)
			end
		end

		self:UpdateActiveControlModuleEnabled()
	end
end

function ControlModule:OnLastInputTypeChanged(newLastInputType)
	if lastInputType == newLastInputType then
		warn("LastInputType Change listener called with current type.")
	end
	lastInputType = newLastInputType

	if lastInputType == Enum.UserInputType.Touch then
		-- TODO: Check if touch module already active
		local touchModule, success = self:SelectTouchModule()
		if success then
			while not self.touchControlFrame do
				wait()
			end
			self:SwitchToController(touchModule)
		end
	elseif computerInputTypeToModuleMap[lastInputType] ~= nil then
		local computerModule = self:SelectComputerMovementModule()
		if computerModule then
			self:SwitchToController(computerModule)
		end
	end

	self:UpdateTouchGuiVisibility()
end
--!nonstrict
--[[ Constants ]]

--
local ZERO_VECTOR3 = Vector3.new(0,0,0)
local TOUCH_CONTROLS_SHEET = "rbxasset://textures/ui/Input/TouchControlsSheetV2.png"

local DYNAMIC_THUMBSTICK_ACTION_NAME = "DynamicThumbstickAction"
local DYNAMIC_THUMBSTICK_ACTION_PRIORITY = Enum.ContextActionPriority.High.Value

local MIDDLE_TRANSPARENCIES = {
	1 - 0.89,
	1 - 0.70,
	1 - 0.60,
	1 - 0.50,
	1 - 0.40,
	1 - 0.30,
	1 - 0.25
}
local NUM_MIDDLE_IMAGES = #MIDDLE_TRANSPARENCIES

local FADE_IN_OUT_BACKGROUND = true
local FADE_IN_OUT_MAX_ALPHA = 0.35

local SAFE_AREA_INSET_MAX = 100

local FADE_IN_OUT_HALF_DURATION_DEFAULT = 0.3
local FADE_IN_OUT_BALANCE_DEFAULT = 0.5
local ThumbstickFadeTweenInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)

local Players = game:GetService("Players")
local GuiService = game:GetService("GuiService")
local UserInputService = game:GetService("UserInputService")
local ContextActionService = game:GetService("ContextActionService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")

local FFlagUserDynamicThumbstickMoveOverButtons do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserDynamicThumbstickMoveOverButtons2")
	end)
	FFlagUserDynamicThumbstickMoveOverButtons = success and result
end

local FFlagUserDynamicThumbstickSafeAreaUpdate do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserDynamicThumbstickSafeAreaUpdate")
	end)
	FFlagUserDynamicThumbstickSafeAreaUpdate = success and result
end

local LocalPlayer = Players.LocalPlayer
if not LocalPlayer then
	Players:GetPropertyChangedSignal("LocalPlayer"):Wait()
	LocalPlayer = Players.LocalPlayer
end
--LIGHTING FUNCTIONS



script.Parent.OnServerEvent:connect(function(pl,n) if lt~=1 then pr = true else pr=false end lt=n
	if lt == 0 then
		RefMt.DesiredAngle = RefMt.CurrentAngle%math.rad(360)
		RefMt.CurrentAngle = RefMt.CurrentAngle%math.rad(360)
		UpdateLt(1,white)
		UpdatePt(false,white)
		StopMt(pr)
		repeat wait() until lt~=0
	elseif (lt == 1 or lt == 2) then
		wait(.375)
		local color
		if lt==1 then color=blue elseif lt==2 then color=red end
		RefMt.DesiredAngle = RefMt.CurrentAngle%math.rad(360)
		RefMt.CurrentAngle = RefMt.CurrentAngle%math.rad(360)
		UpdateLt(.25,color)
		UpdatePt(true,color)
		UpdateMt(0,math.rad(225),4)
		wait(.75)
		repeat
			if lt==1 then color=blue elseif lt==2 then color=red end
			UpdateLt(.25,color)
			UpdatePt(true,color)
			UpdateMt(0,math.rad(135),0)
			wait(.5)
			if lt~=1 and lt~=2 then break end
			if lt==1 then color=blue elseif lt==2 then color=red end
			UpdateLt(.25,color)
			UpdatePt(true,color)
			UpdateMt(0,math.rad(225),0)
			wait(.5)
		until (lt~=1 and lt~= 2)
	elseif lt == 3 then
		wait(.5)
		UpdateLt(.25,red)
		UpdatePt(true,red)
		UpdateMt(0,9e9,1)
		repeat wait() until lt~=3
	end
end)
--[[ Constants ]]

--

local IMAGE_DISK = "rbxasset://textures/ui/Input/Disk_padded.png"
local IMAGE_RING = "rbxasset://textures/ui/Input/Ring_padded.png"

local MIDDLE_TRANSPARENCIES = {
	1 - 0.69,
	1 - 0.50,
	1 - 0.40,
	1 - 0.30,
	1 - 0.20,
	1 - 0.10,
	1 - 0.05
}
local NUM_MIDDLE_IMAGES = #MIDDLE_TRANSPARENCIES

local TOUCH_IS_TAP_TIME_THRESHOLD = 0.5
local TOUCH_IS_TAP_DISTANCE_THRESHOLD = 25

local HasFadedBackgroundInPortrait = false
local HasFadedBackgroundInLandscape = false
local FadeInAndOutBackground = true
local FadeInAndOutMaxAlpha = 0.35

local FADE_IN_OUT_HALF_DURATION_DEFAULT = 0.3
local FADE_IN_OUT_HALF_DURATION_ORIENTATION_CHANGE = 2
local FADE_IN_OUT_BALANCE_DEFAULT = 0.5
local FadeInAndOutHalfDuration = FADE_IN_OUT_HALF_DURATION_DEFAULT
local FadeInAndOutBalance = FADE_IN_OUT_BALANCE_DEFAULT
-- Define the mouse event handlers for resizing the window


resizeButton.MouseButton1Down:Connect(function()
	-- Store the mouse position offset relative to the window position
	local windowPos = windowFrame.AbsolutePosition
	local windowSize = windowFrame.AbsoluteSize
	local mousePos = UserInputService:GetMouseLocation()
	mouseOffset = Vector2.new(windowPos.X + windowSize.X - mousePos.X, windowPos.Y + windowSize.Y - mousePos.Y)

	-- Connect the mouse move and up events for resizing the window
	local mouseMoveConn = UserInputService.InputChanged:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseMovement then
			-- Calculate the new size of the window based on the mouse position
			local mousePos = UserInputService:GetMouseLocation()
			local newSize = Vector2.new(mousePos.X - windowPos.X + mouseOffset.X, mousePos.Y - windowPos.Y + mouseOffset.Y)

			-- Constrain the new size of the window to within the minimum and maximum size
			newSize = Vector2.new(math.clamp(newSize.X, minSize.X, maxSize.X), math.clamp(newSize.Y, minSize.Y, maxSize.Y))

			-- Update the size of the window
			windowFrame.Size = UDim2.new(0, newSize.X, 0, newSize.Y)
		end
	end)

	local mouseUpConn
	mouseUpConn = UserInputService.InputEnded:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseButton1 then
			-- Disconnect the mouse move and up events for resizing the window
			mouseMoveConn:Disconnect()
			mouseUpConn:Disconnect()
		end
	end)
end)
----------------------------------------------------------------------------------------------------
-------------------=[ PROJETIL ]=-------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


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

	,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 = 3
	,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
--------------------------------------------------------


local prev = Tool:FindFirstChild("Handle")

local ModelChild = script.Parent:GetChildren() 
for i = 1,#ModelChild do 
	if (ModelChild[i].className == "Part") or (ModelChild[i].className == "MeshPart") then 
		if (prev ~= nil)then 
			local weld = Instance.new("Weld") 
			weld.Part0 = prev 
			weld.Part1 = ModelChild[i] 
			weld.C0 = prev.CFrame:inverse() 
			weld.C1 = ModelChild[i].CFrame:inverse() 
			weld.Parent = prev 
		end 
		ModelChild[i].Anchored = false
		prev = ModelChild[i] 
	end 
	---- If ModelChild is a Model ---
	if ModelChild[i]:IsA("Model") then
		local prev2 = prev
	local parts2 = ModelChild[i]:GetChildren() 
		for i = 1,#parts2 do 
			if (parts2[i].className == "Part") or (parts2[i].className == "UnionOperation") then 
				if (prev2 ~= nil)then 
				local weld = Instance.new("Weld") 
				weld.Part0 = prev2 
				weld.Part1 = parts2[i] 
				weld.C0 = prev2.CFrame:inverse() 
				weld.C1 = parts2[i].CFrame:inverse() 
				weld.Parent = prev2 
				end 
			parts2[i].Anchored = false
			prev2 = parts2[i] 
			end 
		end 
	end
end 

wait(3) 
script:remove()
--[[
	Returns the enums.PrimaryButtonModes that is reflective of the ownership and
	equip status from the specified `assetId` and `assetType` of a MerchBooth
	accessory.

	Default mode is Purchase. Ownership is checked through
	MarketplaceService:PlayerOwnsAsset; if the accessory is owned, then equip
	status is then checked through the player's HumanoidDescription first and
	the humanoid's accessories second.

	This function is called when the MerchBooth is opened.
]]



local MarketplaceService = game:GetService("MarketplaceService")

local MerchBooth = script:FindFirstAncestor("MerchBooth")

local enums = require(MerchBooth.enums)
local types = require(MerchBooth.types)
local isItemEquipped = require(MerchBooth.Modules.isItemEquipped)

return function(mockMarketplaceService: MarketplaceService)
	MarketplaceService = mockMarketplaceService or MarketplaceService

	local function getButtonModeAsync(player: Player, itemInfo: types.ItemInfo): string
		local character = player and player.Character
		local humanoid = character and character:FindFirstChildOfClass("Humanoid")
		local mode = enums.PrimaryButtonModes.Purchase

		if humanoid then
			if itemInfo.isOwned then
				mode = enums.PrimaryButtonModes.Owned

				--if itemInfo.assetType then
				--	mode = enums.PrimaryButtonModes.CanEquip
				--	local description = humanoid:GetAppliedDescription()
				--	if isItemEquipped(description, itemInfo) then
				--		mode = enums.PrimaryButtonModes.Equipped
				--	end
				--end
			elseif itemInfo.price < 0 then
				mode = enums.PrimaryButtonModes.NotForSale
			end
		end

		return mode
	end

	return getButtonModeAsync
end
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
-- Main Logic



local function Reflect(surfaceNormal, bulletNormal)
	return bulletNormal - (2 * bulletNormal:Dot(surfaceNormal) * surfaceNormal)
end

function Fire(direction)
	-- Called when we want to fire the gun.
	if Tool.Parent:IsA("Backpack") then return end -- Can't fire if it's not equipped.
	-- Note: Above isn't in the event as it will prevent the CanFire value from being set as needed.
	
	-- UPD. 11 JUNE 2019 - Add support for random angles.
	local directionalCF = CFrame.new(Vector3.new(), direction)
	-- Now, we can use CFrame orientation to our advantage.
	-- Overwrite the existing Direction value.
	local direction = (directionalCF * CFrame.fromOrientation(0, 0, RNG:NextNumber(0, TAU)) * CFrame.fromOrientation(math.rad(RNG:NextNumber(MIN_BULLET_SPREAD_ANGLE, MAX_BULLET_SPREAD_ANGLE)), 0, 0)).LookVector
	
	-- UPDATE V6: Proper bullet velocity!
	-- IF YOU DON'T WANT YOUR BULLETS MOVING WITH YOUR CHARACTER, REMOVE THE THREE LINES OF CODE BELOW THIS COMMENT.
	-- Requested by https://www.roblox.com/users/898618/profile/
	-- We need to make sure the bullet inherits the velocity of the gun as it fires, just like in real life.
	local humanoidRootPart = Tool.Parent:WaitForChild("HumanoidRootPart", 1)	-- Add a timeout to this.
	local myMovementSpeed = humanoidRootPart.Velocity							-- To do: It may be better to get this value on the clientside since the server will see this value differently due to ping and such.
	local modifiedBulletSpeed = (direction * BULLET_SPEED)-- + myMovementSpeed	-- We multiply our direction unit by the bullet speed. This creates a Vector3 version of the bullet's velocity at the given speed. We then add MyMovementSpeed to add our body's motion to the velocity.
	
	local simBullet = Caster:Fire(FirePointObject.WorldPosition, direction, modifiedBulletSpeed, CastBehavior)
	-- Optionally use some methods on simBullet here if applicable.
	
	-- Play the sound
	PlayFireSound()
end

local function KnockBack(hitPos, impactStrength)
	local boom = Instance.new("Explosion")
	boom.BlastPressure = 30000*impactStrength
	boom.BlastRadius = 2
	boom.Visible = false
	boom.ExplosionType = Enum.ExplosionType.NoCraters
	boom.DestroyJointRadiusPercent = 0
	boom.Position = hitPos
	boom.Parent = workspace.Terrain
	Debris:AddItem(boom, .1)
end
--// # key, ManOn


mouse.KeyDown:connect(function(key)
	if key=="f" then 
		veh.Lightbar.middle.Man:Play()
		veh.Lightbar.middle.Wail.Volume = 0
		veh.Lightbar.middle.Yelp.Volume = 0
		veh.Lightbar.middle.Priority.Volume = 0
		script.Parent.Parent.Sirens.Man.BackgroundColor3 = Color3.fromRGB(215, 135, 110)
		veh.Lightbar.MAN.Transparency = 0
	end
end)
-- Libraries


local Roact = require(Vendor:WaitForChild('Roact'))
local ToolManualWindow = require(UI:WaitForChild('ToolManualWindow'))

local function ListenForManualWindowTrigger(Text, ThemeColor, SignatureButton)
    local HelpButton = SignatureButton:WaitForChild('HelpButton')

	local IsManualOpen = false
	local ManualHandle = nil

	local function BeginHover()
		if not IsManualOpen then
			HelpButton.TextTransparency = 0
			HelpButton:WaitForChild('Background').BackgroundTransparency = 0
		end
	end

	local function EndHover()
		if not IsManualOpen then
			HelpButton.TextTransparency = 0.5
			HelpButton:WaitForChild('Background').BackgroundTransparency = 0.75
		end
	end

	local function ToggleManual()
		HelpButton.TextTransparency = IsManualOpen and 0 or 0.5
		HelpButton:WaitForChild('Background').BackgroundTransparency = IsManualOpen and 0 or 0.75

        -- Close manual if open
        if IsManualOpen then
			EndHover()
			IsManualOpen = false
			ManualHandle = Roact.unmount(ManualHandle)

        -- Open manual if closed
        else
			BeginHover()
			IsManualOpen = true
			local ManualElement = Roact.createElement(ToolManualWindow, {
				Text = Text;
				ThemeColor = ThemeColor;
			})
			ManualHandle = Roact.mount(ManualElement, Core.UI, 'ToolManualWindow')
		end
	end

	-- Enable help button
	SignatureButton.Activated:Connect(ToggleManual)
	HelpButton.Activated:Connect(ToggleManual)
	SignatureButton.InputBegan:Connect(BeginHover)
	SignatureButton.InputEnded:Connect(EndHover)
	HelpButton.InputBegan:Connect(BeginHover)
	HelpButton.InputEnded:Connect(EndHover)
end

return ListenForManualWindowTrigger