Advertisement
Descaii

Letter draw

Aug 30th, 2014
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.44 KB | None | 0 0
  1. -- Letter drawer --
  2. Player = game.Players.LocalPlayer
  3. Mouse = Player:GetMouse()
  4. PlayerGui = Player:WaitForChild("PlayerGui")
  5. Screen = Instance.new("ScreenGui",PlayerGui)
  6. Screen.Name = "Letter Draw"
  7. letters = {
  8.     H = {
  9.         [1]={1,0,0,0,0,0,1};
  10.         [2]={1,0,0,0,0,0,1};
  11.         [3]={1,0,0,0,0,0,1};
  12.         [4]={1,1,1,1,1,1,1};
  13.         [5]={1,0,0,0,0,0,1};
  14.         [6]={1,0,0,0,0,0,1};
  15.         [7]={1,0,0,0,0,0,1};
  16.     }}
  17. local Box = Instance.new("Frame",Screen)
  18. Box.Position = UDim2.new(0.5,0,0.5,0)
  19. Size = 7
  20. PSize = 12
  21. LastPos = UDim2.new(0,0,0,0)
  22. Box.Size = UDim2.new(0,PSize*Size,0,PSize*Size)
  23. Box.Position = UDim2.new(0.5,-(PSize*Size/2),0.5,-(PSize*Size/2))
  24. Pixels = {}
  25. for x = 0,Size-1 do
  26.     for y = 0,Size-1 do
  27.         local Pixel = Instance.new("Frame",Box)
  28.         Pixel.BackgroundColor3 = Color3.new(1,1,1)
  29.         Pixel.Size = UDim2.new(0,PSize,0,PSize)
  30.         Pixel.Position = UDim2.new(0,x*PSize,0,y*PSize)
  31.         Pixel.BorderSizePixel = 0
  32.         table.insert(Pixels,{x=x+1,y=y+1,Pixel=Pixel})
  33.     end
  34. end
  35. MD = false
  36. Mouse.Button1Down:connect(function()
  37.     MD = true
  38.     LastPos = UDim2.new(0,0,0,0)
  39.     while MD and wait() do
  40.         for i,v in pairs(Pixels) do
  41.             if Mouse.X > v.Pixel.AbsolutePosition.X and Mouse.Y > v.Pixel.AbsolutePosition.Y and Mouse.X < v.Pixel.AbsolutePosition.X+v.Pixel.AbsoluteSize.X and Mouse.Y < v.Pixel.AbsolutePosition.Y+v.Pixel.AbsoluteSize.Y then
  42.                 v.Pixel.BackgroundColor3 = Color3.new(0,0,0)
  43.             end
  44.         end
  45.     end
  46. end)
  47. Mouse.Button1Up:connect(function() MD = false end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement