Back to Scripts
Mobile freecam chat double period

Mobile freecam chat double period

ScriptBlox
Universal Free

Game: Universal Script 📌

112 Views
0 Likes
0 Dislikes
Burger_scripts

Burger_scripts

offline

Features

Chat ".." for freecam toggle, opensource.

Tags

mobile Free Cam Mobile freecam Freecam mobile

Script Code

local a=math.pi;local b=math.abs;local c=math.clamp;local d=math.exp;local e=math.rad;local f=math.sign;local g=math.sqrt;local h=math.tan;local i=game:GetService("ContextActionService")local j=game:GetService("Players")local k=game:GetService("RunService")local l=game:GetService("StarterGui")local m=game:GetService("UserInputService")local n=game:GetService("GuiService")local o=j.LocalPlayer;if not o then j:GetPropertyChangedSignal("LocalPlayer"):Wait()o=j.LocalPlayer end;local p=workspace.CurrentCamera;workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()local q=workspace.CurrentCamera;if q then p=q end end)local r=Enum.ContextActionPriority.High.Value;local s=Vector3.new(1,1,1)*64;local t=Vector2.new(0.75,1)*8;local u=300;local v=e(90)local w=1.5;local x=1.0;local y=4.0;local z={}do z.__index=z;function z.new(A,B)local self=setmetatable({},z)self.f=A;self.p=B;self.v=B*0;return self end;function z:Update(C,D)local E=self.f*2*a;local F=self.p;local G=self.v;local H=D-F;local I=d(-E*C)local J=D+(G*C-H*(E*C+1))*I;local K=(E*C*(H*E-G)+G)*I;self.p=J;self.v=K;return J end;function z:Reset(B)self.p=B;self.v=B*0 end end;local L=Vector3.new()local M=Vector2.new()local N=0;local O=z.new(w,Vector3.new())local P=z.new(x,Vector2.new())local Q=z.new(y,0)local R=nil;local function S(T)local U=Instance.new("ScreenGui")U.Name="DeviceTypePrompt"U.Parent=o.PlayerGui;local V=Instance.new("Frame")V.Size=UDim2.new(0.3,0,0.2,0)V.Position=UDim2.new(0.35,0,0.4,0)V.BackgroundColor3=Color3.new(0.2,0.2,0.2)V.Parent=U;local W=Instance.new("TextLabel")W.Text="Select Device Type"W.Size=UDim2.new(1,0,0.3,0)W.BackgroundTransparency=1;W.TextColor3=Color3.new(1,1,1)W.Parent=V;local X=Instance.new("TextButton")X.Text="PC"X.Size=UDim2.new(0.4,0,0.4,0)X.Position=UDim2.new(0.1,0,0.4,0)X.BackgroundColor3=Color3.new(0.5,0.5,0.5)X.TextColor3=Color3.new(1,1,1)X.Parent=V;X.MouseButton1Click:Connect(function()R="PC"U:Destroy()T()end)local Y=Instance.new("TextButton")Y.Text="Mobile"Y.Size=UDim2.new(0.4,0,0.4,0)Y.Position=UDim2.new(0.5,0,0.4,0)Y.BackgroundColor3=Color3.new(0.5,0.5,0.5)Y.TextColor3=Color3.new(1,1,1)Y.Parent=V;Y.MouseButton1Click:Connect(function()R="Mobile"U:Destroy()T()end)end;local Z={}do local _;do local a0=2.0;local a1=0.15;local function a2(a3)return(d(a0*a3)-1)/(d(a0)-1)end;local function a4(a3)return a2((a3-a1)/(1-a1))end;function _(a3)return f(a3)*c(a4(b(a3)),0,1)end end;local a5={ButtonX=0,ButtonY=0,DPadDown=0,DPadUp=0,ButtonL2=0,ButtonR2=0,Thumbstick1=Vector2.new(),Thumbstick2=Vector2.new()}local a6={W=0,A=0,S=0,D=0,E=0,Q=0,U=0,H=0,J=0,K=0,I=0,Y=0,Up=0,Down=0,LeftShift=0,RightShift=0}local a7={Delta=Vector2.new(),MouseWheel=0}local a8=Vector3.new(1,1,1)local a9=Vector3.new(1,1,1)local aa=Vector2.new(1,1)*a/64;local ab=Vector2.new(1,1)*a/8;local ac=1.0;local ad=0.25;local ae=0.75;local af=0.25;local ag=1;local ah=nil;local ai=nil;local aj=nil;local ak=nil;local al=nil;local am=Vector2.new()local an=Vector2.new()local ao=Vector2.new()local ap=100;local aq=nil;local ar=nil;function Z.Vel(C)ag=c(ag+C*(a6.Up-a6.Down)*ae,0.01,4)local as=Vector3.new(_(a5.Thumbstick1.x),_(a5.ButtonR2)-_(a5.ButtonL2),_(-a5.Thumbstick1.y))*a8;local at=Vector3.new(a6.D-a6.A+a6.K-a6.H,a6.E-a6.Q+a6.I-a6.Y,a6.S-a6.W+a6.J-a6.U)*a9;local au=Vector3.new(0,0,0)if R=="Mobile"then au=Vector3.new(_(an.X),0,_(an.Y))*a8 end;local av=m:IsKeyDown(Enum.KeyCode.LeftShift)or m:IsKeyDown(Enum.KeyCode.RightShift)return(as+at+au)*ag*(av and af or 1)end;function Z.Pan(C)local as=Vector2.new(_(a5.Thumbstick2.y),_(-a5.Thumbstick2.x))*ab;local aw=a7.Delta*aa;a7.Delta=Vector2.new()return as+aw end;function Z.Fov(C)local as=(a5.ButtonX-a5.ButtonY)*ad;local aw=a7.MouseWheel*ac;a7.MouseWheel=0;return as+aw end;do local function ax(ay,az,aA)a6[aA.KeyCode.Name]=az==Enum.UserInputState.Begin and 1 or 0;return Enum.ContextActionResult.Sink end;local function aB(ay,az,aA)a5[aA.KeyCode.Name]=az==Enum.UserInputState.Begin and 1 or 0;return Enum.ContextActionResult.Sink end;local function aC(ay,az,aA)local aD=aA.Delta;a7.Delta=Vector2.new(-aD.y,-aD.x)return Enum.ContextActionResult.Sink end;local function aE(ay,az,aA)a5[aA.KeyCode.Name]=aA.Position;return Enum.ContextActionResult.Sink end;local function aF(ay,az,aA)a5[aA.KeyCode.Name]=aA.Position.z;return Enum.ContextActionResult.Sink end;local function aG(ay,az,aA)a7[aA.UserInputType.Name]=-aA.Position.z;return Enum.ContextActionResult.Sink end;local function aH(aI)for aJ,aK in pairs(aI)do aI[aJ]=aK*0 end end;function Z.StartCapture()i:BindActionAtPriority("FreecamKeyboard",ax,false,r,Enum.KeyCode.W,Enum.KeyCode.U,Enum.KeyCode.A,Enum.KeyCode.H,Enum.KeyCode.S,Enum.KeyCode.J,Enum.KeyCode.D,Enum.KeyCode.K,Enum.KeyCode.E,Enum.KeyCode.I,Enum.KeyCode.Q,Enum.KeyCode.Y,Enum.KeyCode.Up,Enum.KeyCode.Down)i:BindActionAtPriority("FreecamMousePan",aC,false,r,Enum.UserInputType.MouseMovement)i:BindActionAtPriority("FreecamMouseWheel",aG,false,r,Enum.UserInputType.MouseWheel)i:BindActionAtPriority("FreecamGamepadButton",aB,false,r,Enum.KeyCode.ButtonX,Enum.KeyCode.ButtonY)i:BindActionAtPriority("FreecamGamepadTrigger",aF,false,r,Enum.KeyCode.ButtonR2,Enum.KeyCode.ButtonL2)i:BindActionAtPriority("FreecamGamepadThumbstick",aE,false,r,Enum.KeyCode.Thumbstick1,Enum.KeyCode.Thumbstick2)if R=="Mobile"then ah=Instance.new("ScreenGui")ah.Name="FreecamTouchGui"ah.Parent=o.PlayerGui;ai=Instance.new("Frame")ai.Size=UDim2.new(0.5,0,1,0)ai.Position=UDim2.new(0,0,0,0)ai.BackgroundTransparency=1;ai.Active=true;ai.Parent=ah;aj=Instance.new("Frame")aj.Size=UDim2.new(0.5,0,1,0)aj.Position=UDim2.new(0.5,0,0,0)aj.BackgroundTransparency=1;aj.Active=true;aj.Parent=ah;ai.InputBegan:Connect(function(aA)if aA.UserInputType==Enum.UserInputType.Touch then am=aA.Position;an=Vector2.new()if aq then aq:Destroy()end;aq=Instance.new("Frame")aq.Size=UDim2.fromOffset(200,200)aq.Position=UDim2.fromOffset(aA.Position.X-100,aA.Position.Y-100)aq.BackgroundTransparency=0.8;aq.BackgroundColor3=Color3.fromRGB(0,170,255)aq.Parent=ah;local aL=Instance.new("UICorner")aL.CornerRadius=UDim.new(0.5,0)aL.Parent=aq;ar=Instance.new("Frame")ar.Size=UDim2.fromOffset(60,60)ar.Position=UDim2.new(0.5,-30,0.5,-30)ar.BackgroundTransparency=0;ar.BackgroundColor3=Color3.fromRGB(255,255,255)ar.Parent=aq;local aM=Instance.new("UICorner")aM.CornerRadius=UDim.new(0.5,0)aM.Parent=ar end end)ai.InputChanged:Connect(function(aA)if aA.UserInputType==Enum.UserInputType.Touch then local aD=aA.Position-am;local aN=aD.Magnitude;if aN>ap then aD=aD.Unit*ap end;an=aD/ap;if ar then ar.Position=UDim2.new(0.5,aD.X-30,0.5,aD.Y-30)end end end)ai.InputEnded:Connect(function(aA)if aA.UserInputType==Enum.UserInputType.Touch then an=Vector2.new()if aq then aq:Destroy()aq=nil end end end)aj.InputBegan:Connect(function(aA)if aA.UserInputType==Enum.UserInputType.Touch then ao=aA.Position end end)aj.InputChanged:Connect(function(aA)if aA.UserInputType==Enum.UserInputType.Touch then local B=aA.Position;local aD=B-ao;a7.Delta=a7.Delta+Vector2.new(-aD.Y,-aD.X)/2;ao=B end end)ak=Instance.new("TextButton")ak.Text="^"ak.Size=UDim2.new(0,60,0,60)ak.Position=UDim2.new(0.9,-60,0.6,-120)ak.BackgroundColor3=Color3.new(1,1,1)ak.TextColor3=Color3.new(0,0,0)ak.Parent=ah;ak.InputBegan:Connect(function(aA)if aA.UserInputType==Enum.UserInputType.Touch then a6.E=1 end end)ak.InputEnded:Connect(function(aA)if aA.UserInputType==Enum.UserInputType.Touch then a6.E=0 end end)al=Instance.new("TextButton")al.Text="v"al.Size=UDim2.new(0,60,0,60)al.Position=UDim2.new(0.9,-60,0.6,0)al.BackgroundColor3=Color3.new(1,1,1)al.TextColor3=Color3.new(0,0,0)al.Parent=ah;al.InputBegan:Connect(function(aA)if aA.UserInputType==Enum.UserInputType.Touch then a6.Q=1 end end)al.InputEnded:Connect(function(aA)if aA.UserInputType==Enum.UserInputType.Touch then a6.Q=0 end end)end end;function Z.StopCapture()ag=1;aH(a5)aH(a6)aH(a7)i:UnbindAction("FreecamKeyboard")i:UnbindAction("FreecamMousePan")i:UnbindAction("FreecamMouseWheel")i:UnbindAction("FreecamGamepadButton")i:UnbindAction("FreecamGamepadTrigger")i:UnbindAction("FreecamGamepadThumbstick")if ah then ah:Destroy()ah=nil end;an=Vector2.new()if aq then aq:Destroy()aq=nil end end end end;local function aO(aP)local aQ=0.1;local aR=p.ViewportSize;local aS=2*h(N/2)local aT=aR.x/aR.y*aS;local aU=aP.rightVector;local aV=aP.upVector;local aW=aP.lookVector;local aX=Vector3.new()local aY=512;for a3=0,1,0.5 do for aZ=0,1,0.5 do local a_=(a3-0.5)*aT;local b0=(aZ-0.5)*aS;local H=aU*a_-aV*b0+aW;local b1=aP.p+H*aQ;local b2,b3=workspace:FindPartOnRayWithIgnoreList(Ray.new(b1,H.unit*aY),{o.Character or nil})local aN=(b3-b1).magnitude;if aY>aN then aY=aN;aX=H.unit end end end;return aW:Dot(aX)*aY end;local function b4(C)local b5=O:Update(C,Z.Vel(C))local b6=P:Update(C,Z.Pan(C))local b7=Q:Update(C,Z.Fov(C))local b8=g(h(e(70/2))/h(e(N/2)))N=c(N+b7*u*C/b8,1,120)M=M+b6*t*C/b8;M=Vector2.new(c(M.x,-v,v),M.y%(2*a))local b9=CFrame.new(L)*CFrame.fromOrientation(M.x,M.y,0)*CFrame.new(b5*s*C)L=b9.p;p.CFrame=b9;p.Focus=b9*CFrame.new(0,0,-aO(b9))p.FieldOfView=N end;local ba={}do local bb;local bc;local bd;local be;local bf;local b9;local bg;local bh={}local bi={Backpack=true,Health=true,PlayerList=true}local bj={BadgesNotificationsActive=true,PointsNotificationsActive=true}function ba.Push()for bk in pairs(bi)do bi[bk]=l:GetCoreGuiEnabled(Enum.CoreGuiType[bk])l:SetCoreGuiEnabled(Enum.CoreGuiType[bk],false)end;for bk in pairs(bj)do bj[bk]=l:GetCore(bk)l:SetCore(bk,false)end;local bl=o:FindFirstChildOfClass("PlayerGui")if bl then for bm,bn in pairs(bl:GetChildren())do if bn:IsA("ScreenGui")and bn.Enabled then bh[#bh+1]=bn;bn.Enabled=false end end end;bg=p.FieldOfView;p.FieldOfView=70;be=p.CameraType;p.CameraType=Enum.CameraType.Custom;bd=p.CameraSubject;p.CameraSubject=nil;b9=p.CFrame;bf=p.Focus;bb=m.MouseIconEnabled;m.MouseIconEnabled=false;bc=m.MouseBehavior;m.MouseBehavior=Enum.MouseBehavior.Default end;function ba.Pop()for bk,bo in pairs(bi)do l:SetCoreGuiEnabled(Enum.CoreGuiType[bk],bo)end;for bk,bo in pairs(bj)do l:SetCore(bk,bo)end;for bm,bn in pairs(bh)do if bn.Parent then bn.Enabled=true end end;bh={}p.FieldOfView=bg;bg=nil;p.CameraType=be;be=nil;p.CameraSubject=bd;bd=nil;p.CFrame=b9;b9=nil;p.Focus=bf;bf=nil;m.MouseIconEnabled=bb;bb=nil;m.MouseBehavior=bc;bc=nil end end;local function bp()local b9=p.CFrame;M=Vector2.new(b9:ToEulerAnglesYXZ())L=b9.p;N=p.FieldOfView;O:Reset(Vector3.new())P:Reset(Vector2.new())Q:Reset(0)ba.Push()k:BindToRenderStep("Freecam",Enum.RenderPriority.Camera.Value,b4)Z.StartCapture()end;local function bq()Z.StopCapture()k:UnbindFromRenderStep("Freecam")ba.Pop()end;local br=false;local function bs()if br then bq()br=false else if R==nil then S(function()bp()br=true end)else bp()br=true end end end;o.Chatted:Connect(function(bt)if bt==".."then bs()end end)

Ratings & Reviews

No reviews yet. Be the first to review this script!

Comments (0)

Please login to comment

Login with Discord

Loading comments...