autodraw less laggy
Key Required

autodraw less laggy

Color by number trollartrollar 6.4K views 29 executesUpdated May 8, 2022
5.0/ 5(4 votes)
40100% Positive
Lua Script•50 lines (1594 chars)
--[[
	Autodraw for Color by number (8137333410)
	made by Perception#7960
]]

local Players = game:GetService("Players")
local Player = Players.LocalPlayer

local Map = workspace.Map
assert(Map, "Could not find the Map in workspace")
local Blocks = Map.Blocks
assert(Blocks, "Could not find Blocks in the Map")
local plrBlock

for _,v in pairs (Blocks:GetChildren()) do
	local Block = v
	if v:FindFirstChildWhichIsA("SpawnLocation") then
		v = v:FindFirstChildWhichIsA("SpawnLocation")
		if v:FindFirstChild("OwnerFace") and v:FindFirstChild("OwnerFace"):IsA("BasePart") then
			local OwnerFace = v:FindFirstChild("OwnerFace")
			if OwnerFace:FindFirstChildWhichIsA("SurfaceGui") then
				local SurfaceGui = OwnerFace:FindFirstChildWhichIsA("SurfaceGui")
				if SurfaceGui:FindFirstChildWhichIsA("ImageLabel") then
					local ImageLabel = SurfaceGui:FindFirstChildWhichIsA("ImageLabel")
					local Image = ImageLabel.Image
					local UserId = string.split(string.split(Image, '&')[2], '=')[2]
					if tonumber(UserId) == Player.UserId then
						plrBlock = Block
					end
				end
			end
		end
	end
end

local Draw = plrBlock.Draw
local remote = game:GetService("ReplicatedStorage").Knit.Services.PixelGeneratorService.RF.DrawPixel

for _, v in pairs(Draw:GetChildren()) do
	if v:FindFirstChildWhichIsA("Decal") then
		local Texture = v:FindFirstChildWhichIsA("Decal")
		if v.Name == 'Part' and Texture.Transparency == 0.75 or Texture.Transparency == 0 then
			task.spawn(function()
				task.wait(math.random(0,30))
				Texture.Transparency = 0.1
				remote:InvokeServer(v)
			end)
		end
	end
end

Features & Information

Autodraws your current drawing in color by number

Community Comments (1)

ChenChenMay 8, 2022(edited)

Is it possible to add an anti kick protection, to draw bigger pictures?

More Scripts for Color by number