Advertisement
KCROL_AdminLeaks

Chalkboard Script

Jan 2nd, 2018
551
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.16 KB | None | 0 0
  1. local plr = game:GetService("Players").LocalPlayer
  2. local m = plr:GetMouse()
  3.  
  4. local c = Instance.new('Tool',plr.Backpack)
  5. c.Name = "Chalkboard"
  6.  
  7. local h = Instance.new('Part',c)
  8. h.Name = "Handle"
  9. h.BrickColor = BrickColor.new('Really black')
  10. h.Material = "Granite"
  11. h.Size = Vector3.new(5,5,0.2)
  12.  
  13. local sg = Instance.new('SurfaceGui',h)
  14. local tl = Instance.new('TextLabel',sg)
  15. tl.TextScaled = true
  16. tl.BackgroundTransparency = 1
  17. tl.Size = UDim2.new(1,0,1,0)
  18. tl.Font = "Cartoon"
  19. tl.TextColor3 = Color3.new(255,255,255)
  20.  
  21. -- Objects
  22.  
  23. -- All of this was converted using GUI to Script Plugin
  24.  
  25. local TextSet = Instance.new("ScreenGui")
  26. local TextFrame = Instance.new("Frame")
  27. local Heading = Instance.new("TextLabel")
  28. local TextToSet = Instance.new("TextBox")
  29.  
  30. -- Properties
  31.  
  32. TextSet.Name = "TextSet"
  33. TextSet.Parent = c
  34.  
  35. TextFrame.Name = "TextFrame"
  36. TextFrame.Parent = TextSet
  37. TextFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  38. TextFrame.BorderColor3 = Color3.new(0.854902, 0.854902, 0.854902)
  39. TextFrame.BorderSizePixel = 7
  40. TextFrame.Position = UDim2.new(0.5, 250, 0.5, -125)
  41. TextFrame.Size = UDim2.new(0, 230, 0, 250)
  42.  
  43. Heading.Name = "Heading"
  44. Heading.Parent = TextFrame
  45. Heading.BackgroundColor3 = Color3.new(1, 1, 1)
  46. Heading.BackgroundTransparency = 1
  47. Heading.Size = UDim2.new(0, 230, 0, 50)
  48. Heading.Font = Enum.Font.SourceSansLight
  49. Heading.Text = "CHALKBOARD TEXT"
  50. Heading.TextSize = 30
  51.  
  52. TextToSet.Name = "TextToSet"
  53. TextToSet.Parent = TextFrame
  54. TextToSet.BackgroundColor3 = Color3.new(1, 1, 1)
  55. TextToSet.BackgroundTransparency = 1
  56. TextToSet.Position = UDim2.new(0, 0, 0, 100)
  57. TextToSet.Size = UDim2.new(0, 230, 0, 100)
  58. TextToSet.Font = Enum.Font.SourceSansLight
  59. TextToSet.PlaceholderText = "Insert text here"
  60. TextToSet.TextScaled = true
  61. TextToSet.TextSize = 14
  62. TextToSet.TextWrapped = true
  63.  
  64. c.Equipped:connect(function()
  65.     local X = TextSet:Clone()
  66.     X.Parent = plr.PlayerGui
  67.    
  68.     while true do
  69.         wait(0.001)
  70.         if plr.PlayerGui:FindFirstChild("TextSet") then
  71.             tl.Text = X.TextFrame.TextToSet.Text
  72.         end
  73.     end
  74. end)
  75.  
  76. c.Unequipped:connect(function()
  77.     if plr.PlayerGui:FindFirstChild("TextSet") then
  78.         plr.PlayerGui.TextSet:Destroy()
  79.     end
  80. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement