Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[=[
	Overwrites a table's value
	@param target table -- Target table
	@param source table -- Table to read from
	@return table -- target
]=]


function Table.deepOverwrite(target, source)
	for index, value in pairs(source) do
		if type(target[index]) == "table" and type(value) == "table" then
			target[index] = Table.deepOverwrite(target[index], value)
		else
			target[index] = value
		end
	end
	return target
end
--[[Susupension]]


	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 100		-- Spring Dampening
	Tune.FSusStiffness	= 20		-- Spring Force
	Tune.FAntiRoll 		= 100		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 100		-- Spring Dampening
	Tune.RSusStiffness	= 20		-- Spring Force
	Tune.FAntiRoll 		= 100		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
-- Door moving function


function Move(O)
	DoorLogo.Moving:Play()
	 for i = 1, 58 do
  		wait(0.01)
		-- Changes the door cframe position.
  		local X, Y, Z = DoorSeg.CFrame.X, DoorSeg.CFrame.Y, DoorSeg.CFrame.Z
  		Door:SetPrimaryPartCFrame(DoorSeg.CFrame * CFrame.new((O and -0.1 or 0.1),0,0))
 	end	
	DoorLogo.Moving:Stop()
	DoorLogo.Closed:Play()
end
--------------------
--| Script Logic |--
--------------------



BaseShot = Instance.new('Part')
BaseShot.Name = 'Effect'
BaseShot.FormFactor = Enum.FormFactor.Custom
BaseShot.Size = Vector3.new(0.2, 0.2, 3)
BaseShot.CanCollide = false
BaseShot.BrickColor = BrickColor.new('Toothpaste')
SelectionBoxify(BaseShot)
Light(BaseShot)
HitFadeSound:Clone().Parent = BaseShot

Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)
Tool.Activated:connect(OnActivated)
---------------------------
--Seat Offset (Make copies of this block for passenger seats)



car.DriveSeat.ChildAdded:connect(function(child)
	if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
		child.C0=CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)
	end
end)
--[[
	Returns a new window component associated with specified model. 
]]


function Window.new(model)
	local component = {
		_model = model,
		_state = Constants.State.Window.Normal,
		_connections = {}
	}

	setmetatable(component, {__index = Window})

	component._connections.repairConnection =
		model:FindFirstChild("Glass").Touched:Connect(
		function(otherPart)
			if otherPart.Anchored then
				return
			end

			if
				CollectionService:HasTag(otherPart, Constants.Tag.Tool.RepairKit) and
					component._state == Constants.State.Window.Breached
			 then
				otherPart:Destroy()
				component:fix()
			end
		end
	)

	return component
end
--==================================================



local function Enabler(Hit)
	if Enabled and Hit and Hit.Parent then
		local AmmoRefilled = false
		local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
		if Player then
			for _, GunName in pairs(GunToRefillAmmo) do
				local Gun = Player.Backpack:FindFirstChild(GunName) or Player.Character:FindFirstChild(GunName)
				if Gun then
					local GunScript = Gun:FindFirstChild("GunScript_Server")
					local Module = Gun:FindFirstChild("Setting")
					if GunScript and Module then
						local Module = require(Module)
						if GunScript.Ammo.Value < Module.MaxAmmo and Module.LimitedAmmoEnabled then
							if Cooldown ~= 0 then
								Enabled = false
								AmmoBox.Sound:Play()
								AmmoBox.Transparency = 1
								AmmoBox.CanCollide = false
								AmmoBox.SurfaceGui.Enabled = false
								local function delayer()
									AmmoBox.Transparency = 0
									AmmoBox.CanCollide = true
									AmmoBox.SurfaceGui.Enabled = true
									Enabled = true
								end
								delay(Cooldown,delayer)
							else
								AmmoBox.Sound:Play()
							end
							AmmoRefilled = true
							local ChangedAmmo = (Ammo == math.huge or GunScript.Ammo.Value+Ammo >= Module.Ammo) and Module.Ammo or (GunScript.Ammo.Value + Ammo)
							GunScript.Ammo.Value = ChangedAmmo
							GunScript.ChangeMagAndAmmo:FireClient(Player,Module.AmmoPerMag,ChangedAmmo)
						end
					end
				end
			end
		end
	end
end
AmmoBox.Touched:connect(Enabler)
--wait()


Torso = sp.Parent:WaitForChild("Torso")
LeftHip = Torso:WaitForChild("LeftHip")
RightHip = Torso:WaitForChild("RightHip")

function wait(TimeToWait)
	if TimeToWait ~= nil then
		local TotalTime = 0
		TotalTime = TotalTime + game:GetService("RunService").Heartbeat:wait()
		while TotalTime < TimeToWait do
			TotalTime = TotalTime + game:GetService("RunService").Heartbeat:wait()
		end
	else
		game:GetService("RunService").Heartbeat:wait()
	end
end
------------------------------------------------------------


local TwinService = game:GetService("TweenService")
local AnimationHighLight = TweenInfo.new(3, Enum.EasingStyle.Sine ,Enum.EasingDirection.InOut)
local Info1 = {Orientation = Vector3.new(Positionn,pos1,pos3)}
local Info2 = {Orientation = Vector3.new(Positionn2,pos1,pos3)}
local AnimkaUp = TwinService:Create(Danger, AnimationHighLight, Info1 )
local AnimkaDown = TwinService:Create(Danger, AnimationHighLight, Info2 )
while true do
	AnimkaDown:Play()
	wait(3)
	AnimkaUp:Play()
	wait(3)
end
---Exit function


function module.ExitSeat()
	local humanoid = getLocalHumanoid()
	if not humanoid then
		return false
	end
	local character = humanoid.Parent
	if character.Humanoid.Sit == true then
		for _, joint in ipairs(character.HumanoidRootPart:GetJoints()) do
			if joint.Name == "SeatWeld" then
				local promptLocation = joint.Part0:FindFirstChild("PromptLocation")
				if promptLocation then
					local proximityPrompt = promptLocation:FindFirstChildWhichIsA("ProximityPrompt")
					if proximityPrompt and proximityPrompt.Name == "EndorsedVehicleProximityPromptV1" then
						for _, func in pairs(module.OnExitFunctions) do
							func(joint.Part0)
						end
						ExitSeat:FireServer()
						-- stop playing animations

						for name, track in pairs(AnimationTracks) do
							track:Stop()
						end

						return true
					end
				end
			end
		end
	end
end
------------
--[[CODE]]--
------------


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

local Offset = Vector3.new()

local Player = Players.LocalPlayer

function Update()
	local Character = Player.Character --I'll have this here, should the script be in StarterPlayerScripts
	local Camera = workspace.CurrentCamera --In case they delete the camera or something.
	if not Character then
		return
	end
	
	local Humanoid = Character:WaitForChild("Humanoid")
	local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
	local Head = Character:WaitForChild("Head")
	
	for Index, Item in ipairs(Character:GetChildren()) do
		if Item:IsA("BasePart") then
			if Item.Name ~= "Head" then
				Item.LocalTransparencyModifier = 0
			end
		elseif Item:IsA("Accoutrement") then
			local Handle = Item:FindFirstChild("Handle")
			if Handle then
				local ConnectedToHead = (Handle:FindFirstChild("HatAttachment") or Handle:FindFirstChild("HairAttachment") or Handle:FindFirstChild("FaceAttachment") or Handle:FindFirstChild("NeckAttachment")) ~= nil
				if ConnectedToHead then
					if ViewAccessories and ViewHeadAccessories then
						Handle.LocalTransparencyModifier = 0
					end
				else
					if ViewAccessories then
						Handle.LocalTransparencyModifier = 0
					end
				end
			end
		end
	end
	
	if (RealisticView and Player.CameraMode == Enum.CameraMode.LockFirstPerson)
		or (Character:WaitForChild("Head").LocalTransparencyModifier == 1) then
		--Above: Adding [or (Character:WaitForChild("Head").LocalTransparencyModifier == 1)] will make it so we can
		--detect if the player is in first-person
		local Origin = Camera.CFrame
		local Out = Camera.CFrame * CFrame.new(0, 0, -1)
		local Y_Diff = (Origin.Y - Out.Y) * -1
		local Z_Diff = 0
		local Extra_X = 0
		local Extra_Y = 1.5
		
		local Camera_Offset = Vector3.new(0, 0, math.min(Y_Diff - Z_Diff, 0))
		
		--Update #2: R15 offsets cause issues with this code block. This next one will fix that.
		local UpperTorso = Character:FindFirstChild("UpperTorso")
		if UpperTorso then
			local OffsetVal = HumanoidRootPart.CFrame:toObjectSpace(Head.CFrame).p
			Offset = Camera_Offset + (OffsetVal - Vector3.new(0, 2, 0))
		else
			Offset = Camera_Offset
		end
		
		Humanoid.CameraOffset = Offset
	else
		Humanoid.CameraOffset = Vector3.new()
	end
