Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Camera0 = Instance.new("Camera")
- LocalScript1 = Instance.new("LocalScript")
- Camera0.Parent = mas
- Camera0.CFrame = CFrame.new(37.9769249, 30.075201, 19.3000088, -0.565168023, -0.426261216, 0.706319034, -0, 0.856169343, 0.51669544, -0.824975789, 0.292019755, -0.483879536)
- Camera0.CoordinateFrame = CFrame.new(37.9769249, 30.075201, 19.3000088, -0.565168023, -0.426261216, 0.706319034, -0, 0.856169343, 0.51669544, -0.824975789, 0.292019755, -0.483879536)
- Camera0.Focus = CFrame.new(36.5642853, 29.0418091, 20.2677689, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Camera0.focus = CFrame.new(36.5642853, 29.0418091, 20.2677689, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- LocalScript1.Name = "amera"
- LocalScript1.Parent = mas
- table.insert(cors,sandbox(LocalScript1,function()
- local v1 = Instance.new("Part", script.Parent);
- v1.Name = "am";
- v1.Size = Vector3.new(0.1, 0.1, 0.1);
- v1.CanCollide = false;
- v1.Transparency = 1;
- v1.Position = game:GetService("Players").LocalPlayer.Character.Head.Position;
- local v2 = Instance.new("BodyPosition", v1);
- v2.P = 50000;
- v2.MaxForce = Vector3.new(500000, 500000, 500000);
- workspace.CurrentCamera.CameraSubject = v1;
- local u1 = game:GetService("Players").LocalPlayer.Character;
- local u2 = 0;
- local function u3(p1, p2)
- local v3 = Instance.new("Model");
- Instance.new("Part", v3).Position = p1;
- Instance.new("Part", v3).Position = p2;
- game:GetService("Debris"):AddItem(v3, 0.1);
- return v3:GetBoundingBox().p;
- end;
- game:GetService("RunService").Heartbeat:Connect(function()
- u1 = game:GetService("Players").LocalPlayer.Character;
- workspace.CurrentCamera.CameraSubject = v1;
- if u1.Humanoid:GetState() ~= Enum.HumanoidStateType.Freefall or u1.HumanoidRootPart.Anchored == true then
- v2.Position = u1.Head.Position;
- u2 = u1.Head.Position.Y;
- return;
- end;
- v2.Position = u3(Vector3.new(u1.Head.Position.X, u2, u1.Head.Position.Z), u1.Head.Position);
- if select(2, workspace.CurrentCamera:WorldToViewportPoint(u1.Head.Position)) == false then
- u2 = u1.Head.Position.Y;
- end;
- end);
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment