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



export type FrameworkType = {
	Logger: {
		print: (...any) -> (),
		debug: (...any) -> (),
		warn: (...any) -> (),
		error: (...any) -> ()
	},
	Functions: {},
	Modules: (...any) -> (...any) & {},
	Services: (...any) -> (...any) & {
		Workspace: Workspace,
		Players: Players,
		Lighting: Lighting,
		ReplicatedFirst: ReplicatedFirst,
		ReplicatedStorage: ReplicatedStorage,
		TweenService: TweenService,
		ContentProvider: ContentProvider,
		RunService: RunService,
		SoundService: SoundService,
		TextService: TextService,
		UserInputService: UserInputService,
		Debris: Debris,
		Teams: Teams,
		Chat: Chat,
		[string]: any
	},
	Network: NetworkType,
	UserInput: UserInputType,
	Playerstates: PlayerstatesType,
	Interface: InterfaceType
	--Connection: Connection,
	--Replication: Replication,
	--Interaction: Interaction
}
--[=[
	Like [GetRemoteFunction] but in promise form.

	@function PromiseGetRemoteFunction
	@within PromiseGetRemoteFunction
	@param name string
	@return Promise<RemoteFunction>
]=]



if not RunService:IsRunning() then
	-- Handle testing
	return function(name)
		return Promise.resolved(GetRemoteFunction(name))
	end
elseif RunService:IsServer() then
	return function(name)
		return Promise.resolved(GetRemoteFunction(name))
	end
else -- RunService:IsClient()
	return function(name)
		assert(type(name) == "string", "Bad name")

		local storage = ReplicatedStorage:FindFirstChild(ResourceConstants.REMOTE_FUNCTION_STORAGE_NAME)
		if storage then
			local obj = storage:FindFirstChild(name)
			if obj then
				return Promise.resolved(obj)
			end
		end

		return Promise.spawn(function(resolve, _)
			resolve(GetRemoteFunction(name))
		end)
	end
end
--Made by Luckymaxer



Character = script.Parent

BaseColor = BrickColor.new("Bright yellow")
Color = BaseColor.Color

Duration = 150

Classes = {
	BasePart = {
		BrickColor = BaseColor,
		Material = Enum.Material.Plastic,
		Reflectance = 0.5,
		Anchored = true,
	},
	FileMesh = {
		TextureId = "",
	},
	DataModelMesh = {
		VertexColor = Vector3.new(Color.r, Color.g, Color.b),
	},
	CharacterMesh = {
		BaseTextureId = 0,
		OverlayTextureId = 0,
	},
	Shirt = {
		ShirtTemplate = "",
	},
	Pants = {
		PantsTemplate = "",
	},
	Decal = {
		Texture = "",
	}
}

Objects = {}

function Redesign(Parent)
	for i, v in pairs(Parent:GetChildren()) do
		local Object = {
			Object = nil,
			Properties = {},
		}
		for ii, vv in pairs(Classes) do
			if v:IsA(ii) then
				Object.Object = v
				for iii, vvv in pairs(vv) do
					local PropertyValue = nil
					pcall(function()
						PropertyValue = v[iii]
						v[iii] = vvv
					end)
					if PropertyValue then
						Object.Properties[iii] = PropertyValue
					end
				end
			end
		end
		table.insert(Objects, Object)
		Redesign(v)
	end
end

Redesign(script.Parent) --Goldify the player

wait(Duration)

for i, v in pairs(Objects) do --Unfreeze the player
	for ii, vv in pairs(v.Properties) do
		v.Object[ii] = vv
	end
end

script:Destroy()
--Preforms a "soft shutdown". It will teleport players to a reserved server
--and teleport them back, with a new server. ORiginal version by Merely.
--Be aware this will hard shutdown reserved servers.



local PlaceId = game.PlaceId

local Players = game:GetService("Players")
local TeleportService = game:GetService("TeleportService")

local TeleportScreenCreator = script:WaitForChild("TeleportScreenCreator")
local CreateTeleportScreen = require(TeleportScreenCreator)

local SoftShutdownLocalScript = script:WaitForChild("SoftShutdownLocalScript")
TeleportScreenCreator.Parent = SoftShutdownLocalScript
SoftShutdownLocalScript.Parent = game:GetService("ReplicatedFirst")

local StartShutdown = Instance.new("RemoteEvent")
StartShutdown.Name = "StartShutdown"
StartShutdown.Parent = game.ReplicatedStorage



if not (game.VIPServerId ~= "" and game.VIPServerOwnerId == 0) then
	--If it is not a reserved server, bind the teleporting on close.
	game:BindToClose(function()
		--Return if there is no players.
		if #game.Players:GetPlayers() == 0 then
			return
		end
		
		--Return if the server instance is offline.
		if game.JobId == "" then
			return
		end
		
		--Send the shutdown message.
		StartShutdown:FireAllClients(true)
		task.wait(2)
		local ReservedServerCode = TeleportService:ReserveServer(PlaceId)
		
		--Create the teleport GUI.
		local ScreenGui = CreateTeleportScreen()
		local function TeleportPlayer(Player)
			TeleportService:TeleportToPrivateServer(PlaceId,ReservedServerCode,{Player},nil,{IsTemporaryServer=true,PlaceId = PlaceId},ScreenGui)
		end
		
		--Teleport players and try to keep the server alive until all players leave.
		for _,Player in pairs(Players:GetPlayers()) do
			TeleportPlayer(Player)
		end
		game.Players.PlayerAdded:connect(TeleportPlayer)
		while #Players:GetPlayers() > 0 do wait() end
	end)
end
--[[
	FastCast Ver. 13.0.0
	Written by Eti the Spirit (18406183)
	
		The latest patch notes can be located here (and do note, the version at the top of this script might be outdated. I have a thing for forgetting to change it):
		>	https://etithespirit.github.io/FastCastAPIDocs/changelog
		
		*** If anything is broken, please don't hesitate to message me! ***
		
		YOU CAN FIND IMPORTANT USAGE INFORMATION HERE: https://etithespirit.github.io/FastCastAPIDocs
		YOU CAN FIND IMPORTANT USAGE INFORMATION HERE: https://etithespirit.github.io/FastCastAPIDocs
		YOU CAN FIND IMPORTANT USAGE INFORMATION HERE: https://etithespirit.github.io/FastCastAPIDocs
		
		YOU SHOULD ONLY CREATE ONE CASTER PER GUN.
		YOU SHOULD >>>NEVER<<< CREATE A NEW CASTER EVERY TIME THE GUN NEEDS TO BE FIRED.
		
		A caster (created with FastCast.new()) represents a "gun".
		When you consider a gun, you think of stats like accuracy, bullet speed, etc. This is the info a caster stores. 
	
	--
	
	This is a library used to create hitscan-based guns that simulate projectile physics.
	
	This means:
		- You don't have to worry about bullet lag / jittering
		- You don't have to worry about keeping bullets at a low speed due to physics being finnicky between clients
		- You don't have to worry about misfires in bullet's Touched event (e.g. where it may going so fast that it doesn't register)
		
	Hitscan-based guns are commonly seen in the form of laser beams, among other things. Hitscan simply raycasts out to a target
	and says whether it hit or not.
	
	Unfortunately, while reliable in terms of saying if something got hit or not, this method alone cannot be used if you wish
	to implement bullet travel time into a weapon. As a result of that, I made this library - an excellent remedy to this dilemma.
	
	FastCast is intended to be require()'d once in a script, as you can create as many casters as you need with FastCast.new()
	This is generally handy since you can store settings and information in these casters, and even send them out to other scripts via events
	for use.
	
	Remember -- A "Caster" represents an entire gun (or whatever is launching your projectiles), *NOT* the individual bullets.
	Make the caster once, then use the caster to fire your bullets. Do not make a caster for each bullet.
--]]
--Precalculated paths


local t,f,n=true,false,{}
local r={
[58]={{58},t},
[49]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{58,20,19},t},
[59]={{58,56,30,41,59},t},
[63]={{58,20,63},t},
[34]={{58,56,30,41,39,35,34},t},
[21]={{58,20,21},t},
[48]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48},t},
[27]={{58,56,30,41,39,35,34,32,31,29,28,27},t},
[14]={n,f},
[31]={{58,56,30,41,39,35,34,32,31},t},
[56]={{58,56},t},
[29]={{58,56,30,41,39,35,34,32,31,29},t},
[13]={n,f},
[47]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{58,56,30,41,39,35,34,32,31,29,28,44,45},t},
[57]={{58,57},t},
[36]={{58,56,30,41,39,35,37,36},t},
[25]={{58,56,30,41,39,35,34,32,31,29,28,27,26,25},t},
[71]={{58,56,30,41,59,61,71},t},
[20]={{58,20},t},
[60]={{58,56,30,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{58,56,30,41,59,61,71,72,76,73,75},t},
[22]={{58,20,21,22},t},
[74]={{58,56,30,41,59,61,71,72,76,73,74},t},
[62]={{58,20,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{58,56,30,41,39,35,37},t},
[2]={n,f},
[35]={{58,56,30,41,39,35},t},
[53]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{58,56,30,41,59,61,71,72,76,73},t},
[72]={{58,56,30,41,59,61,71,72},t},
[33]={{58,56,30,41,39,35,37,36,33},t},
[69]={{58,56,30,41,60,69},t},
[65]={{58,20,19,66,64,65},t},
[26]={{58,56,30,41,39,35,34,32,31,29,28,27,26},t},
[68]={{58,20,19,66,64,67,68},t},
[76]={{58,56,30,41,59,61,71,72,76},t},
[50]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{58,20,19,66},t},
[10]={n,f},
[24]={{58,56,30,41,39,35,34,32,31,29,28,27,26,25,24},t},
[23]={{58,23},t},
[44]={{58,56,30,41,39,35,34,32,31,29,28,44},t},
[39]={{58,56,30,41,39},t},
[32]={{58,56,30,41,39,35,34,32},t},
[3]={n,f},
[30]={{58,56,30},t},
[51]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{58,20,19,66,64,67},t},
[61]={{58,56,30,41,59,61},t},
[55]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{58,56,30,41,39,40,38,42},t},
[40]={{58,56,30,41,39,40},t},
[52]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{58,56,30,41},t},
[17]={n,f},
[38]={{58,56,30,41,39,40,38},t},
[28]={{58,56,30,41,39,35,34,32,31,29,28},t},
[5]={n,f},
[64]={{58,20,19,66,64},t},
}
return r
----------- UTILITIES --------------


local Util = {}
do
	function Util.Create(instanceType)
		return function(data)
			local obj = Instance.new(instanceType)
			local parent = nil
			for k, v in pairs(data) do
				if type(k) == 'number' then
					v.Parent = obj
				elseif k == 'Parent' then
					parent = v
				else
					obj[k] = v
				end
			end
			if parent then
				obj.Parent = parent
			end
			return obj
		end
	end
end

local onResizedCallbacks = {}
setmetatable(onResizedCallbacks, { __mode = 'k' })
--!strict


local Types = require(script.Parent.Types)

type ServerBridge = {
	Fire: (self: ServerBridge, target: Player | Types.PlayerContainer, content: Types.Content) -> (),
	Connect: (self: ServerBridge, callback: (player: Player, content: Types.Content?) -> ()) -> Connection,
	Once: (self: ServerBridge, callback: (player: Player, content: Types.Content?) -> ()) -> (),
	Wait: (self: ServerBridge, callback: (player: Player, content: Types.Content?) -> ()) -> (Player, Types.Content?),

	OnServerInvoke: ((player: Player, content: Types.Content) -> ...any)?,
	RateLimitActive: boolean,
	Logging: boolean,
}
type ClientBridge = {
	Fire: (self: ClientBridge, content: any?) -> (),
	Connect: (self: ClientBridge, callback: (content: Types.Content?) -> ()) -> Connection,
	Once: (self: ClientBridge, callback: (content: Types.Content?) -> ()) -> (),
	Wait: (self: ClientBridge, callback: (content: Types.Content?) -> ()) -> Types.Content,

	InvokeServerAsync: (self: ClientBridge, content: any?) -> ...Types.Content?,

	Logging: boolean,
}

type Connection = {
	Disconnect: () -> (),
}

export type Bridge = ServerBridge & ClientBridge

export type BridgeNet2 = {
	ReferenceBridge: (name: string) -> Bridge,

	ClientBridge: (name: string) -> ClientBridge,
	ServerBridge: (name: string) -> ServerBridge,

	ReferenceIdentifier: (name: string, maxWaitTime: number) -> Types.Identifier,

	Serialize: (identifierName: string) -> Types.Identifier,
	Deserialize: (compressedIdentifier: string) -> Types.Identifier,

	ToHex: (regularString: string) -> string,
	ToReadableHex: (regularString: string) -> string,
	FromHex: (hexadecimal: string) -> string,

	Players: (players: Types.Array<Player>) -> Types.SetPlayerContainer,
	AllPlayers: () -> Types.AllPlayerContainer,
	PlayersExcept: (excludedPlayers: Types.Array<Player>) -> Types.ExceptPlayerContainer,

	CreateUUID: () -> string,

	HandleInvalidPlayer: (handler: (player: Player) -> ()) -> (),
}

return nil
--[[Weight and CG]]


	Tune.Weight			= 1760		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		.2		,
	 --[[Height]]		.2		,
	 --[[Length]]		.2		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible

	--Unsprung Weight
	Tune.FWheelDensity	= 0.3		-- Front Wheel Density
	Tune.RWheelDensity	= 0.3		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1.5			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1.5			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
--[[
	
	Mobile.TouchStarted(position)
	Mobile.TouchEnded(position)
	Mobile.TouchMoved(position, delta)
	Mobile.TouchTapInWorld(position)
	Mobile.TouchPinch(scale, state)
	
--]]





local Mobile = {}

local RAY = Ray.new
local workspace = workspace

local userInput = game:GetService("UserInputService")
local cam = workspace.CurrentCamera


function Mobile:GetRay(position)
	local viewportMouseRay = cam:ViewportPointToRay(position.X, position.Y)
	return RAY(viewportMouseRay.Origin, viewportMouseRay.Direction * 999)
end


function Mobile:Cast(position, ignoreDescendantsInstance, terrainCellsAreCubes, ignoreWater)
	return workspace:FindPartOnRay(self:GetRay(position), ignoreDescendantsInstance, terrainCellsAreCubes, ignoreWater)
end


function Mobile:CastWithIgnoreList(position, ignoreDescendantsTable, terrainCellsAreCubes, ignoreWater)
	return workspace:FindPartOnRayWithIgnoreList(self:GetRay(position), ignoreDescendantsTable, terrainCellsAreCubes, ignoreWater)
end


function Mobile:CastWithWhitelist(position, whitelistDescendantsTable, ignoreWater)
	return workspace:FindPartOnRayWithWhitelist(self:GetRay(position), whitelistDescendantsTable, ignoreWater)
end


function Mobile:Start()
	
end


function Mobile:Init()
	
	self.TouchStarted    = self.Shared.Event.new()
	self.TouchEnded      = self.Shared.Event.new()
	self.TouchMoved      = self.Shared.Event.new()
	self.TouchTapInWorld = self.Shared.Event.new()
	self.TouchPinch      = self.Shared.Event.new()
	
	userInput.TouchStarted:Connect(function(input, processed)
		if (processed) then return end
		self.TouchStarted:Fire(input.Position)
	end)
	
	userInput.TouchEnded:Connect(function(input, processed)
		self.TouchEnded:Fire(input.Position)
	end)
	
	userInput.TouchMoved:Connect(function(input, processed)
		if (processed) then return end
		self.TouchMoved:Fire(input.Position, input.Delta)
	end)
	
	userInput.TouchTapInWorld:Connect(function(position, processed)
		if (processed) then return end
		self.TouchTapInWorld:Fire(position)
	end)
	
	userInput.TouchPinch:Connect(function(touchPositions, scale, velocity, state, processed)
		if (processed) then return end
		self.TouchPinch:Fire(scale, state)
	end)
	
end


return Mobile
--add the power laser flickering here    
--skipped


wait(0.7)
Utils:CreateTween(game.Lighting.ColorCorrection,{0.25},{Contrast=1,Brightness=2},true)
wait(12)
game.Lighting.ColorCorrection.Contrast=-1
Utils:CreateTween(game.Lighting.ColorCorrection,{10},{TintColor=Color3.new(0,0,0)},true)
wait(12)
--[=[
	Converts the string to UpperCamelCase
	@param str string
	@return string
]=]


function String.toCamelCase(str: string): string
	str = str:lower()
	str = str:gsub("[ _](%a)", string.upper)
	str = str:gsub("^%a", string.upper)
	str = str:gsub("%p", "")

	return str
end
--- VARIABLES/CONSTANTS ---



THROW_MULTIPLIER = 0.25




local Tool = {}

Tool.MouseButton1 = function(Character, ExtraData) -- Throw
	local MousePosition = ExtraData[1]
	local Net = Character:FindFirstChildOfClass("Tool")
	
	if not Net:FindFirstChild("Display") then return end
	
	
	Character.Humanoid:LoadAnimation(script.Toss):Play()
	
	task.wait(0.3)
	
	local Model = Instance.new("Model", workspace.Debris)
	Model.Name = Character.Name.."_"..script.Name
	local CloneNet = Net:Clone()
	CloneNet.Display.Parent = Model
	CloneNet.Handle.Parent = Model
	CloneNet:Destroy()
	
	local Display = Net.Display
	Display.Parent = ServerStorage.PlayerStorage
	
	-- Throw Model.Handle
	local throwForce = 100*THROW_MULTIPLIER -- Adjust this value to change the throwing force

	local Handle = Model.Handle -- Assuming the net's handle is named "Handle"
	local BodyVelocity = Instance.new("BodyVelocity")
	BodyVelocity.Velocity = (MousePosition - Handle.Position).unit * throwForce + Vector3.new(0,50,0)
	BodyVelocity.P = math.huge -- Sets linear damping to zero so the net doesn't slow down over time
	BodyVelocity.Parent = Handle
	
	local Connection
	-- Connect touch function, trip enemy
	Connection = Handle.Touched:Connect(function(hit)
		if hit:IsDescendantOf(workspace.Enemies) and hit.Parent:FindFirstChild("Humanoid") then
			local VictimCharacter = hit.Parent
			local Humanoid = Character:FindFirstChildOfClass("Humanoid")
			
			Connection:Disconnect()
			
			Ragdoll.Toggle(VictimCharacter)
			
			Model:Destroy()
			
			-- Clone ServerStorage.Models.NetDisplay above the enemy to simulate the net falling on top of it, use its handle to cframe it
				-- This will be the visual representation of the net trapping the enemy
			local NetDisplay = ServerStorage.Models.NetDisplay:Clone()
			NetDisplay.Parent = workspace.Debris
			NetDisplay:MoveTo((VictimCharacter.HumanoidRootPart.CFrame * CFrame.new(0,5,0)).Position)
			
			--game.Debris:AddItem(NetDisplay, 10)
			
		end
	end)

	-- Optionally, you can remove the BodyVelocity after a certain amount of time
	local removeDelay = .5 -- Adjust this value to change the delay before removing the BodyVelocity
	wait(removeDelay)
	BodyVelocity:Destroy()
	
	task.wait(5)

	Display.Parent = Net
	
end
Tool.Z = function(Character)
	print("hai Z")
end
Tool.X = function(Character)
	print("hai X")
end	



return Tool
--[[Leaning]]

--
	Tune.LeanSpeed				= .07 	-- How quickly the the bike will lean, .01 being slow, 1 being almost instantly
	Tune.LeanProgressiveness	= 30 	-- How much steering is kept at higher speeds, a lower number is less steering, a higher number is more steering
	Tune.MaxLean				= 45 	-- Maximum lean angle in degrees
	
	Tune.LeanD			= 90 		-- Dampening of the lean
	Tune.LeanMaxTorque	= 500 		-- Force of the lean
	Tune.LeanP			= 300 		-- Aggressiveness of the lean
--[[
	Calls a given callback on some specified interval until the
	clear function is called.

	The callback is given deltaTime since it was last called, along
	with any extra parameters passed to setInterval.

	The first callback call is made after intervalSeconds passes,
	i.e. it is not immediate.
--]]



local function setInterval(callback: (number, ...any) -> nil, intervalSeconds: number, ...: any)
	local cleared = false

	local function call(scheduledTime: number, ...: any)
		if cleared then
			return
		end

		local deltaTime = os.clock() - scheduledTime

		task.spawn(callback, deltaTime, ...)

		task.delay(intervalSeconds, call, os.clock(), ...)
	end

	local function clear()
		cleared = true
	end

	task.delay(intervalSeconds, call, os.clock(), ...)

	return clear
end

return setInterval
------------------------------------------------------------------------------
---------- This code tries to load dynamically into an ongoing show ----------



local timeUntilNextShow, timeIntoShow = calculateShowTimes()
local shouldLoadPSV = true

for _,scene in ipairs(SHOW_SCENES) do
	local sceneLength = scene:GetAttribute("TimeLength")
	if timeIntoShow then
		if timeIntoShow < sceneLength then
			-- Jump into mid scene of show
			EventSequencer.loadScene(scene.Name, timeIntoShow)
			shouldLoadPSV = false
			break
		else
			timeIntoShow = timeIntoShow - sceneLength
		end
	end
end

if shouldLoadPSV then
	loadPreShowVenue()
end
-- This is an overloaded function for TransparencyController:SetupTransparency(character)
-- Do not call directly, or it will throw an assertion!



function FpsCamera:SetupTransparency(character, ...)
	assert(self ~= FpsCamera)
	self:BaseSetupTransparency(character, ...)
	
	if self.AttachmentListener then
		self.AttachmentListener:Disconnect()
	end
	
	self.AttachmentListener = character.DescendantAdded:Connect(function (obj)
		if obj:IsA("Attachment") and self.HeadAttachments[obj.Name] then
			if typeof(self.cachedParts) == "table" then
				self.cachedParts[obj.Parent] = true
			end

			if self.transparencyDirty ~= nil then
				self.transparencyDirty = true
			end
		end
	end)
end
-----------------
--| Variables |--
-----------------



local DebrisService = Game:GetService('Debris')
local PlayersService = Game:GetService('Players')

local Tool = script.Parent
local ToolHandle = Tool.Handle

local RocketScript = WaitForChild(script, 'Rocket')

local SwooshSound = WaitForChild(script, 'Swoosh')
local BoomSound = WaitForChild(script, 'Boom')
local ReloadSound = WaitForChild(ToolHandle, 'ReloadSound')

local MyModel = nil
local MyPlayer = nil

local BaseRocket = nil
local RocketClone = nil
--lights


local Red1 = script.Parent.Red1
local Red2 = script.Parent.Red2
local RL = script.Parent.RL
local RR = script.Parent.RR
local FL = script.Parent.FL
local FR = script.Parent.FR
local f1 = script.Parent.WhiteFront
local f2 = script.Parent.WhiteFront2
local r1 = script.Parent.WhiteBack
local r2 = script.Parent.WhiteBack2
local B1 = script.Parent.Brake
local B2 = script.Parent.Brake2

local lgt = script.Parent.Lighting.Light
local lgtsalon = script.Parent.salon.Light


function lightson()
	f1.Material = "Neon"
	f2.Material = "Neon"
	Red1.Material = "Neon"
	Red2.Material = "Neon"
	
	lgt.Enabled = true
	lgtsalon.Enabled = true
end
function lightsoff()
	f1.Material = "SmoothPlastic"
	f2.Material = "SmoothPlastic"
	Red1.Material = "SmoothPlastic"
	Red2.Material = "SmoothPlastic"
	
	lgt.Enabled = false
	lgtsalon.Enabled = false
end
function reverse()
	r1.Material = "Neon"
	r2.Material = "Neon"
end
function unreverse()
	r1.Material = "SmoothPlastic"
	r2.Material = "SmoothPlastic"
end
function brake()
	B1.Material = "Neon"
	B2.Material = "Neon"
end
function unbrake()
	B1.Material = "SmoothPlastic"
	B2.Material = "SmoothPlastic"
end
--Weld stuff here



MakeWeld(car.Misc.LMIRR.Handle,car.DriveSeat,"Motor",.1).Name="M"
ModelWeld(car.Misc.LMIRR,car.Misc.LMIRR.Handle)

MakeWeld(car.Misc.RMIRR.Handle,car.DriveSeat,"Motor",.1).Name="M"
ModelWeld(car.Misc.RMIRR,car.Misc.RMIRR.Handle)
--//Name Updater



local Module = script.Parent.Parent.Parent.Parent.Parent.Settings
local Modulee = require(Module)
local Name = Modulee.CurrencyName

script.Parent.Name = Name.." : "..script.Parent.Parent.Parent.CurrencyToCollect.Value

script.Parent.Parent.Parent.CurrencyToCollect.Changed:connect(function()
	script.Parent.Name = Name.." : "..script.Parent.Parent.Parent.CurrencyToCollect.Value
end)
-- Variables:


local boat = script.Parent.Parent
local Animations = boat.Parent.Animations
local MainModel = boat.Main_Model
local MainPart = MainModel.MAIN
local PartsModel = boat.Parts
local GearShiftSound = MainPart.GearShift
local Values = MainModel.Values
local EngineOnVal = Values.EngineOn
local ThrustVal = Values.Thrust
local InWaterVal = Values.InWater
local BoatControlActivated = true

local EngineOn = false
local ReducingSpeed = false
local Thrust = 0
local TurnAngle = 0
local neutral = false
local SideThrusterSpeed = 0