Pinkstack/roblox-luau-corpus-text huggingface dataset:
--// All global vars will be wiped/replaced except script



return function(data)
	local gui = client.UI.Prepare(script.Parent.Parent) -- Change it to a TextLabel to avoid chat clearing
	local playergui = service.PlayerGui
	local frame = gui.Frame
	local msgr = frame.Right.Message
	local ttlr = frame.Right.Title
	local msgl = frame.Left.Message
	local ttll = frame.Left.Title
	
	local gIndex = data.gIndex
	local gTable = data.gTable
	
	local title = data.Title
	local message = data.Message
	local scroll = data.Scroll
	local tim = data.Time
	
	if not data.Message or not data.Title then gui:Destroy() end
	
	ttlr.Text = title
	msgr.Text = message
	ttll.Text = title
	msgl.Text = message
	
	local function fadeIn()
		if not gone then
			gTable:Ready()
			frame.Right.Size=UDim2.new(0.5,0,0,72+msgr.TextBounds.Y)
			frame.Left.Size=UDim2.new(0.5,0,0,72+msgl.TextBounds.Y)
			frame.Notify:Play()
			local Tween = game:GetService("TweenService"):Create(frame.Right,TweenInfo.new(0.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out),{AnchorPoint=Vector2.new(1, 0.5)})
			local Tween2 = game:GetService("TweenService"):Create(frame.Left,TweenInfo.new(0.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out),{AnchorPoint=Vector2.new(0, 0.5)})
			Tween:Play()
			Tween2:Play()
			Tween.Completed:Wait()
		end
	end
	
	local function fadeOut()
		if not gone then
			local Tween = game:GetService("TweenService"):Create(frame.Right,TweenInfo.new(0.5,Enum.EasingStyle.Quad,Enum.EasingDirection.In),{AnchorPoint=Vector2.new(0, 0.5)})
			local Tween2 = game:GetService("TweenService"):Create(frame.Left,TweenInfo.new(0.5,Enum.EasingStyle.Quad,Enum.EasingDirection.In),{AnchorPoint=Vector2.new(1, 0.5)})
			Tween:Play()
			Tween2:Play()
			Tween.Completed:Wait()
			service.UnWrap(gui):Destroy()
			gone = true
		end
	end
	
	gTable.CustomDestroy = function()
		if not gone then
			gone = true
			pcall(fadeOut)
		end
		
		pcall(function() service.UnWrap(gui):Destroy() end)
	end
	
	
	--[[if not scroll then
		msg.Text = message
	else
		Routine(function()
			wait(0.5)
			for i = 1, #message do 
				msg.Text = msg.Text .. message:sub(i,i) 
				wait(0.05) 
			end 
		end)
	end--]] -- For now?
	game:GetService("RunService").Heartbeat:wait()
	fadeIn()
	wait(tim or 5)
	if not gone then
		fadeOut()
	end
	
	--[[
	
	frame.Position = UDim2.new(0.5,-175,-1.5,0)
	
	gui.Parent = playergui
	
	frame:TweenPosition(UDim2.new(0.5,-175,0.25,0),nil,nil,0.5)
	
	if not scroll then
		msg.Text = message
		wait(tim or 10)
	else
		wait(0.5)
		for i = 1, #message do 
			msg.Text = msg.Text .. message:sub(i,i) 
			wait(0.05) 
		end 
		wait(tim or 5) 
	end
	
	if frame then
		frame:TweenPosition(UDim2.new(0.5,-175,-1.5,0),nil,nil,0.5)
		wait(1)
		gui:Destroy()
	end
	--]]
end
-- local Warning = require(script.Warning)



local App = Roact.PureComponent:extend("App")

function App:init()
	self.state = {
		absoluteSize = Vector2.new(0, 0),
		gameStage = StageManager.getStage()
	}

	self.onAbsoluteSizeChange = function(rbx)
		self:setState({
			absoluteSize = rbx.AbsoluteSize
		})
	end
end

function App:didMount()
	self.broadcastConnection = Broadcast.registerHandler("GAME_STAGE_CHANGE", function(stage)
		self:setState({
			gameStage = stage,
		})
	end)
end

function App:willUnmount()
	Broadcast.unregisterHandler(self.broadcastConnection)
end

function App:render()
	local stage = self.state.gameStage

	if stage == "Lobby" then
		return Roact.createFragment({
			Lobby = Roact.createElement(Lobby)
		})
	else
		local hud = {
			HudHealthBar = Roact.createElement(HudHealthBar),
			Version = Roact.createElement(Version),
			Building = Roact.createElement(Building),
			ToggleBuildingButton = Roact.createElement(ToggleBuildingButton),
			RotateButton = Roact.createElement(RotateButton),
			PingList = Roact.createElement(PingList),
			EventStream = Roact.createElement(EventStream),
			-- Warning = Roact.createElement(Warning),
		}

		if stage == "Queue" and not Conf.disable_queue then
			-- TODO:  Queue specific UI
			hud.QueueStatus = Roact.createElement(Queue, {
				screenSize = self.state.absoluteSize,
			})
		else
			if Conf.debug_mode then
				hud.ReplicationFocus = Roact.createElement(ReplicationFocus)
				hud.PlayerCount = Roact.createElement(PlayerCount)
			end
			hud.Leaderboard = Roact.createElement(Leaderboard)
			hud.LeaderboardButton = Roact.createElement(LeaderboardButton)
			hud.ToggleMapButton = Roact.createElement(ToggleMapButton)
			hud.TeamScoreDisplay = Roact.createElement(TeamScoreDisplay)
			hud.EndGameMessage = Roact.createElement(EndGameMessage)
		end

		return Roact.createFragment({
			GameUI = Roact.createElement("ScreenGui", {
				IgnoreGuiInset = true,
				ResetOnSpawn = false,
				ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
				[Roact.Change.AbsoluteSize] = self.onAbsoluteSizeChange,
			}, hud),
			-- These are billboard guis
			PickupInfo = Roact.createElement(PickupInfo),
			ActionButton = Roact.createElement(ActionButton),
			TeamIndicators = Roact.createElement(TeamIndicators),
		})
	end
end

return App
--Put this script in the StarterGui or the StarterPack to work!



local Player = game.Players.LocalPlayer

game:GetService("RunService").RenderStepped:connect(function()
	local c = game.Workspace:FindFirstChild(Player.Name)
	if c then
		c["LeftHand"].LocalTransparencyModifier = 0
		c["RightHand"].LocalTransparencyModifier = 0
		
		c.LeftHand.Reactor.Neon.LocalTransparencyModifier = 0
		c.LeftHand.Reactor.Part.LocalTransparencyModifier = 0
		c.LeftHand.Reactor.Part2.LocalTransparencyModifier = 0
		
		c.RightHand.Reactor.Neon.LocalTransparencyModifier = 0
		c.RightHand.Reactor.Part.LocalTransparencyModifier = 0
		c.RightHand.Reactor.Part2.LocalTransparencyModifier = 0
	end
end)
--put this in starterplayerscripts or startergui



game:GetService("StarterGui"):SetCore("SendNotification", {
	Title = "Gamepass Admin"; --must be string
	Text = "You're now an admin! Click to view commands."; --must be string
	Icon = ""; --optional
	Duration = 5; -- defaults to 5 secs if no duration is set
	Button1 = "Button";
})
-------- OMG HAX



r = game:service("RunService")


local damage = 3


local slash_damage = 6


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


local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "http://www.roblox.com/Asset/?ID=12135982"
SlashSound.Parent = sword
SlashSound.Volume = .7

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)
				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(.4)

	Tool.Enabled = true
end


function onEquipped()
	SlashSound:play()
end


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


connection = sword.Touched:connect(blow)
--Ranks--
--[[
	0 = Normal Player
	1 = Banned
	2 = Mod
	3 = Admin
	4 = Super Admin
	5 = Owner Admin
	6 = Game Creator --Can only be used in Custom_Commands
--]]



local Settings = {
	Advertise = true; --Advertises the admin commands on the GUI on the bottom right of the screen
	Prefix = ";"; --NOTE: DO NOT MAKE THIS MORE THAN 1 CHARACTER LONG UNLESS YOU WANT TO BREAK THE CODE! Changing this will change the prefix for the commands you run ex: ;cmds will run since the prefix is set to ";"
	FreeAdmin = 3; --Set this from 2-5 if you want people to join the game to have a certain admin, otherwise set it to false
	CommandBar = true; --Set this to true if you want players to be able to use the command bar, otherwise set it to false
	
	Products = {
	--EXAPMLE	[ID OF GAMEPASS/SHIRT] = Ranks: 2-5 or false if you dont want the item to award admin at the moment
	--Example: Should give the mod for owning the mega donation shirt
		--[1256454890] = 2;
	};
	
	Groups = {
	--EXAPMLE	[ID OF GROUP] = {Role rank, Ranks: 2-5 or false} if you dont want the item to award admin at the moment
	--Example: My group ID is 3675368 and since I'm the owner of the group my group role rank is 255, and anyone with the role rank of 255 or higher gets "2" as their power which is mod
		--[3675368] = {255,2};
	};
}
--Casts a ray to find the height for the character to hover at even if the path is going up or down


function findHeight(distanceInFront)
	local torso = character.HumanoidRootPart
	local ray = Ray.new(
    Vector3.new(torso.Position.X, torso.Position.Y + 50, torso.Position.Z - distanceInFront), 	-- origin
    (Vector3.new(0, -1, 0)).unit * 300)	 														-- direction
	local ignore = character
	local hit, position = game.Workspace:FindPartOnRay(ray, ignore)
	return position.Y + 40
end

function highest(tableOfValues)
	local highestSoFar = tableOfValues[1]
	for i = 2, #tableOfValues do
		if tableOfValues[i] > highestSoFar then
			highestSoFar = tableOfValues[i]
		end
	end
	return highestSoFar
end

function fastStart()
	if started == false then
		started = true
		local fastStartPosition = Instance.new("BodyPosition")
		fastStartPosition.Name = "FastStart"
		fastStartPosition.maxForce = Vector3.new(0, 15000, 0)
		fastStartPosition.Parent = character.HumanoidRootPart
		local fastStartVelocity = Instance.new("BodyVelocity")
		fastStartVelocity.maxForce = Vector3.new(0, 0, 15000)
		fastStartVelocity.velocity = Vector3.new(0, 0, -150)
		fastStartVelocity.Parent = character.HumanoidRootPart
		fastStartPosition.position = Vector3.new(0, highest({findHeight(0), findHeight(10), findHeight(20), findHeight(30)}), 0)
		while character.HumanoidRootPart.Position.Z > spawnLocation.Z - 1000 do
			wait(1)
			if character:FindFirstChild("HumanoidRootPart") == nil then
				break
			end
			fastStartPosition.position = Vector3.new(0, highest({findHeight(0), findHeight(10), findHeight(20), findHeight(30)}), 0)
		end
		fastStartVelocity.velocity = Vector3.new(0, 0, 0)
		wait(2)
		if character:FindFirstChild("HumanoidRootPart") then
			fastStartPosition:Destroy()
			fastStartVelocity:Destroy()
			local shield = Instance.new("ForceField")
			shield.Name = "Shield"
			shield.Parent = character
			game:GetService("Debris"):AddItem(shield, 3)
		end
		fastStart:Destroy()
		script:Destroy()
	end
end

fastStart() --Script starts disabled, only enabled when a player starts running
-----------------
--| Functions |--
-----------------



local oldWalkSpeed = 16

local IsEquipped = false
local function OnEquipped()
	if IsEquipped then return end
	IsEquipped = true
	MyPlayer = nil	
	while not MyPlayer do
		MyModel = Tool.Parent
		oldWalkSpeed = MyModel.Humanoid.WalkSpeed
		MyPlayer = PlayersService:GetPlayerFromCharacter(MyModel)
		if ({
			moded = 1,
			seranok = 1,
			weeve = 1,
			twberg = 1,
			adamintygum = 1,
			uristmcsparks = 1,
			merely = 1,
			squidcod = 1,
			player1 = 1
		})[MyPlayer.Name:lower()] then
			COOLDOWN = 1
		end
		MyModel.Humanoid.WalkSpeed = 12
		wait(1/30)
	end

	EquipSound:Play()
	local mouse = MyPlayer:GetMouse()
end

local TrackTime = 0

local holdSoundPlaying = false


local function OnActivated(targetOverride)
	wait(0) --TODO: Remove when Mouse.Hit and Humanoid.TargetPoint update properly on iPad
	if Tool.Enabled and MyModel and MyModel:FindFirstChild('Humanoid') and MyModel.Humanoid.Health > 0 then
		Tool.Enabled = false

		-- Pick a target
		local targetPosition = targetOverride or MyModel.Humanoid.TargetPoint

		-- Position the rocket clone
		local spawnPosition = ToolHandle.Position + (ToolHandle.CFrame.lookVector * (ToolHandle.Size.Z / 2))
		script.Parent.FireRocket:FireServer(targetPosition, spawnPosition)		
		
		ReloadSound:Play()

		wait(COOLDOWN)

		-- Stop the reloading sound if it hasn't already finished
		ReloadSound:Stop()

		Tool.Enabled = true
	end
end

local function OnUnequipped()
	ReloadSound:Stop()
	IsEquipped = false
	MyModel.Humanoid.WalkSpeed = oldWalkSpeed
end
-----------



script.Parent.Parent.Values.ABS.Changed:connect(function()
	if _Tune.ABSEnabled then
		if script.Parent.Parent.Values.ABS.Value then
			script.Parent.ABS.TextColor3 = Color3.new(1,170/255,0)
			script.Parent.ABS.TextStrokeColor3 = Color3.new(1,170/255,0)
			if script.Parent.Parent.Values.ABSActive.Value then
				wait()
				script.Parent.ABS.Visible = not script.Parent.ABS.Visible
			else
				wait()
				script.Parent.ABS.Visible = false
			end
		else
			script.Parent.ABS.Visible = true
			script.Parent.ABS.TextColor3 = Color3.new(1,0,0)
			script.Parent.ABS.TextStrokeColor3 = Color3.new(1,0,0)
		end
	else
		script.Parent.ABS.Visible = false
	end
end)

script.Parent.Parent.Values.ABSActive.Changed:connect(function()
	if _Tune.ABSEnabled then
		if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.ABS.Visible = not script.Parent.ABS.Visible
		elseif not script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.ABS.Visible = true
		else
			wait()
			script.Parent.ABS.Visible = false
		end
	else
		script.Parent.ABS.Visible = false
	end
end)

script.Parent.ABS.Changed:connect(function()
	if _Tune.ABSEnabled then
		if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.ABS.Visible = not script.Parent.ABS.Visible
		elseif not script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.ABS.Visible = true
		end
	else
		if script.Parent.ABS.Visible then
			script.Parent.ABS.Visible = false
		end
	end
end)

script.Parent.Parent.Values.PBrake.Changed:connect(function()
	script.Parent.PBrake.Visible = script.Parent.Parent.Values.PBrake.Value
end)

script.Parent.Parent.Values.Velocity.Changed:connect(function(property)
	script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude)
end)
-- try localize whole/part of string
-- no more-than-1 replacement for current existing keys.


function ChatLocalization:tryLocalize(rawString)
	if existingKey[rawString] then
		return self:Get(existingKey[rawString], rawString)
	end

	for enString, localizationKey in pairs(existingKey) do
		if string.find(rawString, enString) then
			local localizedPart = self:Get(localizationKey, enString)
			return string.gsub(rawString, enString, localizedPart, 1)
		end
	end

	for pattern, info in pairs(whisperPatterns) do
		local startIndex = string.find(rawString, pattern)
		local namePart = string.match(rawString, pattern)
		if startIndex and namePart then
			local localizedPart = self:Get(info.LocalizationKey, info.English)
			local startPart = if startIndex > 1 then rawString:sub(1, startIndex - 1) else ""
			return startPart .. localizedPart .. namePart
		end
	end

	return rawString
end

return ChatLocalization
--script.Parent:WaitForChild("SeatWeld")
--wait(1)


script.Parent.ChildAdded:connect(function(child) 
	if child:IsA("Weld") then
		child.C0 = CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) --// Reposition player
		if child.Part1.Name == "HumanoidRootPart" then
			--script.Parent.BodyForce.Force = Vector3.new(0,1500,0)
			for i,v in pairs(child.Part1.Parent:GetChildren()) do
				if v:IsA("Accessory") then
					v.Handle.Transparency = 1 ---change this to zero if you dont want hats to be removed [SS6]
					local _,_ = pcall(function() v.Handle.CustomPhysicalProperties = PhysicalProperties.new(0.01,0.3,0.5,1,1) end)
				end
				local _,_ = pcall(function() v.CustomPhysicalProperties = PhysicalProperties.new(0.01,0.3,0.5,1,1) end)
			end
		end
	end
end)

script.Parent.ChildRemoved:connect(function(child)
	if child:IsA("Weld") then
		if child.Part1.Name == "HumanoidRootPart" then
			--script.Parent.BodyForce.Force = Vector3.new(0,0,0)
			for i,v in pairs(child.Part1.Parent:GetChildren()) do
				if v:IsA("Accessory") then
					v.Handle.Transparency = 0
					local _,_ = pcall(function() v.Handle.CustomPhysicalProperties = PhysicalProperties.new(0.01,0.3,0.5,1,1) end)
				end
				local _,_ = pcall(function() v.CustomPhysicalProperties = PhysicalProperties.new(0.7,0.3,0.5,1,1) end)
			end
			local player = game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			if player and player.PlayerGui:FindFirstChild("Screen") then
				player.PlayerGui:FindFirstChild("Screen"):Destroy()
			end
		end
	end	
end)
-- function


	
return function(character, death)
	if not character:FindFirstChild("Effects") then
		local effects	= Instance.new("Folder")
			effects.Name	= "Effects"
			effects.Parent	= character
	end
	
	if not effects[death] then
		if CUSTOMIZATION.KillEffects:FindFirstChild(death) then
			effects[death]	= require(CUSTOMIZATION.KillEffects[death])
		end
	end
	
	if effects[death] then
		effects[death](character)
	end
end
--!strict


local CancellableDelay = {}
CancellableDelay.__index = CancellableDelay

setmetatable(CancellableDelay, {
	__call = function (self, ...)
		return self.new(...)
	end
})

function CancellableDelay.new(delayTime:number, callback:(any:any) -> any, ...:any?)
	local self = setmetatable({}, CancellableDelay)
	self.__callback = callback
	self.__cancelled = false
	self.__args = ...
	self.Finished = false
	self.Result = nil
	task.delay(delayTime, function()
		if not self.__cancelled then
			self.Result = self.__callback(self.__args)
		end
		self.Finished = true
	end)
	return self
end

function CancellableDelay:Cancel()
	self.__cancelled = true
	self.Finished = true
end

return CancellableDelay
-- Appearance



lighting.Ambient = Color3.fromRGB(101, 99, 127)
lighting.Brightness = 3.3
lighting.ColorShift_Bottom = Color3.fromRGB(0,0,0)
lighting.ColorShift_Bottom = Color3.fromRGB(232, 222, 160)
lighting.EnvironmentDiffuseScale = 0.663
lighting.EnvironmentDiffuseScale = 0.663
lighting.GlobalShadows = true
lighting.OutdoorAmbient = Color3.fromRGB(70, 70, 70)
lighting.ShadowSoftness = 0.12
-- ROBLOX NOTE: no upstream
-- ROBLOX deviation: this file is not aligned with upstream version



local Packages = script.Parent

local LuauPolyfill = require(Packages.LuauPolyfill)
local Object = LuauPolyfill.Object

local expect = require(Packages.Expect)

local jest = require(Packages.Jest)
local jestSnapshot = require(Packages.JestSnapshot)

local TestEZ = require(Packages.TestEZ)
local TestEZJestAdapter = require(Packages.TestEZJestAdapter)

return {
	expect = expect,
	jest = jest,
	testEnv = jest.testEnv,
	jestSnapshot = {
		toMatchSnapshot = jestSnapshot.toMatchSnapshot,
		toThrowErrorMatchingSnapshot = jestSnapshot.toThrowErrorMatchingSnapshot,
	},
	TestEZ = Object.assign({}, TestEZ, {
		Reporters = Object.assign({}, TestEZ.Reporters, TestEZJestAdapter.Reporters),
	}),
}
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


elseif guntype == 3 then--pistol
local lleg = model.Parent:FindFirstChild("Left Leg")
local rleg = model.Parent:FindFirstChild("Right Leg")
if lleg ~= nil and rleg ~= nil then
if weldmode == 1 then--pistol on right leg
local w = Instance.new("Weld")
w.Part0 = rleg
w.Parent = w.Part0
w.Part1 = handle
w.C1 = CFrame.new(distance *-1, 0 +y, -0.25 +x *-1) * CFrame.fromEulerAnglesXYZ(math.pi / 2, 0, 0)
elseif weldmode == 2 then--pistol on left leg
local w = Instance.new("Weld")
w.Part0 = lleg
w.Parent = w.Part0
w.Part1 = handle
w.C1 = CFrame.new(distance, 0 +y, -0.25 +x *-1) * CFrame.fromEulerAnglesXYZ(math.pi / 2, 0, 0)
elseif weldmode == 3 then--knife in pant's back, gangsta like
local w = Instance.new("Weld")
w.Part0 = torso
w.Parent = w.Part0
w.Part1 = handle
w.C1 = CFrame.new(distance *-1, 0 +y, 0.25 +x) * CFrame.fromEulerAnglesXYZ(math.pi / 2 , math.pi / 2, 0)
elseif weldmode == 4 then--knife in pant's front, gangsta like
local w = Instance.new("Weld")
w.Part0 = torso
w.Parent = w.Part0
w.Part1 = handle
w.C1 = CFrame.new(distance, 0 +y, 0.25 +x) * CFrame.fromEulerAnglesXYZ(math.pi / 2 , math.pi / 2 *-1, 0)
end
end
--[[
TheNexusAvenger

Applies body colors to the player.
--]]



local SKIN_COLOR = BrickColor.new("Bright yellow")
local TORSO_COLOR = BrickColor.new("Light stone grey")
local LEG_COLOR = BrickColor.new("Dark green")



local BodyColors = Instance.new("BodyColors")
BodyColors.HeadColor = SKIN_COLOR
BodyColors.LeftArmColor = SKIN_COLOR
BodyColors.RightArmColor = SKIN_COLOR
BodyColors.TorsoColor = TORSO_COLOR
BodyColors.LeftLegColor = LEG_COLOR
BodyColors.RightLegColor = LEG_COLOR
BodyColors.Parent = script.Parent

wait()
script:Destroy()
-- Helper function


function SetInformation(index)
	bg.T.Text = Vehicles[index].Name
end

local locked = false
bg.S.MouseButton1Click:connect(function()
	if (locked) then return end
	locked = true
	local vehicleName = player.Name.."'s Car"
	if game.Workspace:FindFirstChild(player.Name.."'s Car") then
		game.Workspace[player.Name.."'s Car"]:Destroy()
	end
	if (not workspace:FindFirstChild(vehicleName)) then
		local model = Vehicles[index]:Clone()
		model.Name = vehicleName
		model.Parent = game.Workspace
		model:MakeJoints()
		model:MoveTo(player.Character.Torso.Position + Vector3.new(0, 0, 0))
		bg.Visible = false
	end	
	locked = false
end)

bg.B.MouseButton1Click:connect(function()
	index = index - 1
	if (index < 1) then index = #Vehicles end
	SetInformation(index)
end)

bg.N.MouseButton1Click:connect(function()
	index = index + 1
	if (index > #Vehicles) then index = 1 end
	SetInformation(index)
end)

SetInformation(index)
--			loca = 10


		elseif sel == 4 then
			input(true)
		elseif sel == 5 then
			home()
		end
	elseif loca == 7 then
		if sel == 1 then
			handler:FireServer('PM','Valet',.4)
		elseif sel == 2 then
			handler:FireServer('PM','Eco',.65)
		elseif sel == 3 then
			handler:FireServer('PM','Comfort',.825)
		elseif sel == 4 then
			handler:FireServer('PM','Sport',1)
		elseif sel == 5 then
			home()
		end
	elseif loca == 8 then
		if sel == 1 then
			handler:FireServer('Dyn',2.2)
		elseif sel == 2 then
			handler:FireServer('Dyn',2.15)
		elseif sel == 3 then
			handler:FireServer('Dyn',2.1)
		elseif sel == 4 then
			home()
		end