Roblox/luau_corpus huggingface dataset:
-- These controllers handle only walk/run movement, jumping is handled by the
-- TouchJump controller if any of these are active
local ClickToMove = require(script:WaitForChild("ClickToMoveController"))
local TouchJump = require(script:WaitForChild("TouchJump"))

local VehicleController = require(script:WaitForChild("VehicleController"))

local CONTROL_ACTION_PRIORITY = Enum.ContextActionPriority.Default.Value
--// Weapon Parts
local L_56_ = L_1_:WaitForChild('AimPart')
local L_57_
local L_58_ = L_1_:WaitForChild('Grip')
local L_59_ = L_1_:WaitForChild('FirePart')
local L_60_
local L_61_ = L_1_:WaitForChild('Mag')
local L_62_ = L_1_:WaitForChild('Bolt')
--TheNexusAvenger
--Manages getting custom and centralized modules.

local Resources = {}
-- Variables
local player = Players.LocalPlayer
local character = script.Parent
local npcModel = workspace.GuideNPC
local animationController = npcModel.AnimationController
local animation = Instance.new("Animation")
local lastWavedAt = 0
local characterIsNear = false
local waveAnimationTrack
--	local minPosition = offsetPosition - object.Base.Size/2
--	local maxPosition = offsetPosition + object.Base.Size/2	
	local minPosition = offsetPosition - worldBaseSize/2
	local maxPosition = offsetPosition + worldBaseSize/2	
	
	local stepsX = self.BuildZone.Plot.Size.X / tileSize.X
	local stepsZ = self.BuildZone.Plot.Size.Z / tileSize.Z
	
	local minX = math.floor(stepsX * minPosition.X / plot.Size.X + 0.5)
	local minZ = math.floor(stepsZ * minPosition.Z / plot.Size.Z + 0.5)
	
	local maxX = math.floor(stepsX * maxPosition.X / plot.Size.X + 0.5)
	local maxZ = math.floor(stepsZ * maxPosition.Z / plot.Size.Z + 0.5)
	
	local x, z
	for x = minX, maxX-1 do
		for z = minZ, maxZ-1 do
			self.PlotGrid[x+1][z+1] = true
-- Vars --

local Speed = 10 -- That's How Fast Your Image Spin
local Image = script.Parent -- Gets The Image
-- Decompiled with the Synapse X Luau decompiler.

local v1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
while not v1.Loaded do
	game:GetService("RunService").Heartbeat:Wait();
end;
local v2 = v1.PlayerModule.Get("playergui");
if v1.Settings.ForcedPortrait then
	v2.ScreenOrientation = Enum.ScreenOrientation.Portrait;
elseif v1.Settings.SupportsPortrait then
	v2.ScreenOrientation = Enum.ScreenOrientation.Sensor;
end;
local u1 = Enum.ScreenOrientation.Portrait;
local u2 = nil;
function Check()
	local l__CurrentScreenOrientation__3 = v2.CurrentScreenOrientation;
	v1.Variables.Orientation = l__CurrentScreenOrientation__3;
	v1.Variables.Portrait = l__CurrentScreenOrientation__3 == u1;
	v1.Variables.Landscape = l__CurrentScreenOrientation__3 ~= u1;
	if u2 then
		if u2 ~= l__CurrentScreenOrientation__3 then
			v1.Signal.Fire("Orientation Changed", l__CurrentScreenOrientation__3, u2);
		end;
	else
		v1.Signal.Fire("Orientation Changed", l__CurrentScreenOrientation__3, u2);
	end;
	u2 = l__CurrentScreenOrientation__3;
end;
task.defer(function()
	while true do
		Check();
		v1.Heartbeat(2);	
	end;
end);
-- Note: DotProduct check in CoordinateFrame::lookAt() prevents using values within about
-- 8.11 degrees of the +/- Y axis, that's why these limits are currently 80 degrees
local MIN_Y = math.rad(-80)
local MAX_Y = math.rad(80)

