Advertisement
ERROR_CODE

Free cam

Nov 19th, 2023 (edited)
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.54 KB | None | 0 0
  1. local ScreenGui = Instance.new("ScreenGui")
  2. local Character = game.Players.LocalPlayer.Character
  3. local Camera = workspace.CurrentCamera
  4. local ForwardButton = Instance.new("ImageButton")
  5. local ForwardButtonUICorner = Instance.new("UICorner")
  6. local BackwardButton = Instance.new("ImageButton")
  7. local BackwardButtonUICorner = Instance.new("UICorner")
  8. local RightButton = Instance.new("ImageButton")
  9. local RightButtonUICorner = Instance.new("UICorner")
  10. local LeftButton = Instance.new("ImageButton")
  11. local LeftButtonUICorner = Instance.new("UICorner")
  12. local KillGuiButton = Instance.new("ImageButton")
  13. local KillGuiButtonUICorner = Instance.new("UICorner")
  14.  
  15. ScreenGui.Parent = game.CoreGui
  16.  
  17. local PartCamera = Instance.new("Part")
  18. PartCamera.Parent = workspace
  19. PartCamera.Anchored = true
  20. PartCamera.Size = Vector3.new(1, 1, 1)
  21. PartCamera.CanCollide = false
  22. PartCamera.Position = Vector3.new(0, 0, 0)
  23. PartCamera.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(Vector3.new(0, -2.5, 10))
  24. PartCamera.Transparency = 1
  25.  
  26. Camera.CameraSubject = PartCamera
  27.  
  28.  
  29. brick = PartCamera
  30.  
  31. moveX = 0
  32. moveY = 0
  33. moveZ = 0
  34.  
  35. KillGuiButton.Name = "KillGuiButton"
  36. KillGuiButton.Parent = ScreenGui
  37. KillGuiButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  38. KillGuiButton.Position = UDim2.new(0.2, 0, 0.4, 0)
  39. KillGuiButton.Size = UDim2.new(0, 55, 0, 55)
  40. KillGuiButton.Image = "rbxassetid://15294456972"
  41. KillGuiButton.Transparency = 0
  42. KillGuiButton.MouseButton1Down:connect(function()
  43. Camera.CameraSubject = Character
  44. ScreenGui:Destroy()
  45. end)
  46.  
  47. KillGuiButtonUICorner.Parent = KillGuiButton
  48.  
  49. ForwardButton.Name = "ForwardButton"
  50. ForwardButton.Parent = ScreenGui
  51. ForwardButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  52. ForwardButton.Position = UDim2.new(0.2, 0, 0.2, 0)
  53. ForwardButton.Size = UDim2.new(0, 55, 0, 55)
  54. ForwardButton.Image = "rbxassetid://15294461446"
  55. ForwardButton.Transparency = 0
  56. ForwardButton.MouseButton1Down:connect(function()
  57. moveZ = moveZ + 0.5
  58. brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ)
  59. end)
  60.  
  61. ForwardButtonUICorner.Parent = ForwardButton
  62.  
  63. BackwardButton.Name = "BackwardButton"
  64. BackwardButton.Parent = ScreenGui
  65. BackwardButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  66. BackwardButton.Position = UDim2.new(0.2, 0, 0.6, 0)
  67. BackwardButton.Size = UDim2.new(0, 55, 0, 55)
  68. BackwardButton.Image = "rbxassetid://15294460178"
  69. BackwardButton.Transparency = 0
  70. BackwardButton.MouseButton1Down:connect(function()
  71. moveZ = moveZ + 0.5
  72. brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ)
  73. end)
  74.  
  75. BackwardButtonUICorner.Parent = BackwardButton
  76.  
  77.  
  78. LeftButton.Name = "LeftButton"
  79. LeftButton.Parent = ScreenGui
  80. LeftButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  81. LeftButton.Position = UDim2.new(0.1, 0, 0.4, 0)
  82. LeftButton.Size = UDim2.new(0, 55, 0, 55)
  83. LeftButton.Image = "rbxassetid://15294457932"
  84. LeftButton.Transparency = 0
  85. LeftButton.MouseButton1Down:connect(function()
  86. moveX = moveX + 0.5
  87. brick.CFrame = brick.CFrame - Vector3.new (moveX, moveY, moveZ)
  88. end)
  89.  
  90. LeftButtonUICorner.Parent = LeftButton
  91.  
  92. RightButton.Name = "RightButton"
  93. RightButton.Parent = ScreenGui
  94. RightButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  95. RightButton.Position = UDim2.new(0.3, 0, 0.4, 0)
  96. RightButton.Size = UDim2.new(0, 55, 0, 55)
  97. RightButton.Image = "rbxassetid://15294459137"
  98. RightButton.Transparency = 0
  99. RightButton.MouseButton1Down:connect(function()
  100. moveX = moveX + 0.5
  101. brick.CFrame = brick.CFrame + Vector3.new (moveX, moveY, moveZ)
  102. end)
  103.  
  104. RightButtonUICorner.Parent = RightButton
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement