View difference between Paste ID: 4Q9NxR0M and S4LwDWaS
SHOW: | | - or go back to the newest paste.
1
local Graphics = {}
2
local Functions = Arsenic.Functions
3
4
local Local = Functions.Local
5
local Players = Functions.Players
6
local Server = Functions.Server
7
local Vehicles = Functions.Vehicles
8
local Particles = Functions.Particles
9
local Banishment = Functions.Banishment
10
local Weapons = Functions.Weapons
11
local Structures = Functions.Structures
12
local Cloning = Functions.Cloning
13
14
local Interface = game:GetObjects('rbxassetid://2814134877')[1]
15
16
for i,v in next, Interface:GetDescendants() do
17
    if v:IsA('LocalScript') then
18
        v:Destroy()
19
    elseif v:IsA('TextBox') then
20
        v.TextWrapped = true
21
    end
22
end
23
24
Graphics.Interface = Interface
25
Interface.Parent = game:GetService('CoreGui')
26
27
local Drag = Interface.Drag
28
local CommandFrame = Interface.DragC
29
Drag:TweenPosition(UDim2.new(0.5, -250, 0.5, 125), 'Out', 'Quad', 0.5)
30
31
local Body = Drag.Body
32
local Selector = Body.Selector
33
local Tabs = Body.Tabs
34
35
local Open = Drag.Open
36
local OpenLabel = Drag.OpenLabel
37
local Collapse = Body.Collapse
38
local CloseLabel = Drag.CloseLabel
39
40
local Dragging, DragInput, DragStart, StartPosition
41
Drag.InputBegan:Connect(function(input)
42
    if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
43
        Dragging = true
44
        DragStart = input.Position
45
        StartPosition = Drag.Position
46
47
        input.Changed:Connect(function()
48
            if input.UserInputState == Enum.UserInputState.End then 
49
                Dragging = false 
50
            end
51
        end)
52
    end
53
end)
54
55
Drag.InputChanged:Connect(function(input)
56
    if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then DragInput = input end
57
end)
58
59
local cDragging, cDragInput, cDragStart, cStartPosition
60
CommandFrame.InputBegan:Connect(function(input)
61
    if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
62
        cDragging = true
63
        cDragStart = input.Position
64
        cStartPosition = CommandFrame.Position
65
66
        input.Changed:Connect(function()
67
            if input.UserInputState == Enum.UserInputState.End then 
68
                cDragging = false 
69
            end
70
        end)
71
    end
72
end)
73
74
CommandFrame.InputChanged:Connect(function(input)
75
    if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then 
76
        cDragInput = input 
77
    end
78
end)
79
80
game:GetService('UserInputService').InputChanged:Connect(function(input)
81
    if input == DragInput and Dragging then 
82
        local Delta = input.Position - DragStart
83
        Drag.Position = UDim2.new(StartPosition.X.Scale, StartPosition.X.Offset + Delta.X, StartPosition.Y.Scale, StartPosition.Y.Offset + Delta.Y)
84
    elseif input == cDragInput and cDragging then
85
        local Delta = input.Position - cDragStart
86
        CommandFrame.Position = UDim2.new(cStartPosition.X.Scale, cStartPosition.X.Offset + Delta.X, cStartPosition.Y.Scale, cStartPosition.Y.Offset + Delta.Y) 
87
    end
88
end)
89
90
CommandFrame.Body.Toggle.MouseButton1Click:Connect(function()
91
    CommandFrame.Visible = false
92
end)
93
94
local Closed = false
95
Collapse.MouseButton1Click:Connect(function()
96
    if not Closed then
97
        Body.BorderSizePixel = 0
98
        Body:TweenSize(UDim2.new(1, 0, 0, 0), 'In', 'Quad', 0.25)
99
        Closed = true
100
        wait(0.25)
101
        OpenLabel:TweenSize(UDim2.new(1, 0, 0, 0), 'In', 'Quad', 0.15)
102
		CloseLabel:TweenSize(UDim2.new(1, 0, 1, 0), 'Out', 'Quad', 0.15)
103
		Open:TweenSize(UDim2.new(0, 25, 0, 25), 'Out', 'Quad', 0.15)
104
    end
105
end)
106
107
Open.MouseButton1Click:Connect(function()
108
	if Closed then
109
		Open:TweenSize(UDim2.new(0, 25, 0, 0), 'In', 'Quad', 0.15)
110
		wait(0.15)
111
		Body.BorderSizePixel = 1
112
		Body:TweenSize(UDim2.new(1, 0, 0, -250), 'Out', 'Quad', 0.25)
113
		OpenLabel:TweenSize(UDim2.new(1, 0, 1, 0), 'Out', 'Quad', 0.15)
114
		CloseLabel:TweenSize(UDim2.new(1, 0, 0, 0), 'In', 'Quad', 0.15)
115
		Closed = false
116
	end
117
end)
118
119
for i,v in next, Selector:GetChildren() do
120
    if v:IsA('TextButton') then
121
        v.MouseEnter:Connect(function()
122
            if not v.Selected then
123
                local pos = v.Position
124
                v.Position = UDim2.new(0, 10, 0, pos.Y.Offset)
125
            end
126
        end)
127
128
        v.MouseLeave:Connect(function()
129
            if not v.Selected then
130
                local pos = v.Position
131
                v.Position = UDim2.new(0, 5, 0, pos.Y.Offset)
132
            end
133
        end)
134
135
        v.MouseButton1Click:Connect(function()
136
            for k,x in next, Tabs:GetChildren() do
137
                if x.Name ~= v.Name and x.Visible then
138
                    local Select = Selector[x.Name]
139
                    x.Visible = false
140
                    Select.Selected = false
141
                    Select.Position = UDim2.new(0, 5, 0, Select.Position.Y.Offset)
142
                    Select.BackgroundColor3 = Color3.fromRGB(210, 100, 101)
143
					Select.BorderColor3 = Color3.fromRGB(145, 69, 70)
144
                end
145
            end
146
147
            v.Selected = true
148
            Tabs[v.Name].Visible = true
149
            v.BackgroundColor3 = Color3.fromRGB(100, 210, 101)
150
			v.BorderColor3 = Color3.fromRGB(69, 145, 70)
151
        end)
152
    end
153
end
154
155
for i,v in next, Tabs:GetDescendants() do
156
    if v:IsA('TextButton') and v.Size == UDim2.new(0, 25, 0, 25) then
157
        v.MouseButton1Click:Connect(function()
158
            if v.Text == '✓' then
159
                v.Label.Font = 'SourceSansSemibold'
160
                v.Text = ''
161
            else
162
                v.Label.Font = 'SourceSansBold'
163
                v.Text = '✓'
164
            end
165
        end)
166
    end
167
end
168
169
local Console = Tabs.Console
170
local Output = Console.Back.Output
171
local PodSource = Output.Pod:Clone()
172
PodSource.Message.TextYAlignment = 'Top'
173
Output.CanvasSize = UDim2.new(0, 0, 0, 20)
174
175
function Graphics.Write(content)
176
    local Pod = PodSource:Clone()
177
    Pod.Parent = Output
178
    Pod.Message.Text = content
179
180
    if Pod.Message.TextFits then
181
        Output.CanvasSize = Output.CanvasSize + UDim2.new(0, 0, 0, 20)
182
    end
183
184
    while not Pod.Message.TextFits and wait() do
185
        Pod.Size = Pod.Size + UDim2.new(0, 0, 0, 20)
186
        Pod.Message.Size = Pod.Message.Size + UDim2.new(0, 0, 0, 20)
187
        Output.CanvasSize = Output.CanvasSize + UDim2.new(0, 0, 0, Pod.Size.Y.Offset)
188
    end
189
190
    local Offset = math.abs(Output.AbsoluteSize.Y - Output.CanvasSize.Y.Offset)
191
    Output.CanvasPosition = Vector2.new(0, Offset)
192
end
193
194
Console.Input.FocusLost:Connect(function(fromEnter)
195
    if fromEnter then
196
        local Vargs = {}
197
        for Split in (Console.Input.Text .. ';'):gmatch('(.-);') do
198
            table.insert(Vargs, Split)
199
        end
200
201
        local Result = Arsenic.CommandHandler(Arsenic.Client, rawget(Vargs, 1), unpack((function()
202
            local Return = {}
203
            for i = 2, #Vargs do
204
                table.insert(Return, rawget(Vargs, i))
205
            end
206
            return Return
207
        end)()))
208
209
        Console.Input.Text = ''
210
        Graphics.Write(Result)
211
    end
212
end)
213
214
local function AppendToggle(object, onToggle, deToggle)
215
    object.MouseButton1Click:Connect(function()
216
        if object.Text == '' then
217
            onToggle()
218
        else
219
            deToggle()
220
        end
221
    end)
222
end
223
224
-- Local
225
226
AppendToggle(Tabs.Local.Toggles.Glowstick,
227
function()
228
    Local.Glowstick(true)
229
end,
230
function()
231
    Local.Glowstick(false)
232
end)
233
234
AppendToggle(Tabs.Local.Toggles.Fly,
235
function()
236
    Local.Fly(true)
237
end,
238
function()
239
    Local.Fly(false)
240
end)
241
242
AppendToggle(Tabs.Local.Toggles['VS-50 Walk'],
243
function()
244
    Local.VS50Walk(true)
245
end,
246
function()
247
    Local.VS50Walk(false)
248
end)
249
250
AppendToggle(Tabs.Local.Toggles['TM-46 Walk'],
251
function()
252
    Local.TM46Walk(true)
253
end,
254
function()
255
    Local.TM46Walk(false)
256
end)
257
258
AppendToggle(Tabs.Local.Toggles['C4 Walk'],
259
function()
260
    Local.C4Walk(true)
261
end,
262
function()
263
    Local.C4Walk(false)
264
end)
265
266
local Input = Tabs.Local.Input
267
268
Input.Fog.Button.MouseButton1Click:Connect(function()
269
    Local.SetFog(tonumber(Input.Fog.Text))
270
    Input.Fog.Text = ''
271
end)
272
273
Input.Speed.Button.MouseButton1Click:Connect(function()
274
    Local.SetWalkSpeed(tonumber(Input.Speed.Text))
275
    Input.Speed.Text = ''
276
end)
277
278
Input.Jump.Button.MouseButton1Click:Connect(function()
279
    Local.SetJumpPower(tonumber(Input.Jump.Text))
280
    Input.Jump.Text = ''
281
end)
282
283
-- Players
284
285
local PlayersList = Tabs.Players.List
286
local PlayersOptions = Tabs.Players.Scroller.Options
287
288
local function LoadData(tab, player)
289
    local Toggles = Tabs[tab].Options.Toggles
290
    local Data = Arsenic.Data[player].Toggles
291
292
    for i,v in next, Toggles do
293
        local Toggle = v
294
        if not v then
295
            Toggle.Label.Font = 'SourceSansSemibold'
296
            Toggle.Text = ''
297
        else
298
            Toggle.Label.Font = 'SourceSansBold'
299
            Toggle.Text = '✓'
300
        end
301
    end
302
end
303
304
PlayersList.ChildAdded:Connect(function(child)
305
    if child:IsA('TextButton') then
306
        child.MouseButton1Click:Connect(function()
307
            LoadData(Tabs.Players, game.Players:FindFirstChild(child.Name))    
308
        end)
309
    end
310
end)
311
312
-- Interface
313
314
function Graphics.MessageBox(msgtype, title, content, ...)
315
    local Vargs = {...}
316
    local Pod = game:GetObjects('rbxassetid://2899472005')[1]
317
	Pod.Parent = game.Players.LocalPlayer.PlayerGui
318
    Pod.MessageBox.Title.Text = title
319
    Pod.MessageBox.Content.Text = content
320
321
	local Arg1 = Vargs[1]
322
	local Arg2 = Vargs[2]
323
324
	if not Arg1 or Arg1 == '' then
325
		Arg1 = nil
326
	end
327
328
	if not Arg2 or Arg2 == '' then
329
		Arg2 = nil
330
	end
331
332
    local Type = {}
333
    function Type.OK()
334
        local Ok = Pod.MessageBox.OK.Ok
335
        Ok.Visible = true
336
    
337
        Ok.MouseButton1Click:Connect(function()
338
			if Arg1 then
339
				pcall(loadstring(Arg1))
340
			end
341
            Pod:Destroy()
342
        end)
343
    end
344
 
345
    function Type.OKCANCEL()
346
        local Ok, Cancel = Pod.MessageBox.OKCANCEL.Ok, Pod.MessageBox.OKCANCEL.Cancel
347
        Ok.Visible = true
348
        Cancel.Visible = true
349
350
        Ok.MouseButton1Click:Connect(function()
351
			if Arg1 then
352
				pcall(loadstring(Arg1))
353
			end
354
            Pod:Destroy()
355
        end)
356
        Cancel.MouseButton1Click:Connect(function()
357
			if Arg2 then
358
				pcall(loadstring(Arg2))
359
			end
360
            Pod:Destroy()
361
        end)
362
    end
363
 
364
    function Type.YESNO()
365
        local Yes, No = Pod.MessageBox.YESNO.Yes, Pod.MessageBox.YESNO.No
366
        Yes.Visible = true
367
        No.Visible = true
368
369
        Yes.MouseButton1Click:Connect(function()
370
			if Arg1 then
371
				pcall(loadstring(Arg1))
372
			end
373
            Pod:Destroy()
374
        end)
375
 
376
        No.MouseButton1Click:Connect(function()
377
			if Arg2 then
378
				pcall(loadstring(Arg2))
379
			end
380
            Pod:Destroy()
381
        end)
382
    end
383
 
384
    return pcall(rawget(Type, msgtype))
385
end
386
387
return Graphics