Pinkstack/roblox-luau-corpus-text huggingface dataset:
--By: StealthCloset AKA StealthMouse



function onTouched(hit) 
	local human = hit.Parent:findFirstChild("Humanoid") 
	if (human == nil ) then return end
	local PlayerName = hit.Parent.Name
	if (PlayerName == nil) then return end

	local NameOfTool = "HUD"
	if (game.Players:findFirstChild(PlayerName).PlayerGui:findFirstChild(NameOfTool) == nil) then
		if (script:findFirstChild(NameOfTool) ~= nil) then
			script:findFirstChild(NameOfTool):clone().Parent = game.Players:findFirstChild(PlayerName).PlayerGui
			game.Players:findFirstChild(PlayerName).PlayerGui:findFirstChild(NameOfTool):findFirstChild("LocalScript").PNames.Value = (PlayerName)
		end
	end
	wait(1)
end 

script.Parent.Touched:connect(onTouched)
--[[Weld functions]]



	local JS = game:GetService("JointsService")
	local PGS_ON = workspace:PGSIsEnabled()
	
	function MakeWeld(x,y,type,s) 
		if type==nil then type="Weld" end
		local W=Instance.new(type,JS) 
		W.Part0=x W.Part1=y 
		W.C0=x.CFrame:inverse()*x.CFrame 
		W.C1=y.CFrame:inverse()*x.CFrame 
		if type=="Motor" and s~=nil then 
			W.MaxVelocity=s 
		end 
		return W	
	end
	
	function ModelWeld(a,b) 
		if a:IsA("BasePart") then 
			MakeWeld(b,a,"Weld") 
		elseif a:IsA("Model") or a:IsA("Folder") then 
			for i,v in pairs(a:GetChildren()) do 
				ModelWeld(v,b) 
			end 
		end 
	end
	
	function UnAnchor(a) 
		if a:IsA("BasePart") then a.Anchored=false  end for i,v in pairs(a:GetChildren()) do UnAnchor(v) end 
	end
-- << FUNCTIONS >>


function module:GetData(dataStore, datastoreRetries, key)
	return module:DataStoreRetry(datastoreRetries, function()
		return dataStore:GetAsync(key)
	end)
end

function module:DataStoreRetry(datastoreRetries, dataStoreFunction)
	local tries = 0	
	local success = true
	local data = nil
	local errorMsg = ""
	repeat
		tries = tries + 1
		success, errorMsg = pcall(function() data = dataStoreFunction() end)
		if not success then wait(1) end
	until tries == datastoreRetries or success
	if not success then
		warn("HD Admin | Could not access DataStore | ".. tostring(errorMsg))
		 --Cannot access DataStore
	end
	return success, data
end



return module
----- Script: ------



local function UpdateButton ()
	if Skin.Quantity.Value == 0 then
		Button.Visible = false
	else
		Button.Visible = true
	end
end

local function QuantityTextUpdate ()
	QuantityText.Text = Skin.Quantity.Value
end

Skin.Quantity.Changed:Connect(UpdateButton)
Skin.Quantity.Changed:Connect(QuantityTextUpdate)

QuantityTextUpdate()
UpdateButton()

Button.Activated:Connect(function()
	
	InformationText.Text = LocalInformationText.Value
	InformationCaseText.Text = LocalCaseInformationText.Value
	InformationImage.Image = Image.Image
	
end)
--Main


function handleEquip(tool)
	if tool then
		if tool.Parent ~= char then
			hum:EquipTool(tool)
		else
			hum:UnequipTools()
		end
	end
end

function create()

	local toShow = #inputOrder
	local totalX = (toShow*iconSize.X.Offset)+((toShow+1)*iconBorder.x)
	local totalY = iconSize.Y.Offset + (2*iconBorder.y)
	
	frame.Size = UDim2.new(0, totalX, 0, totalY)
	frame.Position = UDim2.new(0.5, -(totalX/2), 1, -(totalY+(iconBorder.y*2)))
	frame.Visible = true

	for i = 1, #inputOrder do
		
		local value = inputOrder[i]		
		local clone = template:Clone()
		clone.Parent = frame
		clone.Label.Text = value["txt"]
		clone.Name = value["txt"]
		clone.Visible = true
		clone.Position = UDim2.new(0, (i-1)*(iconSize.X.Offset)+(iconBorder.x*i), 0, iconBorder.y)
		clone.ImageTransparency = unequipped

		local tool = value["tool"]
		if tool then
			clone.Tool.Image = tool.TextureId
		end

		clone.Tool.MouseButton1Down:Connect(function()
			for key, value in pairs(inputKeys) do
				if value["txt"] == clone.Name then
					handleEquip(value["tool"]) 
				end 
			end
		end)

	end	
	template:Destroy()
end

function setup()
	local tools = bp:GetChildren()
	for i = 1, #tools do
		for i = 1, #inputOrder do
			local value = inputOrder[i]
			if not value["tool"] then
				value["tool"] = tools[i]	
				break
			end
		end
	end
	create()
end

function adjust()
	for key, value in pairs(inputKeys) do
		local tool = value["tool"]
		local icon = frame:FindFirstChild(value["txt"])
		if tool then
			icon.Tool.Image = tool.TextureId
			if tool.Parent == char then
				icon.ImageTransparency = equipped
			else
				icon.ImageTransparency = unequipped
			end
		else
			icon.Tool.Image = ""
			icon.ImageTransparency = unequipped
		end
	end
end

function onKeyPress(inputObject)
	local key = inputObject.KeyCode.Name
	local value = inputKeys[key]
	if value and uis:GetFocusedTextBox() == nil then
		handleEquip(value["tool"])
	end 
end

function handleAddition(adding)

	if adding:IsA("Tool") then
		local new = true

		for key, value in pairs(inputKeys) do
			local tool = value["tool"]
			if tool then
				if tool == adding then
					new = false
				end
			end
		end

		if new then
			for i = 1, #inputOrder do
				local tool = inputOrder[i]["tool"]
				if not tool then
					inputOrder[i]["tool"] = adding
					break
				end
			end
		end

	adjust()
	end
end

function handleRemoval(removing) 
	if removing:IsA("Tool") then
		if removing.Parent ~= char and removing.Parent ~= bp then

			for i = 1, #inputOrder do
				if inputOrder[i]["tool"] == removing then
					inputOrder[i]["tool"] = nil
					break
				end
			end
		end

		adjust()
	end
end

uis.InputBegan:Connect(onKeyPress) --keyinput 

char.ChildAdded:Connect(handleAddition)
char.ChildRemoved:Connect(handleRemoval)

bp.ChildAdded:Connect(handleAddition)
bp.ChildRemoved:Connect(handleRemoval)

setup()
-- turn off the viewmodel system


local function disableviewmodel()
	isfirstperson = false
	if viewmodel.Parent ~= nil then
		viewmodel.Parent = nil
	end
	if rigtype == "R15" then
		-- disable viewmodel joints, enable real character joints
		rightshoulderclone.Enabled = false
		leftshoulderclone.Enabled = false
		viewmodel.Parent = nil
		-- reset shoulder joints to normal
		leftshoulder.Parent = larm
		leftshoulder.Part0 = torso
		leftshoulder.Part1 = larm
		rightshoulder.Parent = rarm
		rightshoulder.Part0 = torso
		rightshoulder.Part1 = rarm
		--
		leftshoulder.Enabled = true
		rightshoulder.Enabled = true
		--
		armtransparency = 0
		visiblearms(false)
	else
		rightshoulderclone.Enabled = false
		leftshoulderclone.Enabled = false
		viewmodel.Parent = nil
		-- reset shoulder joints to normal, anchor the arms
		--[[
		leftshoulder.Parent = torso
		leftshoulder.Part0 = torso
		leftshoulder.Part1 = larm
		rightshoulder.Parent = torso
		rightshoulder.Part0 = torso
		rightshoulder.Part1 = rarm]]
		--
		
		larm.Anchored = false
		rarm.Anchored = false
		
		leftshoulder.Enabled = true
		rightshoulder.Enabled = true
		
		--
		armtransparency = 0
		visiblearms(false)
	end
