local a=game:GetService("Players")local b=game:GetService("RunService")local c=game:GetService("UserInputService")local d=game:GetService("ContextActionService")local e=a.LocalPlayer;local f=e:GetMouse()local g=workspace.CurrentCamera;local h=false;local i;local j=Instance.new("ScreenGui")j.Name="ShiftLockMobile"j.ResetOnSpawn=false;j.ZIndexBehavior=Enum.ZIndexBehavior.Sibling;local k=pcall(function()j.Parent=e:WaitForChild("PlayerGui")end)if not k then j.Parent=game:GetService("CoreGui")end;local l=Instance.new("ImageButton")l.Name="ShiftLockButton"l.Size=UDim2.new(0,50,0,50)l.Position=UDim2.new(1,-70,0.5,-25)l.BackgroundColor3=Color3.fromRGB(25,25,25)l.BackgroundTransparency=0.3;l.BorderSizePixel=0;l.Image="rbxasset://textures/ui/MouseLock/MouseLockIcon@2x.png"l.ImageColor3=Color3.fromRGB(255,255,255)l.Parent=j;local m=Instance.new("UICorner")m.CornerRadius=UDim.new(1,0)m.Parent=l;local n=Instance.new("UIStroke")n.Color=Color3.fromRGB(255,255,255)n.Thickness=2;n.Transparency=0.5;n.Parent=l;local o=Instance.new("ImageLabel")o.Name="ShiftLockCursor"o.Size=UDim2.new(0,20,0,20)o.Position=UDim2.new(0.5,-10,0.5,-10)o.BackgroundTransparency=1;o.Image="rbxasset://textures/Cursors/Gamepad/Pointer.png"o.ImageColor3=Color3.fromRGB(255,255,255)o.Visible=false;o.Parent=j;local function p()h=not h;if h then l.BackgroundColor3=Color3.fromRGB(52,142,255)l.BackgroundTransparency=0.2;n.Color=Color3.fromRGB(52,142,255)n.Thickness=3;o.Visible=true;local q=e.Character;if q then local r=q:FindFirstChildOfClass("Humanoid")if r then r.AutoRotate=false end end;i=b.RenderStepped:Connect(function()local q=e.Character;if not q then return end;local s=q:FindFirstChild("HumanoidRootPart")local r=q:FindFirstChildOfClass("Humanoid")if s and r and r.Health>0 then local t=g.CFrame;local u=t.LookVector;local v=CFrame.new(s.Position,s.Position+Vector3.new(u.X,0,u.Z))s.CFrame=CFrame.new(s.Position,s.Position+Vector3.new(u.X,0,u.Z))r.CameraOffset=Vector3.new(1.75,0,0)end end)else l.BackgroundColor3=Color3.fromRGB(25,25,25)l.BackgroundTransparency=0.3;n.Color=Color3.fromRGB(255,255,255)n.Thickness=2;o.Visible=false;local q=e.Character;if q then local r=q:FindFirstChildOfClass("Humanoid")if r then r.AutoRotate=true;r.CameraOffset=Vector3.new(0,0,0)end end;if i then i:Disconnect()i=nil end end end;l.MouseButton1Click:Connect(p)c.InputBegan:Connect(function(w,x)if x then return end;if w.KeyCode==Enum.KeyCode.LeftShift or w.KeyCode==Enum.KeyCode.RightShift then p()end end)e.CharacterAdded:Connect(function(q)if h then h=false;l.BackgroundColor3=Color3.fromRGB(25,25,25)l.BackgroundTransparency=0.3;n.Color=Color3.fromRGB(255,255,255)n.Thickness=2;o.Visible=false;if i then i:Disconnect()i=nil end end;local r=q:WaitForChild("Humanoid",5)if r then r.AutoRotate=true;r.CameraOffset=Vector3.new(0,0,0)end end)l.MouseEnter:Connect(function()if not h then game:GetService("TweenService"):Create(l,TweenInfo.new(0.2),{BackgroundTransparency=0.1,Size=UDim2.new(0,55,0,55)}):Play()end end)l.MouseLeave:Connect(function()if not h then game:GetService("TweenService"):Create(l,TweenInfo.new(0.2),{BackgroundTransparency=0.3,Size=UDim2.new(0,50,0,50)}):Play()end end)print("Mobile Shift Lock loaded!")