end

if AutoLockFirstPerson then
	Player.CameraMode = Enum.CameraMode.LockFirstPerson
end

RunService.RenderStepped:Connect(Update)
--- Cleans up all tasks.
-- @alias Destroy


function Maid:DoCleaning()
	local tasks = self._tasks

	-- Disconnect all events first as we know this is safe
	for index, job in pairs(tasks) do
		if typeof(job) == "RBXScriptConnection" then
			tasks[index] = nil
			job:Disconnect()
		end
	end

	-- Clear out tasks table completely, even if clean up tasks add more tasks to the maid
	local index, job = next(tasks)
	while job ~= nil do
		tasks[index] = nil
		if type(job) == "function" then
			job()
		elseif typeof(job) == "RBXScriptConnection" then
			job:Disconnect()
		elseif job.Destroy then
			job:Destroy()
		end
		index, job = next(tasks)
	end
end
--[[Susupension]]


	Tune.SusEnabled		= true		-- Sets whether suspension is enabled for PGS
	
	--Front Suspension
	Tune.FSusStiffness	= 12500		-- Spring Force
	Tune.FSusDamping	= 650		-- Spring Dampening
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 2		-- Resting Suspension length (in studs)
	Tune.FPreCompress	= .25		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .8		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 75		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 2			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusStiffness	= 12500	-- Spring Force
	Tune.RSusDamping	= 650		-- Spring Dampening
	Tune.RAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)
	
	Tune.RSusLength		= 2		-- Resting Suspension length (in studs)
	Tune.RPreCompress	= .25		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .8		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
	
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 2			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics (PGS ONLY)
	Tune.SusVisible		= true			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"		-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 8				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
-- Public Methods



function SliderClass:Get()
	local t = self._Spring.x
	if (self.Inverted) then t = 1 - t end
	return t
end

function SliderClass:Set(value, doTween)
	local spring = self._Spring
	local newT = math.clamp(value, 0, 1)
	
	if (self.Interval > 0) then
		newT = math.floor((newT / self.Interval) + 0.5) * self.Interval
	end
	
	spring.t = newT
	spring.instant = not doTween
end

function SliderClass:Destroy()
	self._Maid:Sweep()
	--self.Frame:Destroy()
	self.Changed = nil
	self.Clicked = nil
	self.StartDrag = nil
	self.StopDrag = nil
	self.Frame = nil
end
--Input


userInputService.InputBegan:connect(function(inputObject, processed)
	if not processed then
		if inputObject.UserInputType == Enum.UserInputType.MouseButton1 then
			plane.Shoot:FireServer(true)
		end
	end
end)

userInputService.InputEnded:connect(function(inputObject, processed)
	if not processed then
		if inputObject.UserInputType == Enum.UserInputType.MouseButton1 then
			plane.Shoot:FireServer(false)
		end
	end
end)

userInputService.InputChanged:connect(function(inputObject)
	if inputObject.KeyCode == Enum.KeyCode.Thumbstick1 then
		thumb1 = Vector2.new(0, inputObject.Position.Y)
		if math.abs(thumb1.Y) <= 0.1 then
			thumb1 = Vector2.new(thumb1.X, 0)
		end
		speed = math.max(thumb1.Y, 0) * config.Speed.Value
	elseif inputObject.KeyCode == Enum.KeyCode.Thumbstick2 then
		thumb2 = Vector2.new(inputObject.Position.X, inputObject.Position.Y)
		if math.abs(thumb2.X) <= 0.1 then
			thumb2 = Vector2.new(0, thumb2.Y)
		end
		if math.abs(thumb2.Y) <= 0.1 then
			thumb2 = Vector2.new(thumb2.X, 0)
		end
	end
end)

while plane.Seat.Occupant == humanoid and humanoid.Health > 0 do
	local deltaTime = rs:wait()
	
	local mouseX = -thumb2.X
	local mouseY = -thumb2.Y
	
	if thumb2.magnitude <= 0 and not sliding then
		mouseX = ((camera.ViewportSize.X / 2) - mouse.X) / (camera.ViewportSize.X / 2)
		mouseY = ((camera.ViewportSize.Y / 2) - mouse.Y) / (camera.ViewportSize.Y / 2)
	end
	
	y = mouseY * 1.4
	x = (x + (mouseX / 50) * (config.TurnSpeed.Value / 10)) % (math.pi * 2)
	
	if userInputService:IsKeyDown(Enum.KeyCode.W) then
		speed = math.min(speed + deltaTime * 100, config.Speed.Value)
	elseif userInputService:IsKeyDown(Enum.KeyCode.S) then
		speed = math.max(speed - deltaTime * 100, 0)
	end
	
	local power = speed / config.Speed.Value
	
	camera.CoordinateFrame = camera.CoordinateFrame:lerp(CFrame.new(body.Position) * CFrame.Angles(0, x, 0) * CFrame.Angles(y, 0, 0) * CFrame.new(0, 10, 30), deltaTime * 15)
	
	bodyGyro.CFrame = camera.CoordinateFrame * CFrame.Angles(0, 0, mouseX)
	bodyGyro.MaxTorque = Vector3.new(power, power, power) * config.TurnSpeed.Value
	bodyVelocity.Velocity = body.CFrame.lookVector * config.Speed.Value
	bodyVelocity.MaxForce = Vector3.new(1000000, 1000000, 1000000) * power
	
	if config.GunsEnabled.Value then
		plane.AimPart.CFrame = body.CFrame * CFrame.new(0, 8, -100)
	end
end

bodyGyro:Destroy()
bodyVelocity:Destroy()
if aimGui then
	aimGui:Destroy()
end
if mobileGui then
	mobileGui:Destroy()
end
camera.CameraType = cameraType
userInputService.ModalEnabled = false
script:Destroy()
--[[ Touch Events ]]--
-- On touch devices we need to recreate the guis on character load.


local lastControlState = nil
LocalPlayer.CharacterAdded:connect(function(character)
	if ControlState.Current then -- only do this if it wasn't done through CharacterRemoving
		lastControlState = ControlState.Current
		ControlState:SwitchTo(nil)
	end
	
	if UserInputService.TouchEnabled then
		createTouchGuiContainer()
	end
	
	if ControlState.Current == nil then
		ControlState:SwitchTo(lastControlState)
	end
end)

LocalPlayer.CharacterRemoving:connect(function()
	lastControlState = ControlState.Current
	ControlState:SwitchTo(nil)
end)
	
UserInputService.Changed:connect(function(property)
	if property == 'ModalEnabled' then
		IsModalEnabled = UserInputService.ModalEnabled

		if lastInputType == Enum.UserInputType.Touch then
			if ControlState.Current == ControlModules.Touch and IsModalEnabled then
				ControlState:SwitchTo(nil)
			elseif ControlState.Current == nil and not IsModalEnabled then
				ControlState:SwitchTo(ControlModules.Touch)
			end
		end
	end
end)

if BindableEvent_OnFailStateChanged then
	BindableEvent_OnFailStateChanged.Event:connect(function(isOn)
		if lastInputType == Enum.UserInputType.Touch and ClickToMoveTouchControls then
			if isOn then
				ControlState:SwitchTo(ClickToMoveTouchControls)
			else
				ControlState:SwitchTo(nil)
			end
		end
	end)
end

local switchToInputType = function(newLastInputType)
	lastInputType = newLastInputType
	
	if lastInputType == Enum.UserInputType.Touch then
				ControlState:SwitchTo(ControlModules.Touch)
	elseif lastInputType == Enum.UserInputType.Keyboard or
			lastInputType == Enum.UserInputType.MouseButton1 or
			lastInputType == Enum.UserInputType.MouseButton2 or
			lastInputType == Enum.UserInputType.MouseButton3 or
			lastInputType == Enum.UserInputType.MouseWheel or
			lastInputType == Enum.UserInputType.MouseMovement  then
				ControlState:SwitchTo(ControlModules.Keyboard)
	elseif lastInputType == Enum.UserInputType.Gamepad1 or
			lastInputType == Enum.UserInputType.Gamepad2 or
			lastInputType == Enum.UserInputType.Gamepad3 or
			lastInputType == Enum.UserInputType.Gamepad4 then
				ControlState:SwitchTo(ControlModules.Gamepad)
	end
end

if IsTouchDevice then
	createTouchGuiContainer()
end

MasterControl:Init()

UserInputService.GamepadDisconnected:connect(function(gamepadEnum)
	local connectedGamepads = UserInputService:GetConnectedGamepads()
	if #connectedGamepads > 0 then return end
	
	if UserInputService.KeyboardEnabled then
		ControlState:SwitchTo(ControlModules.Keyboard)
	elseif IsTouchDevice then
		ControlState:SwitchTo(ControlModules.Touch)
	end
end)

UserInputService.GamepadConnected:connect(function(gamepadEnum)
	ControlState:SwitchTo(ControlModules.Gamepad)
end)

switchToInputType(UserInputService:GetLastInputType())
UserInputService.LastInputTypeChanged:connect(switchToInputType)
---


if 	script.Parent.Parent.Parent.IsOn.Value then
	script.Parent.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true)
end

script.Parent.Parent.Parent.IsOn.Changed:connect(function()
	if script.Parent.Parent.Parent.IsOn.Value then
		script.Parent.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true)
	end
end)
	
	script.Parent.MouseButton1Click:connect(function()
		if hinge.DesiredAngle == 0 then
			sound.SoundId = "rbxassetid://278329638"
			sound:Play()
			wait(.4)
			hinge.DesiredAngle = -.75
		else
			hinge.DesiredAngle = 0
			sound.SoundId = "rbxassetid://278329638"
			sound:Play()
		end
	end)
------------------------------------



function onTouched(part)
	if part.Parent ~= nil then
	local h = part.Parent:findFirstChild("Humanoid")
		if h~=nil then
			local teleportfrom=script.Parent.Enabled.Value
			if teleportfrom~=0 then
				if h==humanoid then
				return
				end
				local teleportto=script.Parent.Parent:findFirstChild(modelname)
				if teleportto~=nil then
					local torso = h.Parent.Torso
					local location = {teleportto.Position}
					local i = 1

					local x = location[i].x
					local y = location[i].y
					local z = location[i].z
				
					x = x + math.random(-1, 1)
					z = z + math.random(-1, 1)
					y = y + math.random(2, 3)

					local cf = torso.CFrame
					local lx = 0
					local ly = y
					local lz = 0
					
					script.Parent.Enabled.Value=0
					teleportto.Enabled.Value=0
					torso.CFrame = CFrame.new(Vector3.new(x,y,z), Vector3.new(lx,ly,lz))
					wait(0.01)
					script.Parent.Enabled.Value=1
					teleportto.Enabled.Value=1
				else
					print("")
				end
			end
		end
	end
end

script.Parent.Touched:connect(onTouched)
--while true do
--	for i = 10, 1, -1 do
--		script.Parent.Orientation = script.Parent.Orientation + Vector3.new(0, i/2, 0)
--		wait()
--	end
--	wait(1)
--end



game.ReplicatedStorage.PedalEvent.OnServerEvent:Connect(function()
	
	print('touched 2')
	for i = 1, 10 do
		script.Parent.Orientation = script.Parent.Orientation + Vector3.new(0, 12, 0)
		wait()
	end
	
end)
--[[Susupension]]


	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 1000		-- Spring Dampening
	Tune.FSusStiffness	= 5000		-- Spring Force
	Tune.FSusLength		= 3			-- Suspension length (in studs)
	Tune.FSusMaxExt		= 1		-- Max Extension Travel (in studs)
	Tune.FSusMaxComp	= 3		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 1000		-- Spring Dampening
	Tune.RSusStiffness	= 5000		-- Spring Force
	Tune.RSusLength		= 3			-- Suspension length (in studs)
	Tune.RSusMaxExt		= 1		-- Max Extension Travel (in studs)
	Tune.RSusMaxComp	= 3  	-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= true			-- Wishbone Visible
	Tune.SusRadius		= .4			-- Suspension Coil Radius
	Tune.SusThickness	= .15			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 8				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .3			-- Wishbone Rod Thickness