Upscalefanatic3

UnderchatFrame no idea what its for...

Jun 25th, 2019
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.08 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local me = Players.LocalPlayer
  3.  
  4. function CreateChatBox(Player)
  5.     repeat wait() until Player.PlayerGui
  6.     repeat wait() until Player.Character
  7.    
  8.     local UnderChat = Instance.new("ScreenGui", Player.PlayerGui)
  9.     UnderChat.Name = "UnderChat"
  10.     local Character = Player:FindFirstChild("Character")
  11.     local Head = Character:FindFirstChild("Head")
  12.        
  13.     local UnderChatFrame = Instance.new("Frame", UnderChat)
  14.     UnderChatFrame.Size = UDim2.new(0, 902,0, 138)
  15.     UnderChatFrame.BorderColor3 = Color3.new(255,255,255)
  16.     UnderChatFrame.BackgroundColor3 = Color3.new(0,0,0)
  17.     UnderChatFrame.BorderSizePixel = 5
  18.     UnderChatFrame.Position = UDim2.new(0.394, 0,0.771, 0)
  19.     UnderChatFrame.Visible = true
  20.    
  21.     local ViewportFrame = Instance.new("ViewportFrame", UnderChatFrame)
  22.     ViewportFrame.Size = UDim2.new(0, 135,0, 138)
  23.    
  24.     local ViewportCamera = Instance.new("Camera", ViewportFrame)
  25.     ViewportFrame.CurrentCamera = ViewportCamera
  26.    
  27.     local offset = Vector3.new(0, 0, -3)
  28.     ViewportCamera.CFrame = CFrame.new(Head.CFrame * offset, Head.Position)
  29.    
  30. end
  31. CreateChatBox(me)
Add Comment
Please, Sign In to add comment