devvanss

[LUA] Main Menu Script

Apr 18th, 2019
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.65 KB | None | 0 0
  1. --// Client
  2.  
  3. local MainMenu = Instance.new("ScreenGui")
  4. local MainFrame = Instance.new("Frame")
  5. local Divider = Instance.new("TextLabel")
  6.  
  7. --// Properties
  8.  
  9. MainMenu.Name = "MainMenu"
  10. MainMenu.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  11. MainMenu.Enabled = false
  12. MainMenu.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  13.  
  14. MainFrame.Name = "MainFrame"
  15. MainFrame.Parent = MainMenu
  16. MainFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  17. MainFrame.BackgroundTransparency = 0.25
  18. MainFrame.BorderSizePixel = 0
  19. MainFrame.Size = UDim2.new(1, 100, 1, 100)
  20.  
  21. Divider.Name = "Divider"
  22. Divider.Parent = MainFrame
  23. Divider.BackgroundColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  24. Divider.BackgroundTransparency = 0.5
  25. Divider.Position = UDim2.new(0.194731399, 0, 0, 0)
  26. Divider.Size = UDim2.new(0, 4, 0, 1500)
  27. Divider.Font = Enum.Font.SourceSans
  28. Divider.Text = ""
  29. Divider.TextColor3 = Color3.new(0, 0, 0)
  30. Divider.TextSize = 14
  31.  
  32. --// Functions
  33.  
  34. function SCRIPT_IIIC69_FAKESCRIPT() -- MainMenu.MainScript
  35.     local script = Instance.new('LocalScript')
  36.     script.Parent = MainMenu
  37.    
  38.     local Player = game.Players.LocalPlayer
  39.     local Character = Player.Character
  40.    
  41.     local Camera = workspace.CurrentCamera
  42.    
  43.     --// CameraType
  44.    
  45.     repeat wait(0.1)
  46.    
  47.         Camera.CameraType = Enum.CameraType.Scriptable
  48.        
  49.     until Camera.CameraType == Enum.CameraType.Scriptable
  50.     Camera.CFrame = workspace.CView.CFrame
  51.    
  52.     --// Remove
  53.    
  54.     script.Parent.MainFrame.MainPanels.SpawnButton.MouseButton1Click:Connect(function()
  55.        
  56.         script.Parent.Enabled = false
  57.         Camera.CameraType = Enum.CameraType.Custom
  58.        
  59.     end)
  60.  
  61. end
  62. coroutine.resume(coroutine.create(SCRIPT_IIIC69_FAKESCRIPT))
Advertisement
Add Comment
Please, Sign In to add comment