Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.     Just follow along the comments and don't touch anything without the '[x]',
  3.         otherwise, just edit to your liking.
  4.        
  5.     Oh yea, the "Values" should be a free model modulescript named "MainModule" for
  6.         it to work
  7.    
  8.     Works like this:
  9.         "/pic 3" makes a picture with scale 3
  10.         "/pic 3.1415 makes a pictuer wit 3.1415"   
  11.        
  12.         Have fun
  13.         --"cxcharlie/jeff"
  14. ]]--
  15.  
  16. local Height = 100 --[x]images should be 100x100 or it will look funny
  17. local Width = 100--[x]
  18. local scale = 2--[x]
  19.  
  20. local StarterCFrame = CFrame.new(30,5,0) -- [x]where it is default
  21. --[x]The O_[?] is how much the billboard can randomly be offset by
  22. local O_x = 10--[x]
  23. local O_y = 0--[x]
  24. local O_z = 10--[x]
  25.  
  26. O_x = math.random(-O_x,O_x)
  27. O_y = math.random(-O_y,O_y)
  28. O_z = math.random(-O_z,O_z)
  29.  
  30. local Chattables = {'player1','yourname','addstuf'}--[x]just make it your name all lowercased
  31. local KeyWords = {'/pic','/picture'} --[x] words to make picture
  32. local Values = require(188722596) --[x] adjust as needed
  33.  
  34. ------------------
  35.  
  36. --local RotationConstant = math.rad(10) -- Amount rotated every step
  37. local RS = game:GetService('RunService')
  38.  
  39. local Pictures = {}
  40.  
  41. local A = {}
  42.  
  43. function In_Table(t,v)
  44.     for _,val in pairs(t) do if val == t then return true end end
  45.     return false
  46. end
  47.  
  48. function Match(t,s)
  49.     for _,v in pairs(t) do
  50.         if string.sub(s,1,string.len(v)):lower() == v:lower() then
  51.             print'k'
  52.             return true
  53.         end
  54.     end
  55.     return false
  56. end
  57.  
  58. function HandleChat(s)
  59.     if Match(KeyWords,s) then
  60.     local number = s:match("[%d%.]+") or scale
  61.     A.Create(number)
  62.     end
  63. end
  64.  
  65. game:GetService('Players').PlayerAdded:connect(function(p)
  66.     if In_Table(Chattables,p.Name:lower()) then
  67.         p.Chat:Connect(function(c)HandleChat(c)end)
  68.     end
  69. end)
  70.  
  71. for _,v in pairs(game:GetService('Players'):GetPlayers()) do
  72.     if In_Table(Chattables,v.Name:lower()) then
  73.         v.Chat:Connect(function(c)HandleChat(c)end)
  74.     end
  75. end
  76.  
  77. A.Create = function(scale)
  78. local p = Instance.new("Part",workspace)
  79. p.CFrame = StarterCFrame * CFrame.new(O_x,O_y,O_z)
  80. p.Anchored = true
  81. p.Transparency = 1
  82. p.CanCollide = false
  83. local m = Instance.new("BillboardGui")
  84. m.Parent = p
  85. m.Adornee = p
  86. m.Size = UDim2.new(0,Width*scale,0,Height*scale)
  87. m.AlwaysOnTop = true
  88. local masterFrame = Instance.new('Frame',m)
  89. masterFrame.Size = UDim2.new(1,0,1,0)
  90. masterFrame.BackgroundTransparency = 1
  91. i = 0
  92. for x=1,Height do
  93. for y=1,Width do
  94. i=i+1
  95. b = Instance.new("Frame") --- less laggy o3o
  96. b.Size = UDim2.new(0,scale,0,scale)
  97. coroutine.resume(coroutine.create(function()
  98. b.Position = UDim2.new(0,x*scale,0,y*scale) --- pixel movement o3o
  99. b.Parent = masterFrame
  100. b.BorderSizePixel = 0
  101. b.BackgroundColor3 = Color3.new(Values[i][2]/255,Values[i][3]/255,Values[i][4]/255)
  102. --b.Transparency = (Values[i][1]-255)/255 -- if you want transparency (not sure if accurate)
  103. end))
  104. end
  105. wait(0.04)
  106. table.insert(Pictures,p)
  107. end
  108. end
  109.  
  110.  
  111.  
  112. --I removed the below because it was too lggy
  113. --coroutine.wrap(function()
  114.     --[[while wait(5) do
  115.         print(type(Pictures))
  116.     for _,v in next, Pictures do
  117.         local s = ypcall(function()v.Name = v.Name;end)
  118.         if not s then
  119.             table.remove(Pictures,_)
  120.             print'huh'
  121.         else
  122.             v.BillboardGui.Frame.Rotation = v.BillboardGui.Frame.Rotation + RotationConstant
  123.         end
  124.     end
  125.     end
  126. ]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement