Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Camera = workspace.CurrentCamera
- local Current = 1
- local play = script.Parent.Play
- local Store = script.Parent.Store
- local Exit = script.Parent.Exit
- local Runservice = game:GetService("RunService")
- local Cameras = workspace.Cameras
- local Mouse = game.Players.LocalPlayer:GetMouse()
- local Move = 150
- local player = game.Players.LocalPlayer
- local function updateCamera()
- local Centre = Cameras[Current].CFrame
- local MoveVector = Vector3.new((Mouse.X - Centre.X) / Move, (Mouse.Y - Centre.Y) / Move, 0)
- Camera.CFrame = Cameras[Current].CFrame * CFrame.Angles(math.rad(-(Mouse.Y - Centre.Y) / Move), math.rad(-(Mouse.X - Centre.X) / Move), 0)
- end
- play.MouseEnter:Connect(function()
- Current = 1
- end)
- Store.MouseEnter:Connect(function()
- Current = 2
- end)
- Exit.MouseEnter:Connect(function()
- Current = 3
- end)
- play.MouseButton1Click:Connect(function()
- script.Parent:Destroy()
- end)
- Exit.MouseButton1Click:Connect(function()
- player:Kick("You Exited The Game")
- end)
- Runservice.RenderStepped:Connect(updateCamera)
Advertisement
Add Comment
Please, Sign In to add comment