end
--			if Xdir > 0 then -- if going ?North? then ignore, else (?South?); Jump 
--				Hit = nil  -- ignore
--			elseif Xdir == 0 then -- else swerve (only while in logic).


			if Xdir == 0 then
				Hit = Aitorso-- this should result in Hit = true-but-don't-attemp-a-jump, so swerve; doesn't check floor!
--------END LIGHT SET 1--------
--------DJ BACKLIGHT--------



game.Workspace.djbacklight.l1.BrickColor = BrickColor.new(game.Workspace.Lighting.cyandj.Value)
game.Workspace.djbacklight.l2.BrickColor = BrickColor.new(game.Workspace.Lighting.cyandj.Value)
game.Workspace.djbacklight.l3.BrickColor = BrickColor.new(game.Workspace.Lighting.cyandj.Value)
game.Workspace.djbacklight.l4.BrickColor = BrickColor.new(game.Workspace.Lighting.cyandj.Value)
----
----


	if hit.Parent:findFirstChild("Humanoid") ~= nil then
		local target1 = "LeftLowerLeg"
		local target2 = "LeftLowerLeg2"
		if hit.Parent:findFirstChild(target2) == nil then
			local g = script.Parent.Parent[target2]:clone()
			g.Parent = hit.Parent
			local C = g:GetChildren()
			for i=1, #C do
				if C[i].className == "UnionOperation" or C[i].className =="Part" or C[i].className == "WedgePart" 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[target1]
				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
			h[i].Anchored = false
			h[i].CanCollide = false
		end
	end
	end
--For R15 avatars


Animations = {
	R15Slash = 522635514,
	R15Lunge = 522638767
}

Damage = DamageValues.BaseDamage

Grips = {
	Up = CFrame.new(0, 0, 0),
	Out = CFrame.new(0, 0, 0)
}

Sounds = {
	Slash = Handle:WaitForChild("SwordSlash"),
	Lunge = Handle:WaitForChild("SwordLunge"),
	Unsheath = Handle:WaitForChild("Unsheath")
}

ToolEquipped = false
--	====================
--	BASIC
--	A basic settings for the gun
--	====================


	
		UseCommonVisualEffects = true; --Enable to use default visual effect folder named "Common". Otherwise, use visual effect with specific tool name (ReplicatedStorage -> Miscs -> GunVisualEffects)
		AutoReload = true; --Reload automatically when you run out of mag; disabling it will make you reload manually
	
		PrimaryHandle = "Handle";
		SecondaryHandle = "Handle2"; --Check "DualWeldEnabled" for detail
	
		CustomGripEnabled = false; --NOTE: Must disable "RequiresHandle" first
		CustomGripName = "Handle";
		CustomGripPart0 = {"Character", "Left Arm"}; --Base
		CustomGripPart1 = {"Tool", "Handle"}; --Target
		AlignC0AndC1FromDefaultGrip = true;
		CustomGripCFrame = false;
		CustomGripC0 = CFrame.new(0, 0, 0);
		CustomGripC1 = CFrame.new(0, 0, 0);	
		
		--CustomGripPart[0/1] = {Ancestor, InstanceName}
		--Supported ancestors: Tool, Character
		--NOTE: Don't set "CustomGripName" to "RightGrip"
-- PRIVATE FUNCTIONS


function ZoneController._registerZone(zone)
   	registeredZones[zone] = true
	local registeredJanitor = zone.janitor:add(Janitor.new(), "destroy")
	zone._registeredJanitor = registeredJanitor
	registeredJanitor:add(zone.updated:Connect(function()
		ZoneController._updateZoneDetails()
	end), "Disconnect")
   ZoneController._updateZoneDetails()
end

function ZoneController._deregisterZone(zone)
	registeredZones[zone] = nil
	zone._registeredJanitor:destroy()
	zone._registeredJanitor = nil
	ZoneController._updateZoneDetails()
end

function ZoneController._registerConnection(registeredZone, registeredTriggerType)
	local originalItems = dictLength(registeredZone.activeTriggers)
	activeConnections += 1
	if originalItems == 0 then
		activeZones[registeredZone] = true
		ZoneController._updateZoneDetails()
	end
	local currentTriggerCount = activeTriggers[registeredTriggerType]
	activeTriggers[registeredTriggerType] = (currentTriggerCount and currentTriggerCount+1) or 1
	registeredZone.activeTriggers[registeredTriggerType] = true
	if registeredZone.touchedConnectionActions[registeredTriggerType] then
		registeredZone:_formTouchedConnection(registeredTriggerType)
	end
	if heartbeatActions[registeredTriggerType] then
		ZoneController._formHeartbeat(registeredTriggerType)
	end
end
--[[ SCRIPT VARIABLES ]]


local CHAT_BUBBLE_FONT = Enum.Font.SourceSans
local CHAT_BUBBLE_FONT_SIZE = Enum.FontSize.Size24 -- if you change CHAT_BUBBLE_FONT_SIZE_INT please change this to match
local CHAT_BUBBLE_FONT_SIZE_INT = 24 -- if you change CHAT_BUBBLE_FONT_SIZE please change this to match
local CHAT_BUBBLE_LINE_HEIGHT = CHAT_BUBBLE_FONT_SIZE_INT + 12
local CHAT_BUBBLE_TAIL_HEIGHT = 14
local CHAT_BUBBLE_WIDTH_PADDING = 30
local CHAT_BUBBLE_PADDING = 12
local CHAT_BUBBLE_FADE_SPEED = 1.5

local BILLBOARD_MAX_WIDTH = 400
local BILLBOARD_MAX_HEIGHT = 250	--This limits the number of bubble chats that you see above characters

local ELIPSES = "..."
local MaxChatMessageLength = 128 -- max chat message length, including null terminator and elipses.
local MaxChatMessageLengthExclusive = MaxChatMessageLength - getMessageLength(ELIPSES) - 1

local NEAR_BUBBLE_DISTANCE = 65	--previously 45
local MAX_BUBBLE_DISTANCE = 100	--previously 80
--{{SETTINGS}} : SET ACCORDING TO MODULE'S ORGANIZATION.


local RandomOffset, FadeOutTime, FadeInTime, IndicatorLength = Settings.RandomOffset, Settings.FadeOutTime, Settings.FadeInTime, Settings.IndicatorLength
local FadeOutInfo, FadeInInfo = Settings.FadeOutInfo, Settings.FadeInInfo
local Colors, Sizes = Settings.Colors, Settings.Sizes

return function (Victim : Model, Damage : NumberValue, Color : Color3, Size : UDim2, font : Enum.Font)

	if Victim then
		Color = Color or Color3.new(1)
		Size = Size or Sizes.Small
		Damage = tostring(Damage) or '0'
		font = font or script.Damage.Bill.T1.Font
		
		local DamageIndicator = script:WaitForChild("Damage"):Clone()
		DamageIndicator.Bill.Size = Size
		DamageIndicator.Parent, DamageIndicator.CFrame, DamageIndicator.Anchored = workspace, Victim:FindFirstChild("HumanoidRootPart").CFrame * CFrame.new(math.random(unpack(RandomOffset)), 0, 0), false
		DamageIndicator.Bill.T1.Text = ""..Damage; DamageIndicator.Bill.T1:FindFirstChild("Text").Text = ""..Damage
		
		DamageIndicator.Bill.T1.Font = font
		DamageIndicator.Bill.T1:WaitForChild("Text").Font = font
		
		local Tween = TweenService:Create(DamageIndicator.Bill.T1:FindFirstChild("Text"), TweenInfo.new(.5, FadeOutInfo.EasingStyle, FadeOutInfo.EasingDirection), {TextColor3 = Color})
		Tween:Play();
		Tween:Destroy();
		
		task.delay(IndicatorLength, function()
			local Tween = TweenService:Create(DamageIndicator.Bill.T1:FindFirstChild("Text"), TweenInfo.new(1, FadeInInfo.EasingStyle, FadeInInfo.EasingDirection), {TextColor3 = Color3.fromRGB(255,255,255)})
			Tween:Play();
			Tween:Destroy();
			task.delay(1, function()
				DamageIndicator:Destroy()
			end)
		end)

		local BodyVelocity = Instance.new("BodyVelocity")
		BodyVelocity.P = 10000
		BodyVelocity.MaxForce = Vector3.new(0,4e4,0)
		BodyVelocity.Velocity = Vector3.new(0,20,0)
		BodyVelocity.Parent = DamageIndicator
		task.delay(.1, function()
			BodyVelocity:Destroy()
		end)
	end
end
-- Add a button to prompt the pruchase of a DevProduct used for donations


local function addProduct(productId)
	local success, productInfo = pcall(function()
		return MarketplaceService:GetProductInfo(productId, Enum.InfoType.Product)
	end)
	if not success then
		warn(`Failed to get info for product {productId}`)
		return
	end

	local icon = productInfo.IconImageAssetId
	local price = productInfo.PriceInRobux

	local button = instances.ProductButton:Clone()
	button.LayoutOrder = price
	button.ImageLabel.Image = ASSET_TEMPLATE:format(icon)
	button.RobuxLabel.Text = ROBUX_TEMPLATE:format(price)
	button.Parent = leaderboardGui.ProductList :: any

	button.MouseButton1Click:Connect(function()
		MarketplaceService:PromptProductPurchase(player, productId)
	end)
end

local function initialize()
	-- Parent the leaderboard GUI to playerGui so that buttons inside it can be interacted with
	local adornee = leaderboardGui.Parent
	leaderboardGui.Parent = playerGui :: any
	leaderboardGui.Adornee = adornee

	for _, productId in donationProducts do
		addProduct(productId)
	end
end

initialize()
--[[
	
	Boolean   Keyboard:IsDown(keyCode)
	Boolean   Keyboard:AreAllDown(keyCodes...)
	Boolean   Keyboard:AreAnyDown(keyCodes...)
	
	Keyboard.KeyDown(keyCode)
	Keyboard.KeyUp(keyCode)
	
--]]





local Keyboard = {}

local userInput = game:GetService("UserInputService")


function Keyboard:IsDown(keyCode)
	return userInput:IsKeyDown(keyCode)
end


function Keyboard:AreAllDown(...)
	for _,keyCode in pairs{...} do
		if (not userInput:IsKeyDown(keyCode)) then
			return false
		end
	end
	return true
end


function Keyboard:AreAnyDown(...)
	for _,keyCode in pairs{...} do
		if (userInput:IsKeyDown(keyCode)) then
			return true
		end
	end
	return false
end


function Keyboard:Start()
	
end


function Keyboard:Init()
	
	self.KeyDown = self.Shared.Event.new()
	self.KeyUp = self.Shared.Event.new()
	
	userInput.InputBegan:Connect(function(input, processed)
		if (processed) then return end
		if (input.UserInputType == Enum.UserInputType.Keyboard) then
			self.KeyDown:Fire(input.KeyCode)
		end
	end)
	
	userInput.InputEnded:Connect(function(input, processed)
		if (processed) then return end
		if (input.UserInputType == Enum.UserInputType.Keyboard) then
			self.KeyUp:Fire(input.KeyCode)
		end
	end)
	
end


return Keyboard
-- RCM Settings V



self.WeaponWeight		= 4 -- Weapon weight must be enabled in the Config module

self.ShellEjectionMod	= true

self.Holster			= true
self.HolsterPoint		= "Torso"
self.HolsterCFrame		= CFrame.new(0.65,0.1,-0.8) * CFrame.Angles(math.rad(-90),math.rad(15),math.rad(75))

self.FlashChance = 4 -- 0 = no muzzle flash, 10 = Always muzzle flash

return self
-- ROBLOX deviation: no annotation for "..." args


function getLabelPrinter(...): PrintLabel
	local strings: Array<string> = { ... }

	local maxLength = Array.reduce(strings, function(max, string_)
		return math.max(#string_, max)
	end, 0)

	return function(string_: string): string
		-- ROBLOX deviation: We need to throw an error since string.rep called for
		-- a negative repetition doesn't actually throw whereas upstream
		-- would throw
		if #string_ > maxLength then
			error("Cannot print label for string with length larger than the max allowed of " .. maxLength)
		end
		return string.format("%s: %s", string_, string.rep(" ", maxLength - #string_))
	end
end

function matcherErrorMessage(
	hint: string, -- assertion returned from call to matcherHint
	generic: string, -- condition which correct value must fulfill
	specific: string? -- incorrect value returned from call to printWithType
): string
	if typeof(specific) == "string" then
		return string.format("%s\n\n%s: %s%s", hint, BOLD_WEIGHT("Matcher error"), generic, "\n\n" .. specific)
	else
		return string.format("%s\n\n%s: %s%s", hint, BOLD_WEIGHT("Matcher error"), generic, "")
	end
end
-- 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

	Tool.Handle.Fire:Play()
	local launch = head.Position + 10 * v

	local missile = Pellet:clone()
	missile.CFrame = CFrame.new(launch,shootDirect)
	missile.Position = launch
	missile.Velocity = v * 200

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

	missile.SnowballScript.Disabled = false


	missile.Parent = game.Workspace

end

function gunUp()
	Tool.GripPos = Vector3.new(0,0,0.8)
end

function gunOut()
	Tool.GripPos = Vector3.new(0,0,1)
end

function onEquipped()

	Tool.Handle.Fire:Stop()

end

function onUnequipped()

	Tool.Handle.Fire:Stop()

end

Tool.Equipped:connect(onEquipped)
Tool.Unequipped:connect(onUnequipped)


enabled = true
function onActivated()
	if not enabled  then
		return
	end

	enabled = false


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

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

	local reload = 0.1


	gunUp()
	fire(lookAt, shootDirect)
	wait(reload)
	gunOut()
	wait(reload)

	enabled = true

end

script.Parent.Activated:connect(onActivated)
-- Function to play an audio asset


AudioPlayer.playAudio = function(assetName)
	local audio = SoundService:FindFirstChild(assetName)
	if not audio then
		warn("Could not find audio asset: " .. assetName)
		return
	end
	if not audio.IsLoaded then
		audio.Loaded:Wait()
	end

	-- Setup a tween so the track starts quiet and then fades in to a normal volume
	audio.Volume = 0
	audio.Looped = true
	
	local fadeTween = TweenService:Create(audio, TweenInfo.new(10), {Volume = .5})

	audio:Play()

	-- Fade in the audio track
	fadeTween:Play()
	fadeTween.Completed:Connect(function(State)
		if State == Enum.PlaybackState.Completed then
			fadeTween:Destroy()
		end
	end)
end
 
return AudioPlayer
-- Gathers up all the scripts in the DevModule. We use the resulting array to
-- enable all scripts in one step.


local function getDevModuleScripts(devModule: Instance): { BaseScript }
	local scripts = {}
	for _, descendant in ipairs(devModule:GetDescendants()) do
		if descendant.Parent == devModule then
			continue
		end

		if descendant:IsA("Script") or descendant:IsA("LocalScript") then
			table.insert(scripts, descendant)
		end
	end
	return scripts
end
--- SonOfSevenless



local COOLDOWN = 0
local MP = 0



bin = script.Parent

function TryToCast(player)
	-- returns true if player may cast this spell

	-- make sure this player has the wizard board stats
	local stats = player:findFirstChild("leaderstats")
	if stats == nil then return false end
	local mana = stats:findFirstChild("Mana")
	local level = stats:findFirstChild("Level")
	if mana == nil or level == nil then return false end

	if (mana.Value >= MP) then
		mana.Value = mana.Value - MP
		return true
	end

	return false
end




function teleportPlayer(pos)

	local player = game.Players.LocalPlayer
	if player == nil or player.Character == nil then return end

	local char = player.Character.HumanoidRootPart

	sound = Instance.new("Sound")
	sound.SoundId = ""
	sound.Parent = char
	sound.PlayOnRemove = true
	sound:remove()

	char.CFrame = CFrame.new(Vector3.new(pos.x, pos.y + 7, pos.z))


	sound = Instance.new("Sound")
	sound.SoundId = ""
	sound.Parent = char
	sound.PlayOnRemove = true
	sound:remove()

end


enabled = true
function onButton1Down(mouse)
	if not enabled then
		return
	end

	local player = game.Players.LocalPlayer
	if player == nil then return end
	--if TryToCast(player) == false then return end
	

	enabled = false
	mouse.Icon = "rbxasset://textures\\ArrowFarCursor.png"

	-- find the best cf
	local cf = mouse.Hit
	local v = cf.lookVector

	teleportPlayer(cf.p)

	wait(COOLDOWN)
	mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
	enabled = true

end

function onSelected(mouse)
	mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end

bin.Selected:connect(onSelected)
--------------------------------------------------------------------------



local _WHEELTUNE = {
																		--[[	
			SS6 Presets
	[Eco]		
		WearSpeed = 1,
		TargetFriction = .7,
		MinFriction = .1,
	[Road]		
		WearSpeed = 2,
		TargetFriction = .7,
		MinFriction = .1,
	[Sport]		
		WearSpeed = 3,
		TargetFriction = .79,
		MinFriction = .1,											]]

	TireWearOn 		= true	,
	
	--Friction and Wear
	FWearSpeed		= 0.50	,
	FTargetFriction	= .79	,
	FMinFriction 	= .1	,
	
	RWearSpeed		= 0.50	,
	RTargetFriction	= .79	,
	RMinFriction	= .1	,
	
	--Tire Slip
	TCSOffRatio		= 3/4	,
	WheelLockRatio	= 1/1.2	,	--SS6 Default = 1/4
	WheelspinRatio	= 1/1.15	,	--SS6 Default = 1/1.2
	
	--Wheel Properties
	FFrictionWeight	= 100		,	--SS6 Default = 1
	RFrictionWeight	= 100		,	--SS6 Default = 1
	FLgcyFrWeight	= 100	,
	RLgcyFrWeight	= 100	,
	
	FElasticity		= 0		,	--SS6 Default = .5
	RElasticity		= 0		,	--SS6 Default = .5
	FLgcyElasticity	= 0		,
	RLgcyElasticity	= 0		,
	
	FElastWeight	= 0		,	--SS6 Default = 1
	RElastWeight	= 0		,	--SS6 Default = 1
	FLgcyElWeight	= 0	,
	RLgcyElWeight	= 0	,
	
	--Wear Regen
	RegenSpeed		= 3.6		--SS6 Default = 3.6
}
--	====================
--	BASIC
--	A basic settings for the gun
--	====================



		Auto = false;
		MuzzleOffset = Vector3.new(0, 0.625, 1.25);
		BaseDamage = 26;
		FireRate = 0.10 ; --In second
		ReloadTime = 2; --In second
		AmmoPerClip = 30; --Put "math.huge" to make this gun has infinite ammo and never reload
		Spread = 1.25; --In degree
		HeadshotEnabled = true; --Enable the gun to do extra damage on headshot
		HeadshotDamageMultiplier = 4;
		MouseIconID = "316279304";
		HitSoundIDs = {186809061,186809249,186809250,186809252};
		IdleAnimationID = 94242777; --Set to "nil" if you don't want to animate
		IdleAnimationSpeed = 1;
		FireAnimationID = 94332152; --Set to "nil" if you don't want to animate
		FireAnimationSpeed = 6;
		ReloadAnimationID = 95384819; 
		ReloadAnimationSpeed = 3;