Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Just follow along the comments and don't touch anything without the '[x]',
- otherwise, just edit to your liking.
- Oh yea, the "Values" should be a free model modulescript named "MainModule" for
- it to work
- Works like this:
- "/pic 3" makes a picture with scale 3
- "/pic 3.1415 makes a pictuer wit 3.1415"
- Have fun
- --"cxcharlie/jeff"
- --]]
- local Height = 100 --[x]images should be 100x100 or it will look funny
- local Width = 100--[x]
- local scale = 2--[x]
- local StarterCFrame = CFrame.new(30,5,0) -- [x]where it is default
- --[x]The O_[?] is how much the billboard can randomly be offset by
- local O_x = 10--[x]
- local O_y = 0--[x]
- local O_z = 10--[x]
- O_x = math.random(-O_x,O_x)
- O_y = math.random(-O_y,O_y)
- O_z = math.random(-O_z,O_z)
- local Chattables = {'player1','yourname','addstuf'}--[x]just make it your name all lowercased
- local KeyWords = {'/pic','/picture'} --[x] words to make picture
- local Values = require(188722596) --[x] adjust as needed
- ------------------
- --local RotationConstant = math.rad(10) -- Amount rotated every step
- local RS = game:GetService('RunService')
- local Pictures = {}
- --coroutine.wrap(function()
- --[[RS.Stepped:connect(function()
- for _,v in next (Pictures) do
- local s = ypcall(function()v.Name = v.Name;end)
- if not s then
- table.remove(Pictures,_)
- else
- ypcall(function()v.BillboardGui.Frame.Rotation = v.BillboardGui.Frame.Rotation + RotationConstant;end)
- end
- end
- end)]]--
- --end)()
- local A = {}
- function In_Table(t,v)
- for _,val in pairs(t) do if val == t then return true end end
- return false
- end
- function Match(t,s)
- for _,v in pairs(t) do
- if string.sub(s,1,string.len(v)):lower() == v:lower() then
- print'k'
- return true
- end
- end
- return false
- end
- function HandleChat(s)
- if Match(KeyWords,s) then
- local number = s:match("[%d%.]+") or scale
- A.Create(number)
- end
- end
- game:GetService('Players').PlayerAdded:connect(function(p)
- if In_Table(Chattables,p.Name:lower()) then
- p.Chat:Connect(function(c)HandleChat(c)end)
- end
- end)
- for _,v in pairs(game:GetService('Players'):GetPlayers()) do
- if In_Table(Chattables,v.Name:lower()) then
- v.Chat:Connect(function(c)HandleChat(c)end)
- end
- end
- A.Create = function(scale)
- local p = Instance.new("Part",workspace)
- p.CFrame = StarterCFrame * CFrame.new(O_x,O_y,O_z)
- p.Anchored = true
- p.Transparency = 1
- p.CanCollide = false
- local m = Instance.new("BillboardGui")
- m.Parent = p
- m.Adornee = p
- m.Size = UDim2.new(0,Width*scale,0,Height*scale)
- m.AlwaysOnTop = true
- local masterFrame = Instance.new('Frame',m)
- masterFrame.Size = UDim2.new(1,0,1,0)
- masterFrame.BackgroundTransparency = 1
- i = 0
- for x=1,Height do
- for y=1,Width do
- i=i+1
- b = Instance.new("Frame") --- less laggy o3o
- b.Size = UDim2.new(0,scale,0,scale)
- coroutine.resume(coroutine.create(function()
- b.Position = UDim2.new(0,x*scale,0,y*scale) --- pixel movement o3o
- b.Parent = masterFrame
- b.BorderSizePixel = 0
- b.BackgroundColor3 = Color3.new(Values[i][2]/255,Values[i][3]/255,Values[i][4]/255)
- --b.Transparency = (Values[i][1]-255)/255 -- if you want transparency (not sure if accurate)
- end))
- end
- wait(0.04)
- table.insert(Pictures,p)
- end
- end
- --I removed the below because it was too lggy
- --coroutine.wrap(function()
- --[[while wait(5) do
- print(type(Pictures))
- for _,v in next, Pictures do
- local s = ypcall(function()v.Name = v.Name;end)
- if not s then
- table.remove(Pictures,_)
- print'huh'
- else
- v.BillboardGui.Frame.Rotation = v.BillboardGui.Frame.Rotation + RotationConstant
- end
- end
- end
- ]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement