-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathGiveHat
386 lines (337 loc) · 11.8 KB
/
GiveHat
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
print("What accessories you have on")
for i, v in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do
if v:IsA("Accessory") then
print("What accessories you have on")
print(v.Name)
end
end
wait()
local plr = game:GetService"Players".LocalPlayer
function mOut(txt, type)
if type == 1 then
spawn(function()
local m = Instance.new("Message", game.CoreGui)
m.Text = txt
task.wait(3)
m:Destroy()
end)
elseif type == 2 then
spawn(function()
local h = Instance.new("Hint", game.CoreGui)
h.Text = txt
task.wait(3)
h:Destroy()
end)
end
end
-- Gui to Lua
-- Version: 3.2
-- Instances:
local ScreenGui = Instance.new("ScreenGui")
local Main = Instance.new("Frame")
local Container = Instance.new("Frame")
local UICorner = Instance.new("UICorner")
local UIGradient = Instance.new("UIGradient")
local Topbar = Instance.new("Frame")
local Icon = Instance.new("ImageLabel")
local Exit = Instance.new("TextButton")
local ImageLabel = Instance.new("ImageLabel")
local Minimize = Instance.new("TextButton")
local ImageLabel_2 = Instance.new("ImageLabel")
local TopBar = Instance.new("Frame")
local ImageLabel_3 = Instance.new("ImageLabel")
local ImageLabel_4 = Instance.new("ImageLabel")
local Title = Instance.new("TextLabel")
local UICorner_2 = Instance.new("UICorner")
local UIGradient_2 = Instance.new("UIGradient")
local Punish = Instance.new("TextBox")
local UICorner_3 = Instance.new("UICorner")
local SilentCMD = Instance.new("TextBox")
local UICorner_4 = Instance.new("UICorner")
local SilentC = Instance.new("TextButton")
local UICorner_5 = Instance.new("UICorner")
--Properties:
ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
ScreenGui.ResetOnSpawn = false
Main.Name = "Main"
Main.Parent = ScreenGui
Main.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Main.BackgroundTransparency = 0.140
Main.BorderColor3 = Color3.fromRGB(139, 139, 139)
Main.BorderSizePixel = 0
Main.Position = UDim2.new(0.651976228, 0, 0.453526437, 0)
Main.Size = UDim2.new(0, 402, 0, 218)
Main.Active = true
Main.Draggable = true
Container.Name = "Container"
Container.Parent = Main
Container.AnchorPoint = Vector2.new(0.5, 1)
Container.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Container.BackgroundTransparency = 0.500
Container.BorderColor3 = Color3.fromRGB(255, 255, 255)
Container.BorderSizePixel = 0
Container.ClipsDescendants = true
Container.Position = UDim2.new(0.5, 0, 0.996153831, -5)
Container.Size = UDim2.new(1, -10, 1.00769234, -30)
UICorner.CornerRadius = UDim.new(0, 9)
UICorner.Parent = Container
UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(12, 4, 20)), ColorSequenceKeypoint.new(0.50, Color3.fromRGB(12, 4, 20)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(12, 4, 20))}
UIGradient.Parent = Container
Topbar.Name = "Topbar"
Topbar.Parent = Main
Topbar.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Topbar.BackgroundTransparency = 1.000
Topbar.Size = UDim2.new(1, 0, 0, 25)
Icon.Name = "Icon"
Icon.Parent = Topbar
Icon.AnchorPoint = Vector2.new(0, 0.5)
Icon.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Icon.BackgroundTransparency = 1.000
Icon.Position = UDim2.new(0, 10, 0.5, 0)
Icon.Size = UDim2.new(0, 13, 0, 13)
Icon.Image = "rbxgameasset://Images/menuIcon"
Exit.Name = "Exit"
Exit.Parent = Topbar
Exit.BackgroundColor3 = Color3.fromRGB(12, 4, 20)
Exit.BackgroundTransparency = 0.500
Exit.BorderSizePixel = 0
Exit.Position = UDim2.new(0.870000005, 0, 0, 0)
Exit.Size = UDim2.new(-0.00899999961, 40, 1.04299998, -10)
Exit.Font = Enum.Font.Gotham
Exit.Text = "X"
Exit.TextColor3 = Color3.fromRGB(255, 255, 255)
Exit.TextSize = 13.000
ImageLabel.Parent = Exit
ImageLabel.BackgroundColor3 = Color3.fromRGB(36, 36, 36)
ImageLabel.BackgroundTransparency = 1.000
ImageLabel.Position = UDim2.new(0.999998331, 0, 0, 0)
ImageLabel.Size = UDim2.new(0, 9, 0, 16)
ImageLabel.Image = "http://www.roblox.com/asset/?id=8650484523"
ImageLabel.ImageColor3 = Color3.fromRGB(12, 4, 20)
ImageLabel.ImageTransparency = 0.500
Minimize.Name = "Minimize"
Minimize.Parent = Topbar
Minimize.BackgroundColor3 = Color3.fromRGB(12, 4, 20)
Minimize.BackgroundTransparency = 0.500
Minimize.BorderSizePixel = 0
Minimize.Position = UDim2.new(0.804174006, 0, 0, 0)
Minimize.Size = UDim2.new(0.00100000005, 27, 1.04299998, -10)
Minimize.Font = Enum.Font.Gotham
Minimize.Text = "-"
Minimize.TextColor3 = Color3.fromRGB(255, 255, 255)
Minimize.TextSize = 18.000
ImageLabel_2.Parent = Minimize
ImageLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
ImageLabel_2.BackgroundTransparency = 1.000
ImageLabel_2.Position = UDim2.new(-0.453000009, 0, 0, 0)
ImageLabel_2.Size = UDim2.new(0, 12, 0, 16)
ImageLabel_2.Image = "http://www.roblox.com/asset/?id=10555881849"
ImageLabel_2.ImageColor3 = Color3.fromRGB(12, 4, 20)
ImageLabel_2.ImageTransparency = 0.500
TopBar.Name = "TopBar"
TopBar.Parent = Topbar
TopBar.BackgroundColor3 = Color3.fromRGB(12, 4, 20)
TopBar.BackgroundTransparency = 0.500
TopBar.BorderSizePixel = 0
TopBar.Position = UDim2.new(0.268202901, 0, -0.00352294743, 0)
TopBar.Size = UDim2.new(0, 186, 0, 16)
ImageLabel_3.Parent = TopBar
ImageLabel_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
ImageLabel_3.BackgroundTransparency = 1.000
ImageLabel_3.Position = UDim2.new(1, 0, 0.0590000004, 0)
ImageLabel_3.Size = UDim2.new(0, 12, 0, 15)
ImageLabel_3.Image = "http://www.roblox.com/asset/?id=8650484523"
ImageLabel_3.ImageColor3 = Color3.fromRGB(12, 4, 20)
ImageLabel_3.ImageTransparency = 0.500
ImageLabel_4.Parent = TopBar
ImageLabel_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
ImageLabel_4.BackgroundTransparency = 1.000
ImageLabel_4.Position = UDim2.new(-0.0817726701, 0, 0, 0)
ImageLabel_4.Size = UDim2.new(0, 16, 0, 16)
ImageLabel_4.Image = "http://www.roblox.com/asset/?id=10555881849"
ImageLabel_4.ImageColor3 = Color3.fromRGB(12, 4, 20)
ImageLabel_4.ImageTransparency = 0.500
Title.Name = "Title"
Title.Parent = TopBar
Title.AnchorPoint = Vector2.new(0, 0.5)
Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Title.BackgroundTransparency = 1.000
Title.BorderSizePixel = 0
Title.Position = UDim2.new(-0.150533721, 32, 0.415876389, 0)
Title.Size = UDim2.new(0.522161067, 80, 1.11675644, -7)
Title.Font = Enum.Font.SourceSansLight
Title.Text = "Give Hat"
Title.TextColor3 = Color3.fromRGB(255, 255, 255)
Title.TextSize = 17.000
Title.TextWrapped = true
UICorner_2.CornerRadius = UDim.new(0, 9)
UICorner_2.Parent = Main
UIGradient_2.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(12, 4, 20)), ColorSequenceKeypoint.new(0.38, Color3.fromRGB(4, 4, 4)), ColorSequenceKeypoint.new(0.52, Color3.fromRGB(4, 4, 4)), ColorSequenceKeypoint.new(0.68, Color3.fromRGB(4, 4, 4)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(12, 4, 20))}
UIGradient_2.Parent = Main
Punish.Name = "Punish"
Punish.Parent = Main
Punish.BackgroundColor3 = Color3.fromRGB(10, 3, 17)
Punish.BackgroundTransparency = 0.500
Punish.Position = UDim2.new(0.206467807, 0, 0.192345411, 0)
Punish.Size = UDim2.new(0, 234, 0, 40)
Punish.Font = Enum.Font.SourceSans
Punish.PlaceholderText = "Player name"
Punish.Text = ""
Punish.TextColor3 = Color3.fromRGB(255, 255, 255)
Punish.TextSize = 14.000
UICorner_3.Parent = Punish
SilentCMD.Name = "SilentCMD"
SilentCMD.Parent = Main
SilentCMD.BackgroundColor3 = Color3.fromRGB(10, 3, 17)
SilentCMD.BackgroundTransparency = 0.500
SilentCMD.Position = UDim2.new(0.216417909, 0, 0.440437019, 0)
SilentCMD.Size = UDim2.new(0, 227, 0, 38)
SilentCMD.Font = Enum.Font.SourceSans
SilentCMD.PlaceholderText = "Hat name"
SilentCMD.Text = ""
SilentCMD.TextColor3 = Color3.fromRGB(255, 255, 255)
SilentCMD.TextSize = 14.000
UICorner_4.Parent = SilentCMD
SilentC.Name = "SilentC"
SilentC.Parent = Main
SilentC.BackgroundColor3 = Color3.fromRGB(10, 3, 17)
SilentC.BackgroundTransparency = 0.500
SilentC.Position = UDim2.new(0.226368293, 0, 0.722879827, 0)
SilentC.Size = UDim2.new(0, 217, 0, 34)
SilentC.Font = Enum.Font.SourceSans
SilentC.Text = "Hat em'"
SilentC.TextColor3 = Color3.fromRGB(255, 255, 255)
SilentC.TextSize = 20.000
SilentC.TextWrapped = true
UICorner_5.Parent = SilentC
-- Scripts:
local function RNBIV_fake_script() -- Exit.LocalScript
local script = Instance.new('LocalScript', Exit)
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Parent.Parent:Destroy()
end)
end
function getPlayer(shortcut)
local player = nil
local g = game.Players:GetPlayers()
for i = 1, #g do
if string.lower(string.sub(g[i].Name,1,string.len(shortcut))) == string.lower(shortcut) then
if g[i] ~= nil then
player = g[i]
break
end
end
end
return player
end
function getHat(shortcuts)
local hat = nil
for i, v in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do
if v:IsA("Accessory") then
if string.lower(string.sub(v.Name,1,string.len(shortcuts))) == string.lower(shortcuts) then
if v.Name ~= nil then
hat = v
break
end
end
end
end
return hat
end
local runcode = true
local spawntime = game.Players.RespawnTime + 3
local hatstored = {}
SilentC.MouseButton1Click:Connect(function()
local char = game.Players.LocalPlayer.Character
if runcode then
runcode = true
local dfc = game.ReplicatedStorage.DefaultChatSystemChatEvents
local smr = dfc.SayMessageRequest
local hatse = getHat(SilentCMD.Text)
local arg = getPlayer(Punish.Text)
if table.find(hatstored, hatse.Name) then
mOut("Hat is already given away, error", 1)
return end
argplr = game.Players[arg.Name].Character
local rs = game:GetService("RunService")
local fc
local dc
local dic
local coc
char.Archivable = true
headname = char.Head.Name
local cchar = char:Clone()
cchar.Parent = Workspace
wait()
Main.Visible = false
runcode = true
table.clear(hatstored)
wait(0.2)
Main.Visible = true
runcode = true
local con
con = char.Humanoid.Died:Connect(function()
cchar:Destroy()
Main.Visible = false
runcode = true
mOut("Wait For "..tostring(spawntime).." Second", 1)
table.clear(hatstored)
task.wait(spawntime)
Main.Visible = true
runcode = true
con:Disconnect()
end)
if fakeadmin then
smr:FireServer(";givehat "..hatse.Name.." "..arg.Name, "All")
end
cchar.HumanoidRootPart.CFrame = char.HumanoidRootPart.CFrame
for i, x in pairs(cchar:GetDescendants()) do
if x:IsA("BasePart") then
x.Transparency = 1
end
end
for i, v in pairs(cchar.Head:GetDescendants()) do
if v.className == "Decal" or v.className == "Texture" then
v.Transparency = 1
end
end
for i,v in pairs(char:GetDescendants()) do
if v:IsA("BasePart") and v.Name ~="HumanoidRootPart" then
fc = rs.Heartbeat:Connect(function()
if char.Humanoid.Health <= 0 then fc:Disconnect() return end
v.Velocity = Vector3.new(30, 4, 0)
v.RotVelocity = Vector3.new(30, 4, 0)
end)
end
dic = rs.RenderStepped:Connect(function()
setscriptable(plr, "SimulationRadius", true)
plr.SimulationRadius = math.huge * math.huge, math.huge * math.huge * 1 / 0 * 1 / 0 * 1 / 0 * 1 / 0 * 1 / 0
end)
coc = plr.SimulationRadiusChanged:Connect(function(radius)
radius = math.huge
return radius
end)
char[hatse.Name].Handle.AccessoryWeld:Destroy()
dc = rs.RenderStepped:Connect(function()
if char.Humanoid.Health <= 0 then dc:Disconnect() cchar:Destroy() coc:Disconnect() dic:Disconnect() return end
cchar.HumanoidRootPart.CFrame = argplr.HumanoidRootPart.CFrame
char[hatse.Name].Handle.CFrame = cchar[hatse.Name].Handle.CFrame
end)
table.insert(hatstored, hatse.Name)
end
runcode = true
end
X.MouseButton1Click:Connect(function()
Main.Visible = false
end)
mOut("Hat Giver Has Loaded", 2)
wait(0.2)
print("What accessories you have on")
for i, v in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do
if v:IsA("Accessory") then
print("What accessories you have on")
print(v.Name)
end
end
end)