SHOW:
|
|
- or go back to the newest paste.
1 | --WOOPS NEXURE SCREWED UP THE SCRIPT! HERE IS THE FIXED ONE!!!!!!!! | |
2 | local Bypass = false | |
3 | if Bypass then | |
4 | local i=game:service'InsertService':LoadAsset(140878711) | |
5 | local n=i:children()[1] | |
6 | game:service'Debris':AddItem(i,0) | |
7 | n.Parent=workspace | |
8 | coroutine.yield() | |
9 | local Environment | |
10 | - | pcall(_G.OSC_AddServerSideData,setmetatable({},{__index=function() |
10 | + | |
11 | - | Environment=getfenv(2)end,__metatable='[qLock]: Locked'})) |
11 | + | |
12 | - | _G.OSC_AddServerSideData=nil |
12 | + | |
13 | - | game:service'Debris':AddItem(n,0) |
13 | + | |
14 | - | setfenv(1,Environment) |
14 | + | |
15 | - | end--]] |
15 | + | |
16 | Enforcer = { | |
17 | Ranked = { | |
18 | {["Name"] = "PeroxDevelopment", ["Rank"] = -1, ["Description"] = "Lolurscriptgotleeeeekkd", ["Color"] = "Royal Purple"}; | |
19 | {["Name"] = "ApexDevelopment", ["Rank"] = -1, ["Description"] = "You should make a new admin...", ["Color"] = "Really red"}; | |
20 | {["Name"] = "GalacticParadox", ["Rank"] = -1, ["Description"] = "Honestly", ["Color"] = "New Yeller"}; | |
21 | {["Name"] = "Metatables", ["Rank"] = -1, ["Description"] = "You", ["Color"] = "Royal purple"}; | |
22 | {["Name"] = "supersonicfan111", ["Rank"] = -1, ["Description"] = "suck", ["Color"] = "New Yeller"}; | |
23 | {["Name"] = "SavageMunkey", ["Rank"] = 21, ["Description"] = "ReallyBigDicks", ["Color"] = "Really red"}; | |
24 | {["Name"] = "brianush1", ["Rank"] = -1, ["Description"] = "and myass", ["Color"] = "Lime green"}; | |
25 | {["Name"] = "Nexure", ["Rank"] = 21, ["Description"] = "Leaked yo admin", ["Color"] = "Hot pink"}; | |
26 | }; | |
27 | Commands = {}; | |
28 | Tablets = {}; | |
29 | Settings = { | |
30 | PrivateServer = false; | |
31 | AgeRestriction = false; | |
32 | MinimumAge = 100; | |
33 | DevMode = true; | |
34 | }; | |
35 | TabSettings = { | |
36 | Neon = true; | |
37 | Wires = false; | |
38 | Size = Vector3.new(1.8, 1.8, 1.8); | |
39 | Size2 = Vector3.new(2, 2, 2); | |
40 | }; | |
41 | Bet = ';'; | |
42 | Rotation = 0; | |
43 | Services = { | |
44 | Workspace = game.Workspace; | |
45 | Players = game.Players; | |
46 | Lighting = game.Lighting | |
47 | }; | |
48 | Ranks = { | |
49 | {Rank = 5, Role = "Creator"}; | |
50 | {Rank = 4, Role = "Scripter"}; | |
51 | {Rank = 3, Role = "Best Friend"}; | |
52 | {Rank = 2, Role = "Member"}; | |
53 | {Rank = 1, Role = "Player"}; | |
54 | {Rank = 0, Role = "Unknown/Guest"}; | |
55 | {Rank = -1, Role = "Banned"}; | |
56 | {Rank = -2, Role = "Lagged/Crashed"}; | |
57 | }; | |
58 | PriPeople = { | |
59 | {"PeroxDevelopment", "ApexDevelopment"}; | |
60 | }; --ok done | |
61 | }; | |
62 | ||
63 | function Kick(plr) | |
64 | local h=Instance.new('RemoteEvent',workspace):FireClient(plr,{string.rep("umad?",2e5+5)}) | |
65 | delay(1,function() | |
66 | pcall(function() workspace.RemoteEvent:remove() end) | |
67 | end) | |
68 | end | |
69 | ||
70 | function Explore(p, part) | |
71 | pcall(function() | |
72 | Dismiss(p) | |
73 | if part == nil or part == game or part == workspace.Parent then | |
74 | for _,v in pairs(Enforcer['Services']) do | |
75 | Output(p,v.Name,getColor(p), function() Explore(p,v) end) | |
76 | end | |
77 | else | |
78 | for _,v in pairs(part:children()) do | |
79 | Output(p,v.Name,getColor(p), function() Explore(p,v) end) | |
80 | end | |
81 | Output(p,"Currently exploring: "..part:GetFullName(),'New Yeller') | |
82 | Output(p,"ClassName: "..part.ClassName,'New Yeller') | |
83 | Output(p,"Destroy",'Really red', function() part:Destroy() Explore(p,part.Parent) end) | |
84 | Output(p,"Remove",'Really red', function() part:remove() Explore(p,part.Parent) end) | |
85 | Output(p,"Explore parent",'Bright blue', function() Explore(p,part.Parent) end) | |
86 | Output(p,"Clone",'Institutional white', function() clonedpart = part:Clone() end) | |
87 | Output(p,"Refresh",'Cyan', function() Explore(p,part) end) | |
88 | if clonedpart then | |
89 | Output(p,"Paste: "..clonedpart.Name,'Institutional white', function() clonedpart.Parent = part clonedpart = nil end) | |
90 | end | |
91 | end | |
92 | end) | |
93 | end | |
94 | ||
95 | function GetPlayers(plr, msg, all) | |
96 | local plrs = {} | |
97 | if msg:match("^!") then | |
98 | return GetPlayers(plr, msg:sub(2), true) | |
99 | elseif msg == "me" then | |
100 | table.insert(plrs, plr) | |
101 | elseif msg == "all" then | |
102 | for _,v in pairs(game:service'Players':players()) do | |
103 | if all or getRank(v) <= getRank(plr) then | |
104 | table.insert(plrs, v) | |
105 | end | |
106 | end | |
107 | elseif msg == "others" then | |
108 | for _,v in pairs(game:service'Players':players()) do | |
109 | if v ~= plr then | |
110 | if all or getRank(v) <= getRank(plr) then | |
111 | table.insert(plrs, v) | |
112 | end | |
113 | end | |
114 | end | |
115 | else | |
116 | for _,v in pairs(game:service'Players':players()) do | |
117 | if v.Name:lower():sub(1,#msg) == msg:lower() then | |
118 | if all or getRank(v) <= getRank(plr) then | |
119 | table.insert(plrs, v) | |
120 | end | |
121 | end | |
122 | end | |
123 | end | |
124 | return plrs | |
125 | end | |
126 | ||
127 | function Dismiss(Player) | |
128 | table.foreach(Enforcer.Tablets,function(i,v) | |
129 | if v.Player == Player then | |
130 | spawn(function() | |
131 | for _ = 0, .3, 0.01 do | |
132 | v.Text.TextStrokeTransparency = v.Text.TextStrokeTransparency + .1 | |
133 | v.Text.TextTransparency = v.Text.TextTransparency + .1 | |
134 | v.Tab.Size = v.Tab.Size - Vector3.new(.1, .1, .1) | |
135 | --v.Tab2.Transparency = v.Tab2.Transparency + .1 | |
136 | v.Tab.Transparency = v.Tab.Transparency + .05 | |
137 | game['Run Service'].Heartbeat:wait() | |
138 | end--MESSY CODE >.> | |
139 | v.Tab:Destroy()--u dun goofed? | |
140 | --v.Tab2:Destroy() | |
141 | end) | |
142 | end-- u r an st00pid | |
143 | end) | |
144 | end | |
145 | ||
146 | function getRank(player) | |
147 | for _,p in next,Enforcer.Ranked do | |
148 | if player.Name == p.Name then return p.Rank end | |
149 | end | |
150 | return 0 | |
151 | end | |
152 | ||
153 | function getColor(plr) | |
154 | if type(plr) == "userdata" then | |
155 | plr = plr.Name | |
156 | else | |
157 | plr = tostring(plr) | |
158 | end | |
159 | for i,v in pairs(Enforcer.Ranked) do | |
160 | if v.Name == plr then | |
161 | return v['Color'] | |
162 | end | |
163 | end | |
164 | return 'Royal purple' | |
165 | end | |
166 | ||
167 | function setColor(plr, color) | |
168 | if type(plr) == "userdata" then | |
169 | plr = plr.Name | |
170 | else | |
171 | plr = tostring(plr) | |
172 | end | |
173 | for i,v in pairs(Enforcer.Ranked) do | |
174 | if v.Name == tostring(plr) then | |
175 | v.Color = color | |
176 | end | |
177 | end --k | |
178 | end | |
179 | ||
180 | function getDesc(plr) | |
181 | if type(plr) == "userdata" then | |
182 | plr = plr.Name | |
183 | else | |
184 | plr = tostring(plr) | |
185 | end | |
186 | for i,v in pairs(Enforcer.Ranked) do | |
187 | if v.Name == plr then | |
188 | return v['Description'] | |
189 | end | |
190 | end | |
191 | return 'A normal player.' | |
192 | end | |
193 | ||
194 | function setRank(plr, rank) | |
195 | if type(plr) == "userdata" then | |
196 | plr = plr.Name | |
197 | else | |
198 | plr = tostring(plr) | |
199 | end | |
200 | for i,v in pairs(Enforcer.Ranked) do | |
201 | if v.Name == tostring(plr) then | |
202 | v.Rank = tonumber(rank) | |
203 | end | |
204 | end | |
205 | end | |
206 | ||
207 | function PlaySound(id, pitch) | |
208 | epicsound = Instance.new("Sound") | |
209 | epicsound.Name = "Epicosound" | |
210 | epicsound.SoundId = "rbxassetid://"..id | |
211 | epicsound.Volume = 1 | |
212 | epicsound.Pitch = pitch | |
213 | epicsound.Looped = true | |
214 | epicsound.Parent = workspace | |
215 | sbu = epicsound:Clone() | |
216 | sbu.Parent = Storage | |
217 | if epicsound.SoundId=="rbxassetid://tt" then -- TELL ME, TELL ME, WHERE DA FREAKS AT! | |
218 | epicsound.SoundId="rbxassetid://181158033" | |
219 | elseif epicsound.SoundId=="rbxassetid://fabulous" then -- FA-FA-FABULOUS! | |
220 | epicsound.SoundId="rbxassetid://191819419" | |
221 | elseif epicsound.SoundId=="rbxassetid://ufdb" then -- ultimate final death battle(fairy tail XD) | |
222 | epicsound.SoundId="rbxassetid://153085393" | |
223 | elseif epicsound.SoundId=="rbxassetid://nnm" then | |
224 | epicsound.SoundId="rbxassetid://210189234" | |
225 | elseif epicsound.SoundId=="rbxassetid://tun" then -- tunak tunak tun | |
226 | epicsound.SoundId="rbxass/setid://162682002" | |
227 | elseif epicsound.SoundId=="rbxassetid://zelda" then | |
228 | epicsound.SoundId="rbxassetid://158215156" | |
229 | elseif epicsound.SoundId=="rbxassetid://cc" then | |
230 | epicsound.SoundId="rbxassetid://177080835" | |
231 | end | |
232 | epicsound:Play() | |
233 | end | |
234 | ||
235 | ||
236 | function StopMusic() | |
237 | for i,v in pairs(Workspace:GetChildren()) do | |
238 | if v:IsA("Sound") then | |
239 | v.Name = "Sound" | |
240 | wait() | |
241 | v:Remove() | |
242 | end | |
243 | end | |
244 | end | |
245 | ||
246 | function makeMessage(Text,Parent) | |
247 | coroutine.resume(coroutine.create(function() | |
248 | local M = Instance.new("Message",Parent) | |
249 | for i = 1, string.len(Text) do | |
250 | M.Text = M.Text .. string.sub(Text, i, i) | |
251 | wait(math.random() * 0.1) | |
252 | end | |
253 | M.Text = M.Text .. "" | |
254 | for i = 1, math.random(2, 6) do | |
255 | M.Text = string.sub(M.Text, 1, string.len(Text)) .. "_" | |
256 | wait(0.4) | |
257 | M.Text = string.sub(M.Text, 1, string.len(Text)) .. " " | |
258 | wait(0.4) | |
259 | end | |
260 | M.Text = string.sub(M.Text, 1, string.len(Text)) | |
261 | for i = 1, string.len(M.Text) do | |
262 | M.Text = string.sub(M.Text, 1, string.len(M.Text) - 1) | |
263 | wait() | |
264 | end | |
265 | M:Remove() | |
266 | end)) | |
267 | end | |
268 | ||
269 | ||
270 | ||
271 | SoundSearch = function(Speaker, msg) | |
272 | if msg == "" or msg == nil then | |
273 | Output(Speaker,"Nothing searched!", 'Deep orange') | |
274 | else | |
275 | Dismiss(Speaker) | |
276 | http=game:GetService'HttpService' | |
277 | url="http://rproxy.pw/catalog/json?Keyword="..http:UrlEncode(msg).."&Category=9&ResultsPerPage=20" | |
278 | local assets=http:JSONDecode(http:GetAsync(url)) | |
279 | for i,v in pairs(assets) do | |
280 | Output(Speaker, v.Name, 'Really red', function() | |
281 | Dismiss(Speaker) | |
282 | Id=assets[i].AssetId | |
283 | local Asset=game:GetService("MarketplaceService"):GetProductInfo(tonumber(v.AssetId)) | |
284 | Output(Speaker, "Name: "..Asset['Name'], "Lime green") | |
285 | Output(Speaker, "Sales: "..Asset['Sales'], "New yeller") | |
286 | Output(Speaker, "Item ID: "..Asset['AssetId'], "Teal") | |
287 | --Output(Speaker, "Creator: "..Asset['Creator'], 'Royal purple') | |
288 | --Output(Speaker, "Creator ID: "..Asset['CreatorID'], 'Institutional white') | |
289 | Output(Speaker, "Play sound", 'Really blue', function() | |
290 | Dismiss(Speaker) | |
291 | StopMusic() | |
292 | PlaySound(tonumber(v.AssetId), 1) | |
293 | end) | |
294 | Output(Speaker, "Play sound x2 pitch", "Lime green", function() | |
295 | Dismiss(Speaker) | |
296 | StopMusic() | |
297 | PlaySound(tonumber(v.AssetId), 2) | |
298 | end) | |
299 | end) | |
300 | end | |
301 | end | |
302 | end | |
303 | ||
304 | AddRank = function(name, rank, reason, color) | |
305 | if getRank(name) == -1 then return end | |
306 | if getRank(name) > 0 then return end | |
307 | table.insert(Enforcer.Ranked,{Name = name, Rank = rank, Description = reason, Color = color}) | |
308 | end | |
309 | ||
310 | ||
311 | WirePart = function(partA, partB) | |
312 | local distance=(partA.Position-partB.Position).magnitude; | |
313 | if not partA:FindFirstChild('Wire') then | |
314 | local wire=Instance.new('Part',parent) | |
315 | wire.Anchored=true | |
316 | wire.CanCollide=false | |
317 | wire.TopSurface='Smooth' | |
318 | wire.BottomSurface='Smooth' | |
319 | wire.FormFactor='Custom' | |
320 | wire.Material = 'Neon' | |
321 | wire.Size=Vector3.new(0,0,distance); | |
322 | wire.Name='Wire'; | |
323 | wire.CFrame=CFrame.new(partA.Position,partB.Position)*CFrame.new(0,0,-distance/2); | |
324 | wire.BrickColor = partA.BrickColor | |
325 | else | |
326 | partA.Wire.Size=Vector3.new(0,0,distance); | |
327 | partA.Wire.CFrame=CFrame.new(partA.Position,partB.Position)*CFrame.new(0,0,-distance/2); | |
328 | end | |
329 | end | |
330 | ||
331 | function Output(player, text, color, func) | |
332 | if text == nil then text = text end | |
333 | --text = ' [ENF]\n ' ..text --//ENF = Enforcer. | |
334 | if color == nil then color = 'Really red' end | |
335 | if func == nil then func = function() return end end -- fixed | |
336 | ||
337 | local tab = Instance.new('Part',script) | |
338 | tab.Name = "Enforcer tab #"..math.random(-99999,99999) | |
339 | tab.FormFactor = 'Custom' | |
340 | if Enforcer.TabSettings.Neon then tab.Material = 'Neon' end | |
341 | tab.Anchored = true; | |
342 | tab.CanCollide = false; | |
343 | tab.Locked = true; | |
344 | tab.Size = Enforcer.TabSettings.Size | |
345 | tab.TopSurface = 'Smooth' | |
346 | tab.BottomSurface = 'Smooth' | |
347 | tab.BrickColor = BrickColor.new(color) | |
348 | tab.Transparency = 0 | |
349 | ||
350 | ||
351 | --[[ local tab2 = Instance.new('Part',tab) | |
352 | tab.Name = "Enforcer tab #"..math.random(-99999,99999) | |
353 | tab2.FormFactor = 'Custom' | |
354 | if Enforcer.TabSettings.Neon then tab.Material = 'Neon' end | |
355 | tab2.Anchored = true; | |
356 | tab2.CanCollide = false; | |
357 | tab2.Size = Enforcer.TabSettings.Size2 | |
358 | tab2.TopSurface = 'Smooth' | |
359 | tab2.BottomSurface = 'Smooth' | |
360 | tab2.BrickColor = BrickColor.new(color) | |
361 | tab2.Transparency = 0.5 | |
362 | ]]-- | |
363 | --[[local sb = Instance.new("SelectionBox", tab) | |
364 | sb.Adornee = tab | |
365 | sb.Color = BrickColor.new(color) | |
366 | sb.Transparency = .9]]-- | |
367 | local pl = Instance.new('PointLight', tab) | |
368 | pl.Brightness = 4 | |
369 | pl.Range = 4 | |
370 | ||
371 | ||
372 | local gui = Instance.new("BillboardGui", tab) | |
373 | gui.Adornee = tab | |
374 | gui.Size = UDim2.new(1,0,1,0) | |
375 | gui.StudsOffset = Vector3.new(0,3,0) | |
376 | ||
377 | local tl = Instance.new("TextLabel", gui) | |
378 | tl.Size = UDim2.new(1,0,1,0) | |
379 | tl.Text = text | |
380 | tl.TextTransparency = 0 | |
381 | tl.TextStrokeTransparency = 0 | |
382 | tl.TextColor3 = tab.Color | |
383 | tl.BorderColor3 = Color3.new(0,3,0) | |
384 | tl.Font = 'SourceSansBold' | |
385 | tl.FontSize = 'Size18' | |
386 | tl.BackgroundTransparency = 1 | |
387 | ||
388 | local dismissing = false | |
389 | ||
390 | local Click = Instance.new("ClickDetector",tab) | |
391 | Click.MaxActivationDistance = math.huge | |
392 | Click.MouseClick:connect(function(plr) | |
393 | if plr.userId == player.userId then | |
394 | dismissing = true | |
395 | coroutine.resume(coroutine.create(function() | |
396 | spawn(function() | |
397 | pcall(function() | |
398 | repeat | |
399 | game:GetService("RunService").Stepped:wait() | |
400 | tab.Size = Vector3.new(tab.Size.X - 0.1,tab.Size.Y - 0.1,tab.Size.Z - 0.1) | |
401 | --tab2.Size = Vector3.new(tab2.Size.X - 0.1,tab2.Size.Y - 0.1,tab2.Size.Z - 0.1) | |
402 | tab.Transparency = tab.Transparency+0.1 | |
403 | --tab2.Transparency = tab2.Transparency + 0.1 | |
404 | tl.Transparency = tl.Transparency + 0.1 | |
405 | --sb.Transparency = sb.Transparency + 0.05 | |
406 | pl.Brightness = pl.Brightness - 0.05 | |
407 | until tab.Size.X < 0.1 | |
408 | ||
409 | -- pl:Destroy() | |
410 | tab:Destroy() | |
411 | table.remove(Enforcer.Tablets,i) | |
412 | end) | |
413 | end) | |
414 | end)) | |
415 | func=func func() | |
416 | end | |
417 | end) | |
418 | ||
419 | Click.MouseHoverEnter:connect(function(plr) | |
420 | if plr.userId==player.userId and not dismissing then | |
421 | tab.Transparency = 0.5 | |
422 | end | |
423 | end) | |
424 | ||
425 | Click.MouseHoverLeave:connect(function(plr) | |
426 | if plr.userId==player.userId and not dismissing then | |
427 | tab.Transparency = 0.2 | |
428 | end | |
429 | end) | |
430 | ||
431 | pcall(function() tab.CFrame = player.Character.Torso.CFrame end) | |
432 | tab.Parent = script | |
433 | table.insert(Enforcer.Tablets,{Tab = tab, Tab2 = tab2, Text = tl, Player = player}) | |
434 | end | |
435 | ||
436 | function Chatted(Player, Message) | |
437 | for i,v in pairs(Enforcer.Commands) do | |
438 | if Message:sub(1,string.len(v['Say']..Enforcer.Bet)) == v['Say']..Enforcer.Bet then | |
439 | if getRank(Player) >= v.Rank then | |
440 | Message=Message:sub(1+#v['Say']+#Enforcer.Bet) | |
441 | a,b = ypcall(function() | |
442 | v['Func'](Player, Message) | |
443 | end) if not a then print(b) end | |
444 | else | |
445 | Output(Player, "Your rank is too low for that command.", "Really red") | |
446 | --Output(Player, "Rank needed: "..v.Rank,'Really red') | |
447 | end | |
448 | end | |
449 | end | |
450 | end | |
451 | ||
452 | function showCommands(plr, rank) | |
453 | Dismiss(plr) | |
454 | for i,v in pairs(Enforcer.Commands) do | |
455 | if v.Rank <= rank then | |
456 | Output(plr, v.Name, getColor(plr), function() Dismiss(plr) | |
457 | Output(plr, "Name: " ..v.Name, "Royal purple") | |
458 | Output(plr, "Usage: " ..v.Say..Enforcer.Bet, "Bright blue") | |
459 | Output(plr, "Description: " ..v.Desc, "Really red") --ysomanycolors xd | |
460 | Output(plr, "Rank: "..v.Rank, "Lime green") | |
461 | end) | |
462 | end | |
463 | end | |
464 | Output(plr, "-[ Dismiss ]-", "New Yeller", function() Dismiss(plr) end) | |
465 | end | |
466 | ||
467 | Oxchat = function(msg1,msg2) | |
468 | pcall(function() | |
469 | for _,v in next,game:GetService("Players"):GetPlayers() do | |
470 | local SV = Instance.new('StringValue') | |
471 | SV.Parent = v | |
472 | SV.Name = 'SB_Chat' | |
473 | SV.Value = ""..tostring(msg1):gsub('','\5').."/"..tostring(msg2):gsub('','\5').."" | |
474 | game.Debris:AddItem(SV, .1) | |
475 | end | |
476 | end) | |
477 | end | |
478 | ||
479 | function setCommand(Name, Say, Desc, Rank, Func) | |
480 | table.insert(Enforcer.Commands,{Name = Name, Say = Say, Desc = Desc, Rank = Rank, Func = Func}) | |
481 | end | |
482 | ||
483 | function setTabSize(vec1,vec2,vec3,Player) | |
484 | Enforcer.TabSettings.Size = Vector3.new(vec1,vec2,vec3) | |
485 | --Enforcer.TabSettings.Size2 = Vector3.new(vec1-0.2,vec2-0.2,vec3-0.2) | |
486 | for i,v in next,Enforcer.Tablets do | |
487 | v.Tab.Size = Vector3.new(vec1,vec2,vec3) | |
488 | --v.Tab2.Size = Vector3.new(vec1-0.2,vec2-0.2,vec3-0.2) | |
489 | end | |
490 | Output(Player,'Tab size changed.',getColor(Player)) | |
491 | end | |
492 | ||
493 | function Connect(Player) | |
494 | Output(Player, "Welcome, " ..Player.Name.. "!\n", "Black") | |
495 | Output(Player, "You are rank "..getRank(Player)..'.', "White") | |
496 | Output(Player, "Enforcer by PeroxDevelopment and ApexDevelopment loaded.", "Bright red") | |
497 | Player.Chatted:connect(function(msg) | |
498 | Chatted(Player, msg) | |
499 | end) | |
500 | end | |
501 | ||
502 | Music = function(player, id) | |
503 | for i,v in next,workspace:GetChildren() do | |
504 | if v.ClassName == "Sound" then | |
505 | v.Volume = 0 | |
506 | v:Pause() | |
507 | v:Stop() | |
508 | wait() | |
509 | v:remove() | |
510 | end | |
511 | end | |
512 | for i,v in next,script:GetChildren() do | |
513 | if v.ClassName == "Sound" or v.Name == "Sound" then | |
514 | v.Volume = 0 | |
515 | v:Pause() | |
516 | v:Stop() | |
517 | wait() | |
518 | v:remove() | |
519 | end | |
520 | end | |
521 | local NS = Instance.new("Sound", script) | |
522 | NS.Parent = script | |
523 | NS.Pitch = 1 | |
524 | NS.Volume = 1 | |
525 | NS.Looped = true | |
526 | NS.SoundId = "rbxassetid://"..id | |
527 | wait() | |
528 | NS:Play() | |
529 | Output(player, "Now Playing: "..NS.Name.."!", "Deep orange") | |
530 | Output(player, "ID: "..tosting(id).."!", "Really blue") | |
531 | Output(player, "Creator: "..nil..".", "Really red") | |
532 | end | |
533 | ||
534 | function isException(player) | |
535 | if type(player) == 'userdata' then | |
536 | player = player.Name | |
537 | end | |
538 | for _,p in next,Enforcer.PriPeople do | |
539 | if p == player then return true end | |
540 | end | |
541 | return false | |
542 | end | |
543 | ||
544 | function GetTabletsPlayer(player) | |
545 | local returnTable = {} | |
546 | if type(player) == "userdata" then | |
547 | player = player.Name | |
548 | end | |
549 | for _,tab in next,Enforcer.Tablets do | |
550 | if tab.Player.Name == player then | |
551 | table.insert(returnTable, tab) | |
552 | end | |
553 | end | |
554 | return returnTable | |
555 | end | |
556 | ||
557 | function Rotate() | |
558 | rot=rot+0.650 | |
559 | --pcall(function() | |
560 | for _,Player in pairs(game:service'Players':GetPlayers()) do | |
561 | local Counter = 0 | |
562 | local PlayerTablets = {} | |
563 | for i,v in pairs(Enforcer.Tablets) do | |
564 | if v.Tab.Parent ~= nil and v.Player==Player then | |
565 | table.insert(PlayerTablets,v) | |
566 | end | |
567 | end | |
568 | ||
569 | ||
570 | local Start = CFrame.new(0,0,0) | |
571 | for I = 1, #PlayerTablets do | |
572 | local Pos = nil | |
573 | pcall(function() Pos = Player.Character.Torso.CFrame end) | |
574 | if Pos == nil then return end | |
575 | local Tab=PlayerTablets[I].Tab | |
576 | --local Tab2=PlayerTablets[I].Tab2 | |
577 | local i=I | |
578 | local Main = (I / #PlayerTablets - (.5 / #PlayerTablets) + rot/(#PlayerTablets/10)) * math.pi * 2 | |
579 | local x = math.sin(time()/#PlayerTablets + (math.pi*2)/#PlayerTablets*i) * (#PlayerTablets+3) | |
580 | local y = math.sin(tick()/.655) | |
581 | local z = math.cos(time()/#PlayerTablets + (math.pi*2)/#PlayerTablets*i) * (#PlayerTablets+3) | |
582 | local aPos = Vector3.new(x, y, z) + Pos.p | |
583 | local bPos = Tab.CFrame.p | |
584 | local cPos = (aPos * .1 + bPos * .9) | |
585 | Tab.CFrame = CFrame.new(cPos, Pos.p) | |
586 | local d=math.rad((rot*300)*math.pi); | |
587 | Tab.CFrame=CFrame.new(cPos,Pos.p)*CFrame.Angles(0,5.5,0) | |
588 | --Tab2.CFrame=CFrame.new(cPos,Pos.p)*CFrame.Angles(0,5.5,0) | |
589 | --//*CFrame.fromEulerAnglesXYZ(math.sin(time()+I/.6),math.sin(time()+I/.6),math.sin(time()+I/.6)) | |
590 | end | |
591 | end | |
592 | --end) | |
593 | end | |
594 | ||
595 | setCommand('Show Commands','cmds','Shows list of commands you can use.',0,function(plr, msg) | |
596 | Dismiss(plr) | |
597 | Output(plr, "All avaliable commands", "New Yeller", function() Dismiss(plr) showCommands(plr,getRank(plr)) end) | |
598 | for i = 0,5 do | |
599 | Output(plr, "Rank [" .. i .. "]".." commands", getColor(plr), function() Dismiss(plr) showCommands(plr, i) end) | |
600 | end | |
601 | Output(plr, "You are rank "..getRank(plr), "New Yeller") | |
602 | Output(plr, "Dismiss", "Bright red", function() Dismiss(plr) end) | |
603 | end) | |
604 | ||
605 | setCommand('Dismiss Tablets','dt','Dismisses tablets.',0,function(Speaker, Message) | |
606 | coroutine.resume(coroutine.create(function() | |
607 | if Message=='' or Message==' ' or Message=='me' or Message==nil or FindPlayers(Speaker,Message,false)=={Speaker} then | |
608 | Dismiss(Speaker) | |
609 | else | |
610 | if getRank(Speaker)>=3 then | |
611 | for _,p in next,FindPlayers(Speaker,Message) do | |
612 | Dismiss(p) | |
613 | end | |
614 | else | |
615 | Output(Speaker,'Your rank is too low to dismiss other tablets.','Really red') | |
616 | end | |
617 | end | |
618 | end)) | |
619 | end) | |
620 | ||
621 | setCommand('Dismiss All','dall','Dismisses everyones tablets.',3,function(plr,msg) | |
622 | for _,v in next,game:service'Players':GetPlayers() do | |
623 | Dismiss(v) | |
624 | end | |
625 | end) | |
626 | ||
627 | setCommand('Ping','p','Pings a message from tab.',1,function(plr, msg) | |
628 | Output(plr, msg, "Bright blue") | |
629 | end) | |
630 | ||
631 | setCommand('Kill','k','Kills a player.',1,function(plr, msg) | |
632 | for _,v in pairs(GetPlayers(plr, msg)) do | |
633 | if getRank(v) < getRank(plr) then | |
634 | v.Character:BreakJoints() | |
635 | Output(plr,'Killed '..v.Name..'.',getColor(plr)) | |
636 | else | |
637 | Output(plr,v.Name..' is ranked higher than you.',getColor(plr)) | |
638 | end | |
639 | end | |
640 | end) | |
641 | ||
642 | setCommand('Ping all','pall','Pings a message to everyone.',2,function(plr, msg) | |
643 | for _,v in next,game:service'Players':GetPlayers() do | |
644 | Output(v, msg, getColor(plr)) | |
645 | end | |
646 | end) | |
647 | ||
648 | setCommand('Dev mode','dev','Disallows players under rank 5 from using commands.',5,function(plr) | |
649 | Enforcer.Settings.DevMode = true; | |
650 | Output(plr,'Developer mode enabled.', 'Lime green') | |
651 | end) | |
652 | ||
653 | setCommand('Private Server','pri','Disallows players from joining the game.',3,function(plr) | |
654 | Enforcer.Settings.PrivateServer = not Enforcer.Settings.PrivateServer | |
655 | Output(plr,'Private server set to '..tostring(Enforcer.Settings.PrivateServer)..'.',getColor(plr)) | |
656 | end) | |
657 | ||
658 | setCommand('Age Restriction','agepri','Disallows players under a certain age from joining.',3,function(plr) | |
659 | Enforcer.Settings.AgeRestriction = not Enforcer.Settings.AgeRestriction | |
660 | Output(plr,'Age restriction set to '..tostring(Enforcer.Settings.AgeRestriction)..'.', getColor(plr)) | |
661 | end) | |
662 | ||
663 | setCommand('Minimum Age','minage','Sets the minimun age for the age restriction.',3,function(plr,msg) | |
664 | Enforcer.Settings.MinimumAge = tonumber(msg) | |
665 | Output(plr,'Minimum age is now '..msg..'.',getColor(plr)) | |
666 | end) | |
667 | ||
668 | setCommand('Tab Size','tabsize','Changes the size of the tablets.',2,function(plr,msg) | |
669 | if msg:lower() == "flat" then setTabSize(.2,4,3,plr) | |
670 | elseif msg:lower() == "cube" then setTabSize(2.2,2.2,2.2,plr) end | |
671 | end) | |
672 | ||
673 | setCommand('Tab Neon','tabneon','Enables/Disables the neon effect on tablets.',2,function(plr) | |
674 | Enforcer.TabSettings.Neon = not Enforcer.TabSettings.Neon | |
675 | for _,tab in next,Enforcer.Tablets do | |
676 | if Enforcer.TabSettings.Neon then | |
677 | tab.Tab.Material = 'Neon' | |
678 | else | |
679 | tab.Tab.Material = 'SmoothPlastic' | |
680 | end | |
681 | end | |
682 | end) | |
683 | ||
684 | setCommand('Wires','wires','Enables/Disables the wires.',2,function(plr) | |
685 | Enforcer.TabSettings.Wires = not Enforcer.TabSettings.Wires | |
686 | Output(plr,'Wires set to '..tostring(Enforcer.TabSettings.Wires),getColor(plr)) | |
687 | end) | |
688 | ||
689 | setCommand('Kick','kick','Kicks a player from game.',4,function(plr, msg) | |
690 | for _,v in pairs(GetPlayers(plr, msg)) do | |
691 | if getRank(v) < getRank(plr) then | |
692 | Kick(game:service'Players'[v.Name]) | |
693 | Output(p,'Kicked '..v.Name..'.',getColor(plr)) | |
694 | else | |
695 | Output(p,v.Name..' is ranked higher than you.',getColor(plr)) | |
696 | end | |
697 | end | |
698 | end) | |
699 | ||
700 | setCommand('Ban','ban','Bans a player from game.',4,function(plr, msg) | |
701 | for _,v in pairs(GetPlayers(plr, msg)) do | |
702 | if getRank(v) < getRank(plr) then | |
703 | Kick(game:service'Players'[v.Name]) | |
704 | setRank(v,-1) | |
705 | Output(plr,'Banned '..v.Name..'.',getColor(plr)) | |
706 | else | |
707 | Output(plr,v.Name..' is ranked higher than you.',getColor(plr)) | |
708 | end | |
709 | end | |
710 | end) | |
711 | ||
712 | setCommand('Players','plrs','View all the players.',3,function(plr, msg) | |
713 | Dismiss(plr) | |
714 | for i,v in pairs(game:service'Players':GetPlayers()) do | |
715 | Output(plr, v.Name, getColor(plr), function() Dismiss(plr) | |
716 | Output(plr, "Name: "..v.Name, "New Yeller") | |
717 | Output(plr, "Rank: "..tostring(getRank(v), "Bright blue")) | |
718 | Output(plr, "Color: "..tostring(getColor(v),getColor(v))) | |
719 | Output(plr, "Description: "..getDesc(v), getColor(v)) | |
720 | Output(plr, "Account Age: "..v.AccountAge, "Really red") | |
721 | Output(plr, "User ID: "..v.userId,"Really blue") | |
722 | Output(plr, "Kick", "Really red", function() Dismiss(plr) Kick(game:service'Players'[v.Name]) end) | |
723 | Output(plr, "Set rank", "Really blue", function() Dismiss(plr) | |
724 | Output(plr, "Rank [1] ", "Lime green", function() Dismiss(plr) setRank(v, 1) end) | |
725 | Output(plr, "Rank [2] ", "Really red", function() Dismiss(plr) setRank(v, 2) end) | |
726 | Output(plr, "Rank [3] ", "New Yeller", function() Dismiss(plr) setRank(v, 3) end) -- bcuz rank 3 command | |
727 | if getRank(plr) >= 4 then Output(plr, "Rank [4] ", "Hot pink", function() Dismiss(plr) setRank(v, 4) end) | |
728 | Output(plr, "Rank [5] ", "Really blue", function() Dismiss(plr) setRank(v, 5) end) end | |
729 | end) | |
730 | Output(plr, "Set color", "New Yeller", function() Dismiss(plr) | |
731 | Output(plr, "Set color to Royal purple", "Royal purple", function() Dismiss(plr) setColor(v, "Royal purple") end) | |
732 | Output(plr, "Set color to new yeller", "New Yeller", function() Dismiss(plr) setColor(v, "New Yeller") end) | |
733 | Output(plr, "Set color to Really red", "Really red", function() Dismiss(plr) setColor(v, "Really red") end) | |
734 | Output(plr, "Set color to Really blue", "Really blue", function() Dismiss(plr) setColor(v, "Really blue") end) | |
735 | Output(plr, "Set color to White.", "White", function() Dismiss(plr) setColor(v, "White") end) | |
736 | Output(plr, "Set color to Hot pink", "Hot pink", function() Dismiss(plr) setColor(v, "Hot pink") end) | |
737 | end) | |
738 | end) | |
739 | end | |
740 | Output(plr, "Dismiss", "Really red", function() Dismiss(game:service'Players'[plr.Name]) end) | |
741 | end) | |
742 | ||
743 | setCommand('Explore','expl','Explores from the tablets.',3,function(plr, msg) | |
744 | Explore(plr) | |
745 | end) | |
746 | ||
747 | setCommand('Remove','r','Removes Enforcer admin.',5,function(plr, msg) | |
748 | script.Disabled = true | |
749 | setfenv(1,{script:Destroy()}) | |
750 | script:Destroy() | |
751 | end) | |
752 | ||
753 | setCommand('Ranked','ranked','Opens the rank menu.',1,function(plr, msg) | |
754 | Dismiss(plr) | |
755 | for i,v in pairs(Enforcer.Ranked) do | |
756 | Output(plr, v.Name, getColor(v), function() Dismiss(plr) | |
757 | Output(plr, "Name: "..v.Name, "New Yeller") | |
758 | Output(plr, "Rank: "..tostring(getRank(v), "Hot pink")) | |
759 | Output(plr, "Color: "..tostring(getColor(v),getColor(v))) | |
760 | Output(plr, "Description: "..getDesc(v), getColor(v)) | |
761 | end) | |
762 | end | |
763 | end) | |
764 | ||
765 | setCommand('Music','ms','Plays a song/music/id.',2,function(plr, msg) | |
766 | Musi(plr, msg) | |
767 | end) | |
768 | ||
769 | setCommand('Stop Music','sm','Removes all sounds from workspace.',2,function(plr) | |
770 | StopMusic() | |
771 | Output(plr,'Stopped music.',getColor(plr)) | |
772 | end) | |
773 | ||
774 | setCommand('Set color','sc','Sets your own color.',1,function(plr, msg) | |
775 | setColor(plr,msg) | |
776 | Output(plr, "Your color is now:\n"..tostring(getColor(plr)), getColor(plr)) | |
777 | end) | |
778 | ||
779 | setCommand('Sound search','ss','Searches ROBLOX for music.',1,function(plr, msg) | |
780 | SoundSearch(plr, msg) | |
781 | end) | |
782 | ||
783 | setCommand('Help','help','Displays Enforcer help list.',0,function(plr, msg) | |
784 | Output(plr, "Created by PeroxDevelopment, ApexDevelopment.", "Royal purple") | |
785 | Output(plr, "Your current rank:\n"..getRank(plr), "Bright red") | |
786 | Output(plr, "For list of cmds avalible to your rank click this tablet.", "New Yeller", function() Dismiss(plr) | |
787 | Chatted(plr, Enforcer.Bet.. " cmds " ..Enforcer.Bet) | |
788 | end) | |
789 | Output(plr, "This is the help menu. Click a tablet for more information.", "Lime green") | |
790 | end) | |
791 | ||
792 | setCommand('Make message','m','Makes the message from screen.',2,function(plr, msg) | |
793 | makeMessage(" [ " .. plr.Name .. " ] " ..msg,Enforcer.Services.Workspace) | |
794 | end) | |
795 | ||
796 | for _,Player in next,game:service'Players':GetPlayers() do | |
797 | if getRank(Player) == -1 or (Enforcer.Settings.AgeRestriction and Player.accountAge < Enforcer.Settings.MinimumAge and not isException(Player)) or (Enforcer.Settings.PrivateServer and not isException(Player)) then Kick(Player) return end | |
798 | Connect(Player) | |
799 | end | |
800 | ||
801 | game.Players.PlayerAdded:connect(function(Player) | |
802 | if getRank(Player) == -1 or (Enforcer.Settings.AgeRestriction and Player.accountAge < Enforcer.Settings.MinimumAge and not isException(Player)) or (Enforcer.Settings.PrivateServer and not isException(Player)) then Kick(Player) return end | |
803 | Connect(Player) | |
804 | end) | |
805 | ||
806 | Oxchat('[Enforcer]','Enforcer has loaded.') | |
807 | Oxchat('[Enforcer]','Made by PeroxDevelopment and ApexDevelopment.') | |
808 | ||
809 | game:service'RunService'.Stepped:connect(Rotate) | |
810 | --game:service'RunService'.Stepped:connect(WirePart) |