local TOUCH_ADJUST_AREA_UP = math.rad(30)
local TOUCH_ADJUST_AREA_DOWN = math.rad(-15)

local TOUCH_SENSITIVTY_ADJUST_MAX_Y = 2.1
local TOUCH_SENSITIVTY_ADJUST_MIN_Y = 0.5

local VR_ANGLE = math.rad(15)
local VR_LOW_INTENSITY_ROTATION = Vector2.new(math.rad(15), 0)
local VR_HIGH_INTENSITY_ROTATION = Vector2.new(math.rad(45), 0)
local VR_LOW_INTENSITY_REPEAT = 0.1
local VR_HIGH_INTENSITY_REPEAT = 0.4

local ZERO_VECTOR2 = Vector2.new(0,0)
local ZERO_VECTOR3 = Vector3.new(0,0,0)

local touchSensitivityFlagExists, touchSensitivityFlagEnabled = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserTouchSensitivityAdjust")
end)
local FFlagUserTouchSensitivityAdjust = touchSensitivityFlagExists and touchSensitivityFlagEnabled

local TOUCH_SENSITIVTY = Vector2.new(0.0045 * math.pi, 0.003375 * math.pi)
if FFlagUserTouchSensitivityAdjust then
	TOUCH_SENSITIVTY = Vector2.new(0.00945 * math.pi, 0.003375 * math.pi)
end
local MOUSE_SENSITIVITY = Vector2.new( 0.002 * math.pi, 0.0015 * math.pi )

local SEAT_OFFSET = Vector3.new(0,5,0)
local VR_SEAT_OFFSET = Vector3.new(0,4,0)
local HEAD_OFFSET = Vector3.new(0,1.5,0)
local R15_HEAD_OFFSET = Vector3.new(0, 1.5, 0)
local R15_HEAD_OFFSET_NO_SCALING = Vector3.new(0, 2, 0)
local HUMANOID_ROOT_PART_SIZE = Vector3.new(2, 2, 1)

local GAMEPAD_ZOOM_STEP_1 = 0
local GAMEPAD_ZOOM_STEP_2 = 10
local GAMEPAD_ZOOM_STEP_3 = 20

local PAN_SENSITIVITY = 20
local ZOOM_SENSITIVITY_CURVATURE = 0.5

local abs = math.abs
local sign = math.sign

local thirdGamepadZoomStepFlagExists, thirdGamepadZoomStepFlagEnabled = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserThirdGamepadZoomStep")
end)
local FFlagUserThirdGamepadZoomStep = thirdGamepadZoomStepFlagExists and thirdGamepadZoomStepFlagEnabled

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

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

local fixZoomIssuesFlagExists, fixZoomIssuesFlagEnabled = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserFixZoomClampingIssues")
end)
local FFlagUserFixZoomClampingIssues = fixZoomIssuesFlagExists and fixZoomIssuesFlagEnabled

local Util = require(script.Parent:WaitForChild("CameraUtils"))
local ZoomController = require(script.Parent:WaitForChild("ZoomController"))
-- New ProfileStore:

function ProfileService.GetProfileStore(profile_store_index, profile_template) --> [ProfileStore]
	
	local profile_store_name
	local profile_store_scope = nil
	
	-- Parsing profile_store_index:
	if type(profile_store_index) == "string" then
		-- profile_store_index as string:
		profile_store_name = profile_store_index
	elseif type(profile_store_index) == "table" then
		-- profile_store_index as table:
		profile_store_name = profile_store_index.Name
		profile_store_scope = profile_store_index.Scope
	else
		error("[ProfileService]: Invalid or missing profile_store_index")
	end
	
	-- Type checking:
	if profile_store_name == nil or type(profile_store_name) ~= "string" then
		error("[ProfileService]: Missing or invalid \"Name\" parameter")
	elseif string.len(profile_store_name) == 0 then
		error("[ProfileService]: ProfileStore name cannot be an empty string")
	end
	
	if profile_store_scope ~= nil and (type(profile_store_scope) ~= "string" or string.len(profile_store_scope) == 0) then
		error("[ProfileService]: Invalid \"Scope\" parameter")
	end

	if type(profile_template) ~= "table" then
		error("[ProfileService]: Invalid profile_template")
	end

	local profile_store
	profile_store = {
		Mock = {
			LoadProfileAsync = function(_, profile_key, not_released_handler)
				return profile_store:LoadProfileAsync(profile_key, not_released_handler, UseMockTag)
			end,
			GlobalUpdateProfileAsync = function(_, profile_key, update_handler)
				return profile_store:GlobalUpdateProfileAsync(profile_key, update_handler, UseMockTag)
			end,
			ViewProfileAsync = function(_, profile_key)
				return profile_store:ViewProfileAsync(profile_key, UseMockTag)
			end,
			WipeProfileAsync = function(_, profile_key)
				return profile_store:WipeProfileAsync(profile_key, UseMockTag)
			end
		},

		_profile_store_name = profile_store_name,
		_profile_store_scope = profile_store_scope,
		_profile_store_lookup = profile_store_name .. "\0" .. (profile_store_scope or ""),
		
		_profile_template = profile_template,
		_global_data_store = nil,
		_loaded_profiles = {},
		_profile_load_jobs = {},
		_mock_loaded_profiles = {},
		_mock_profile_load_jobs = {},
		_is_pending = false,
	}
	setmetatable(profile_store, ProfileStore)
	
	if IsLiveCheckActive == true then
		profile_store._is_pending = true
		coroutine.wrap(function()
			WaitForLiveAccessCheck()
			if UseMockDataStore == false then
				profile_store._global_data_store = DataStoreService:GetDataStore(profile_store_name, profile_store_scope)
			end
			profile_store._is_pending = false
		end)()
	else
		if UseMockDataStore == false then
			profile_store._global_data_store = DataStoreService:GetDataStore(profile_store_name, profile_store_scope)
		end
	end
	
	return profile_store
end
-- functions

REMOTES.GetDebugInfo.OnServerInvoke = function()
	if not serverRegion then
		local json	= HttpService:GetAsync("http://ip-api.com/json")
		local data	= HttpService:JSONDecode(json)
		
		serverRegion	= data.regionName
	end
	
	local info	= {
		ServerRegion	= serverRegion;
	}
	
	return info
end
--Rescripted by Luckymaxer

Tool = script.Parent
Handle = Tool:WaitForChild("Handle")

Players = game:GetService("Players")

Animations = {}
Sounds = {}

ServerControl = Tool:WaitForChild("ServerControl")
ClientControl = Tool:WaitForChild("ClientControl")

ClientControl.OnClientInvoke = (function(Mode, Value)
	if Mode == "PlayAnimation" then
		for i, v in pairs(Animations) do
			if v.Animation == Value then
				v.AnimationTrack:Stop()
				table.remove(Animations, i)
			end
		end
		local AnimationTrack = Humanoid:LoadAnimation(Value.Animation)
		table.insert(Animations, {Animation = Value.Animation, AnimationTrack = AnimationTrack})
		AnimationTrack:Play(nil, nil, Value.Speed)
	elseif Mode == "PlaySound" then
		for i, v in pairs(Sounds) do
			if v == Value then
				table.remove(Sounds, i)
			end
		end
		table.insert(Sounds, Value)
		Value:Play()
	end
end)

function InvokeServer(Mode, Value)
	pcall(function()
		ServerControl:InvokeServer(Mode, Value)
	end)
end

function Equipped(Mouse)
	Character = Tool.Parent
	Player = Players:GetPlayerFromCharacter(Character)
	Humanoid = Character:FindFirstChild("Humanoid")
	if not Player or not Humanoid or Humanoid.Health == 0 then
		return
	end
	Mouse.Button1Down:connect(function()
		InvokeServer("MouseClick", true)
	end)
