View difference between Paste ID: FdbbLH2w and D6wnPGx8
SHOW: | | - or go back to the newest paste.
1
wait(1)
2
3
-- Get LocalPlayer
4-
local p = game.Players.LocalPlayer
4+
local p = game.Players.contentdeleted93726
5
6
-- Instance New Objects
7
local gui = Instance.new('ScreenGui',p.PlayerGui)
8
local frame = Instance.new('Frame',gui)
9
local open = Instance.new('TextButton',gui)
10
local bool = Instance.new('BoolValue',frame)
11
local button = Instance.new('TextButton',frame)
12
local name = Instance.new('TextLabel',frame)
13
local box = Instance.new('TextBox',frame)
14
local msg = Instance.new('StringValue',box)
15
local exit = Instance.new('TextButton',frame)
16
local spamon = Instance.new('TextButton',frame)
17
local spamoff = Instance.new('TextButton',frame)
18
local search = Instance.new('TextBox',frame)
19
local people = Instance.new('StringValue',frame)
20
21
-- Objects Name
22
gui.Name = "SpamGUI"
23
frame.Name = "SpawnFrame"
24
open.Name = "OpenButton"
25
bool.Name = "Bool"
26
button.Name = "Open/Close"
27
name.Name = "Title"
28
box.Name = "TextBox"
29
msg.Name = "Msg"
30
exit.Name = "ExitButton"
31
spamon.Name = "SpamON"
32
spamoff.Name = "SpamOFF"
33
search.Name = "SearchPeople"
34
people.Name = "Result"
35
36
-- Objects Position
37
frame.Position = UDim2.new(0.7,7,0,3)
38
open.Position = UDim2.new(0,-100,0.7,0)
39
button.Position = UDim2.new(0,170,0.7,13)
40
name.Position = UDim2.new(0,0,0,0)
41
box.Position = UDim2.new(0,0,0,45)
42
exit.Position = UDim2.new(0.8,30,0,0)
43
spamon.Position = UDim2.new(0,5,0.7,13)
44
spamoff.Position = UDim2.new(0,245,0.7,13)
45
search.Position = UDim2.new(0,0,0,200)
46
47
-- Object Size
48
frame.Size = UDim2.new(0,400,0,200)
49
open.Size = UDim2.new(0,100,0,40)
50
button.Size = UDim2.new(0,60,0,40)
51
name.Size = UDim2.new(0.8,25,0,40)
52
box.Size = UDim2.new(1,0,0,100)
53
exit.Size = UDim2.new(0,50,0,43)
54
spamon.Size = UDim2.new(0,150,0,40)
55
spamoff.Size = UDim2.new(0,150,0,40)
56
search.Size = UDim2.new(0,400,0,50)
57
58
-- Dragggable Frame
59
frame.Active = true
60
frame.Draggable = true
61
62
-- Objects Background Color
63
frame.BackgroundColor3 = Color3.new(0,0,0)
64
open.BackgroundColor3 = Color3.new(255, 255, 0)
65
button.BackgroundColor3 = Color3.new(255, 255, 255)
66
name.BackgroundColor3 = Color3.new(255, 255, 255)
67
box.BackgroundColor3 = Color3.new(255, 255, 255)
68
exit.BackgroundColor3 = Color3.new(255, 0, 0)
69
spamon.BackgroundColor3 = Color3.new(255, 0, 0)
70
spamoff.BackgroundColor3 = Color3.new(255, 0, 0)
71
search.BackgroundColor3 = Color3.new(255,255,255)
72
73
-- Object Background Transparency
74
frame.BackgroundTransparency = 0.5
75
box.BackgroundTransparency = 0.5
76
button.BackgroundTransparency = 0.6
77
name.BackgroundTransparency = 1
78
search.BackgroundTransparency = 0.6
79
80
-- Visible
81
open.Visible = false
82
search.Visible = false
83
84
-- Text Size/Scaled enabled
85
open.TextScaled = true
86
exit.TextScaled = true
87
spamon.TextScaled = true
88
spamoff.TextScaled = true
89
box.TextScaled = true
90
button.TextScaled = true
91
name.TextScaled = true
92
search.TextScaled = true
93
94
-- Box Line
95
box.ClearTextOnFocus = true
96
box.MultiLine = true
97
98
-- Text Color
99
name.TextColor3 = Color3.new(255,0,0)
100
101
-- Text
102
open.Text = "Open"
103
exit.Text = "Exit"
104
spamoff.Text = "Turn Off"
105
spamon.Text = "Turn On"
106
box.Text = "Message Here ....."
107
button.Text = "Close"
108
name.Text = "Unique's Spam GUI"
109
search.Text = "Search people"
110
111
-- Value
112
bool.Value = false
113
msg.Value = ""
114
people.Value = ""
115
116
-- Spam On
117
spamon.MouseButton1Down:connect(function()
118
bool.Value = true
119
msg.Value = box.Text
120
box.Text = "Success !"
121
search.Text = ""
122
wait(1)
123
box.Text = "Message Here ....."
124
end)
125
126
-- Spam Off
127
spamoff.MouseButton1Down:connect(function()
128
bool.Value = false
129
end)
130
131
-- Exit Function
132
exit.MouseButton1Down:connect(function()
133
frame:TweenPosition(UDim2.new(1,0,0,3),"Out","Quad",1,true)
134
wait(1)
135
frame.Visible = false
136
wait(.5)
137
open.Visible = true
138
open:TweenPosition(UDim2.new(0,5,0.7,0),"Out","Bounce",1,true)
139
end)
140
141
-- Open Function
142
open.MouseButton1Down:connect(function()
143
open:TweenPosition(UDim2.new(0,-100,0.7,0),"Out","Quad",1,true)
144
wait(1)
145
open.Visible = false
146
wait(.5)
147
frame.Visible = true
148
frame:TweenPosition(UDim2.new(0.7,7,0,3),"Out","Bounce",1,true)
149
end)
150
151
-- Search People Box
152
button.MouseButton1Down:connect(function()
153
if search.Visible == false then
154
button.Text = "Open"
155
search.Visible = true
156
else
157
button.Text = "Close"
158
search.Visible = false 
159
end
160
end)
161
162
-- Spam Function
163
while true do
164
wait(.1)
165
 if bool.Value == true then
166
local ppl = game.Players:FindFirstChild(people.Value)
167
if ppl then
168
game:GetService('Chat'):Chat(ppl.Character, msg.Value)
169
   elseif not ppl then
170
for i,v in pairs(game.Players:GetChildren()) do
171
game:GetService('Chat'):Chat(v.Character, msg.Value)
172
end
173
end
174
end
175
end