This repository was archived by the owner on Aug 25, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathspraypi.lua
More file actions
62 lines (52 loc) · 2.13 KB
/
Copy pathspraypi.lua
File metadata and controls
62 lines (52 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
--[[
SprayPI is an API for the Roblox game "Spray Paint".
This API will let you interact with the game.
]]
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local SprayPI = {}
-- Spray Paint protects its remotes using a random value between 300K and 400K.
-- Using this value, we can bypass those protections and send info to the server.
local protBypass = tick() / 300
-- Vote() will vote on a current running votekick.
function SprayPI.Vote(val:boolean)
ReplicatedStorage.VoteKick:FireServer("Vote", val)
end
-- InitiateVote() will create a votekick on a player with whatever text.
-- I think this also bypasses the char limit on votekicking.
function SprayPI.InitiateVotekick(player:Instance, text:string)
ReplicatedStorage.VoteKick:FireServer("Initiate", player, text)
end
-- Spray() will start spraying whereever SendPaintInfo() requests.
function SprayPI.Spray(color:Color3)
ReplicatedStorage.SprayEffect:FireServer(true, color)
end
-- StopSpraying() will stop Spray() from running. (Spray runs until StopSpraying() is called)
function SprayPI.StopSpraying()
ReplicatedStorage.SprayEffect:FireServer(false)
end
--[[
In order to use SendPaintInfo, you need to list 4 arguments in a table. They are:
- Scale (this determines the spray size (from 0.2 to 2.2))
- CFrame (determines the position of the spray.)
- Color (takes a Color3 value for what color will be present)
- Layer (determines the layer in which)
Example:
local ToDraw = {
[1] = {
["scale"] = 0.4,
["cframe"] = CFrame.new(CFrame value here),
["color"] = Color3.new(1, 1, 1),
["layer"] = 1
}
}
library:SendPaintInfo(ToDraw)
]]
function SprayPI.SendPaintInfo(info)
if game:GetService("Players").LocalPlayer.Backpack:FindFirstChild("SprayPaint") then
game:GetService("Players").LocalPlayer.Backpack:WaitForChild("SprayPaint"):FindFirstChild("SendPaintInfo"):InvokeServer(protBypass, info)
else
game:GetService("Players").LocalPlayer.Character:WaitForChild("SprayPaint"):FindFirstChild("SendPaintInfo"):InvokeServer(protBypass, info)
end
end
return SprayPI