end

function Unequipped()
	for i, v in pairs(Animations) do
		if v and v.AnimationTrack then
			v.AnimationTrack:Stop()
		end
	end
	for i, v in pairs(Sounds) do
		if v then
			v:Stop()
		end
	end
	Animations = {}
	Sounds = {}
end

Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)
----------------------------------------------------------------------------------------------------
--------------------=[ CFRAME ]=--------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
	,EnableHolster = false
	,HolsterTo = 'Torso'				 -- Put the name of the body part you wanna holster to
	,HolsterPos = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
	
	,RightArmPos = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))	--Server
	,LeftArmPos = CFrame.new(1.2,-0.05,-1.65) * CFrame.Angles(math.rad(-120),math.rad(35),math.rad(-25))	--server
	
	,ServerGunPos = CFrame.new(-.3, -1, -0.4) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))
	,GunPos = CFrame.new(0.15, -0.15, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))

	,RightPos = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))	--Client
	,LeftPos = CFrame.new(0.85, 0.5,-2.2) * CFrame.Angles(math.rad(-120),math.rad(20),math.rad(-25))	--Client
}

return Config
--// Functions
function Weld(L_53_arg1, L_54_arg2, L_55_arg3)
	local L_56_ = Instance.new("Motor6D", L_53_arg1)
	L_56_.Part0 = L_53_arg1
	L_56_.Part1 = L_54_arg2
	L_56_.Name = L_53_arg1.Name
	L_56_.C0 = L_55_arg3 or L_53_arg1.CFrame:inverse() * L_54_arg2.CFrame
	return L_56_
end
-- Setup

for _,Folder in pairs(RS.Pets.Models:GetChildren()) do
	for _,Model in pairs(Folder:GetChildren()) do
		if Model.Name ~= "Settings" then
			local PetID = script.PetSetup.PetID:Clone()
			local Pos = script.PetSetup.Pos:Clone()
			local BG = script.PetSetup.BodyGyro:Clone()
			local BP = script.PetSetup.BodyPosition:Clone()
			local FollowScript = script.PetSetup.Follow:Clone()
			local LevelingScript = script.PetSetup.Leveling:Clone()
			PetID.Parent = Model
			Pos.Parent = Model
			BG.Parent = Model.PrimaryPart
			BP.Parent = Model.PrimaryPart
			FollowScript.Parent = Model
			LevelingScript.Parent = Model
		end
	end
end
-- functions

function stopAllAnimations()
	local oldAnim = currentAnim

	-- return to idle if finishing an emote
	if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
		oldAnim = "idle"
	end
	
	if currentlyPlayingEmote then
		oldAnim = "idle"
		currentlyPlayingEmote = false
	end

	currentAnim = ""
	currentAnimInstance = nil
	if (currentAnimKeyframeHandler ~= nil) then
		currentAnimKeyframeHandler:disconnect()
	end

	if (currentAnimTrack ~= nil) then
		currentAnimTrack:Stop()
		currentAnimTrack:Destroy()
		currentAnimTrack = nil
	end

	-- clean up walk if there is one
--Below u see the keys table.. to modyfy the key u press change the letter between the ""
local keys = {
					spdup={code = "m"}; 
					spddwn={code = "n"};
					start={code = "y"};
					stop={code = "x"};
					light={code="a"};
					dwn={code="j"};
					up={code="u"};
					camset={code="c"};
					minigun= "t";
					missile= "f";
				 }
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --


while true do
	wait()
	if Elevator:WaitForChild("Direction").Value ~= 0 then 
		if Elevator:WaitForChild("Velocity").Value == 0 then
		    if Elevator:WaitForChild("Direction").Value == 1 then
		        This.Display.ARW1.Up1.Transparency = 0
		        This.Display.ARW1.Down1.Transparency = 1
		    else
		        This.Display.ARW1.Up1.Transparency = 1
		        This.Display.ARW1.Down1.Transparency = 0
		    end
	    elseif Elevator:WaitForChild("Velocity").Value ~= 0 then
		    if Elevator:WaitForChild("Direction").Value == 1 then
			    wait(0.5)
			    This.Display.ARW1.Up1.Transparency = 0
			    This.Display.ARW1.Down1.Transparency = 1
			    wait(0.5)
			    This.Display.ARW1.Up1.Transparency = 1
			    This.Display.ARW1.Down1.Transparency = 1
		    else
			    wait(0.5)
			    This.Display.ARW1.Down1.Transparency = 0
			    This.Display.ARW1.Up1.Transparency = 1
			    wait(0.5)
			    This.Display.ARW1.Down1.Transparency = 1
			    This.Display.ARW1.Up1.Transparency = 1
		    end
		end
	else
		This.Display.ARW1.Up1.Transparency = 1
		This.Display.ARW1.Down1.Transparency = 1
	end
end
--[[
	Manages batch updating of spring objects.
]]

local RunService = game:GetService("RunService")

local Package = script.Parent.Parent
local Types = require(Package.Types)
local packType = require(Package.Animation.packType)
local springCoefficients = require(Package.Animation.springCoefficients)
local updateAll = require(Package.Dependencies.updateAll)

type Set<T> = {[T]: any}
type Spring = Types.Spring<any>

local SpringScheduler = {}

local EPSILON = 0.0001
local activeSprings: Set<Spring> = {}
local lastUpdateTime = os.clock()

function SpringScheduler.add(spring: Spring)
	-- we don't necessarily want to use the most accurate time - here we snap to
	-- the last update time so that springs started within the same frame have
	-- identical time steps
	spring._lastSchedule = lastUpdateTime
	spring._startDisplacements = {}
	spring._startVelocities = {}
	for index, goal in ipairs(spring._springGoals) do
		spring._startDisplacements[index] = spring._springPositions[index] - goal
		spring._startVelocities[index] = spring._springVelocities[index]
	end

	activeSprings[spring] = true
end

function SpringScheduler.remove(spring: Spring)
	activeSprings[spring] = nil
end


local function updateAllSprings()
	local springsToSleep: Set<Spring> = {}
	lastUpdateTime = os.clock()

	for spring in pairs(activeSprings) do
		local posPos, posVel, velPos, velVel = springCoefficients(lastUpdateTime - spring._lastSchedule, spring._currentDamping, spring._currentSpeed)

		local positions = spring._springPositions
		local velocities = spring._springVelocities
		local startDisplacements = spring._startDisplacements
		local startVelocities = spring._startVelocities
		local isMoving = false

		for index, goal in ipairs(spring._springGoals) do
			local oldDisplacement = startDisplacements[index]
			local oldVelocity = startVelocities[index]
			local newDisplacement = oldDisplacement * posPos + oldVelocity * posVel
			local newVelocity = oldDisplacement * velPos + oldVelocity * velVel

			if math.abs(newDisplacement) > EPSILON or math.abs(newVelocity) > EPSILON then
				isMoving = true
			end

			positions[index] = newDisplacement + goal
			velocities[index] = newVelocity
		end

		if not isMoving then
			springsToSleep[spring] = true
		end
	end

	for spring in pairs(activeSprings) do
		spring._currentValue = packType(spring._springPositions, spring._currentType)
		updateAll(spring)
	end

	for spring in pairs(springsToSleep) do
		activeSprings[spring] = nil
	end
end

RunService:BindToRenderStep(
	"__FusionSpringScheduler",
	Enum.RenderPriority.First.Value,
	updateAllSprings
)

return SpringScheduler
--[[
	* Copyright (c) Roblox Corporation. All rights reserved.
	* Licensed under the MIT License (the "License");
	* you may not use this file except in compliance with the License.
	* You may obtain a copy of the License at
	*
	*     https://opensource.org/licenses/MIT
	*
	* Unless required by applicable law or agreed to in writing, software
	* distributed under the License is distributed on an "AS IS" BASIS,
	* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	* See the License for the specific language governing permissions and
	* limitations under the License.
]]
local Packages = script.Parent.Parent
local Number = require(Packages.Number)
--// SERVICES //--

local CoreGuiService = game:GetService('CoreGui')
local PlayersService = game:GetService('Players')
local GuiService = game:GetService('GuiService')
local UserInputService = game:GetService('UserInputService')
local StarterGui = game:GetService('StarterGui')
local STS_Settings = script.Parent:WaitForChild('STS_Settings')
local StaminaButton = script.Parent:WaitForChild('Mobile')
local Border = StaminaButton:WaitForChild('Border')
local Bar = script.Parent:WaitForChild('Frame_Bar')
local SprintGui = script.Parent
local UIS = game:GetService("UserInputService")
local TS = game:GetService("TweenService")
local plr = game.Players.LocalPlayer
local player = game.Players.LocalPlayer

local Character = game.Players.LocalPlayer.Character
if Character == nil then
	repeat
		wait()
	until (Character ~= nil)
	print('FoundCharacter')
end
local Debounce = false
local Stamina = Character:WaitForChild('Stamina')
local Sprinting = false
local StaminaReductionRate = STS_Settings:WaitForChild('StaminaDeductionAmount').Value -- Amount taken from Stamina per SprintReductionDelay
local StaminaReductionDelay = STS_Settings:WaitForChild('StaminaDeductionDelay').Value -- Time in Seconds for SprintReductionRate to be removed from stamina
local OriginalWalkSpeed = Character.Humanoid.WalkSpeed -- Get Original WalkSpeed
local SprintSpeed = STS_Settings:WaitForChild('SprintSpeed').Value
local RegenerateDelay = STS_Settings:WaitForChild('StaminaRegenerationDelay').Value
local RegenerateValue = STS_Settings:WaitForChild('StaminaRegenerationAmount').Value
--// Handling Settings		
	Firerate = 60 / 700; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 2; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
--[[
	Stores common public-facing type information for Fusion APIs.
]]

type Set<T> = {[T]: any}
--[=[
	Yields the thread until a `:Fire` call occurs, returns what the signal was fired with.

	```lua
	task.spawn(function()
		print(
			ScriptSignal:Wait()
		)
	end)

	ScriptSignal:Fire("Arg", nil, 1, 2, 3, nil)
	-- "Arg", nil, 1, 2, 3, nil are printed
	```

	@yields
	@return ...any
	@ignore
]=]
function ScriptSignal:Wait(): (...any)
    local thread
    do
        thread = coroutine.running()

        local connection
        connection = self:Connect(function(...)
            connection:Disconnect()
            task.spawn(thread, ...)
        end)
    end

    return coroutine.yield()
end
--		for i, v in pairs({FrontLeftHip, FrontRightHip, BackLeftHip, BackRightHip}) do
--			v.MaxVelocity = 0.5
--		end
		LimbAmplitude = 0.2
		LimbFrequency = 7
		ClimbFudge = math.pi
	else
		LimbAmplitude = 0.05
		LimbFrequency = 2
	end
	
	if not Flying.Value then
		LeftWing.DesiredAngle = 0
		RightWing.DesiredAngle = 0
		local LimbDesiredAngle = (LimbAmplitude * math.sin(Time * LimbFrequency))
-----------------
--| Variables |--
-----------------

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

local MyPlayer

local Tool = script.Parent
local ToolHandle = Tool:WaitForChild("Handle")

local MouseLoc = Tool:WaitForChild("MouseLoc",10)

local RocketScript = script:WaitForChild('Rocket')
local SwooshSound = script:WaitForChild('Swoosh')
local BoomSound = script:WaitForChild('Boom')
-- Find the device's rotation via gyroscope and apply to the segway
	UserInputService.DeviceRotationChanged:connect(function(rotation, rotCFrame)
	local x,y = rotCFrame:toEulerAnglesXYZ()
	local Sensitivity = 1.9
	
		-- Direction
		if -x*Sensitivity > -1 and -x*Sensitivity < 1 then -- Makes sure the device isn't tilted too much
			Direction = -x*Sensitivity+0.4
		elseif -x*Sensitivity > 0 then -- Otherwise we'll go to the max speed
			Direction = 1
		elseif -x*Sensitivity < 0 then -- Otherwise we'll go to the max speed
			Direction = -1
		end
			
			-- Steering
			if -y*Sensitivity > -1 and -y*Sensitivity < 1 then -- Makes sure the device isn't tilted too much
				Steer = -y*Sensitivity
			elseif -y*Sensitivity > 0 then -- Otherwise we'll go to the max speed
				Steer = 1
			elseif -y*Sensitivity < 0 then -- Otherwise we'll go to the max speed
				Steer = -1
			end
	end)
end

UserInputService.InputBegan:connect(function(Key,ProcessedEvent)
	if WeldObject.Value ~= nil and not ProcessedEvent then
		
		-- Hop off segway if press Spacebar, Backspace or controller A button
		if Key.KeyCode == Enum.KeyCode.Space or Key.KeyCode == Enum.KeyCode.Backspace or Key.KeyCode == Enum.KeyCode.ButtonA then	
			Hopoff()
		end
		
		--Forward
		if Key.KeyCode == Enum.KeyCode.W or Key.KeyCode == Enum.KeyCode.Up or Key.KeyCode == Enum.KeyCode.ButtonR2 then
			if Direction ~= 1 then
			Direction = 1
			end
		end
		
		--Backward
		if Key.KeyCode == Enum.KeyCode.S or Key.KeyCode == Enum.KeyCode.Down or Key.KeyCode == Enum.KeyCode.ButtonL2 then
			if Direction ~= -1 then
			Direction = -1
			end
		end
		
		--Left
		if Key.KeyCode == Enum.KeyCode.D or Key.KeyCode == Enum.KeyCode.Right then
			if Steer ~= 1 then
			Steer = 1
			end
		end
		
		--Right
		if Key.KeyCode == Enum.KeyCode.A or Key.KeyCode == Enum.KeyCode.Left then
			if Steer ~= -1 then
			Steer = -1
			end
		end
	end
end)
--//Server Animations
	RightHighReady = CFrame.new(-1, -1, -1.5) * CFrame.Angles(math.rad(-160), math.rad(0), math.rad(0));
	LeftHighReady = CFrame.new(.85,-0.35,-1.15) * CFrame.Angles(math.rad(-170),math.rad(60),math.rad(15));

	RightLowReady = CFrame.new(-1, 0.5, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0));
	LeftLowReady = CFrame.new(1.25,1.15,-1.35) * CFrame.Angles(math.rad(-60),math.rad(35),math.rad(-25));

	RightPatrol = CFrame.new(-1, -.35, -1.5) * CFrame.Angles(math.rad(-80), math.rad(-80), math.rad(0));
	LeftPatrol = CFrame.new(1,1.25,-.75) * CFrame.Angles(math.rad(-90),math.rad(-45),math.rad(-25));

	RightAim = CFrame.new(-.575, 0.1, -1) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0));
	LeftAim = CFrame.new(1.4,0.25,-1.45) * CFrame.Angles(math.rad(-120),math.rad(35),math.rad(-25));
	
	RightSprint = CFrame.new(-1, 0.5, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0));
	LeftSprint = CFrame.new(1.25,1.15,-1.35) * CFrame.Angles(math.rad(-60),math.rad(35),math.rad(-25));

	ShootPos = CFrame.new(0,0,.25);
	
}

return module