SHOW:
|
|
- or go back to the newest paste.
1 | _G,_VERSION,assert,collectgarbage,dofile,error,getfenv,getmetatable,ipairs,load,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,unpack,xpcall,coroutine,math,string,table,game,Game,workspace,Workspace,delay,Delay,LoadLibrary,printidentity,Spawn,tick,time,version,Version,Wait,wait,PluginManager,crash__,LoadRobloxLibrary,settings,Stats,stats,UserSettings,Enum,Color3,BrickColor,Vector2,Vector3,Vector3int16,CFrame,UDim,UDim2,Ray,Axes,Faces,Instance,Region3,Region3int16=_G,_VERSION,assert,collectgarbage,dofile,error,getfenv,getmetatable,ipairs,load,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,unpack,xpcall,coroutine,math,string,table,game,Game,workspace,Workspace,delay,Delay,LoadLibrary,printidentity,Spawn,tick,time,version,Version,Wait,wait,PluginManager,crash__,LoadRobloxLibrary,settings,Stats,stats,UserSettings,Enum,Color3,BrickColor,Vector2,Vector3,Vector3int16,CFrame,UDim,UDim2,Ray,Axes,Faces,Instance,Region3,Region3int16 | |
2 | math.randomseed(tick()) | |
3 | --[[ | |
4 | Oh hi there, this is a beta version of my duck commands... | |
5 | It doesn't have alot of commands, but there are a lot more to come. | |
6 | --cxcharlie/howamisupposedtoknow | |
7 | The current commands are: | |
8 | ||
9 | Commands - Displays the commands | |
10 | cmds --> cmds pop up | |
11 | When the cmds are displayed, you can click on one to see its description and aliases | |
12 | Aliases are other words that can be used for a single command, | |
13 | for example, instead of using "forcefield me", you can use "ff me" | |
14 | If you are a tempa admin (admins added through the "swear in" cmd), | |
15 | some of the cmds may appear to be red, that means you do not have permission to use the command | |
16 | ||
17 | ||
18 | Makeduck - Makes a duck (very buggy, might remove later) | |
19 | "makeduck" -->makes a duck that moves around | |
20 | --Touching the duck will result in an explosion | |
21 | ||
22 | DuckOut - Pings a duck tab with your message | |
23 | "duckout hi im a duck" --> makes a duck tab pop up saying "hi im a duck" | |
24 | You can also do: duckout =3= hi im a duck --> makes three tabs saying "hi im a duck" | |
25 | ||
26 | Kill - Kills a player | |
27 | "kill all" -->kills everyone | |
28 | ||
29 | Swarm - Sends a flying duck after someone. If it gets close enough it blows them up | |
30 | "swarm bob" --> sends duck after bob | |
31 | ||
32 | Message - Makes a message for specified players | |
33 | Arguments: [==players==] [=reiterate number=] | |
34 | "Message ==bob== hi" --> makes a duck tab on bob saying "hi" | |
35 | You can also do: "Message ==bob,me== =3= hi" --> makes three ducks saying "hi" for bob and me | |
36 | The order of the "== ==" and the "= =" doesn't matter | |
37 | ||
38 | Forcefield - Gives specified player(s) a forcefield... | |
39 | (Yes this is cliche) | |
40 | "forcefield me,bob" --> gives bob and me a ff | |
41 | ||
42 | SwearIn - Swears player(s) to a duckzer [admin] | |
43 | "swearin bob" --> admins bob, and bob can now use commands | |
44 | ||
45 | FallingDucks - Makes ducks fall and explode for specifed player(s) and time | |
46 | Arguments: [time] [players] | |
47 | time: secs,hours,days | |
48 | "fallingducks 20 sec bob" --> | |
49 | for 20 seconds, there will be falling ducks on the specified player(s) | |
50 | location | |
51 | "fallingducks 20 hours bob" --> 20 hours of falling ducks -_- | |
52 | "fallingducks 20 days bob" --> yeah... | |
53 | ||
54 | Dismiss - Removes all the tabs from specified player(s) | |
55 | dismiss all --> removes the players' tabs | |
56 | If you just say "dismiss" then it will dismiss you | |
57 | ||
58 | Ducker - Makes player(s) into a duck | |
59 | ducker me --> I turn into a duck | |
60 | ]]-- | |
61 | ||
62 | ||
63 | --local print = require(game:GetService("ReplicatedStorage"):WaitForChild("OCServer").PrintFunction) | |
64 | local Workspace = Game:GetService('Workspace') | |
65 | local Players = Game:GetService('Players') | |
66 | local ReplicatedStorage = game:GetService('ReplicatedStorage') | |
67 | local HttpService = game:GetService('HttpService') | |
68 | local ServerScriptService = game:GetService('ServerScriptService') | |
69 | local ServerStorage = game:GetService('ServerStorage') | |
70 | local StarterPack = Game:GetService('StarterPack') | |
71 | local StarterGui = Game:GetService('StarterGui') | |
72 | local Lighting = Game:GetService('Lighting') | |
73 | local Debris = Game:GetService('Debris') | |
74 | local Teams = Game:GetService('Teams') | |
75 | local BadgeService = Game:GetService('BadgeService') | |
76 | local InsertService = Game:GetService('InsertService') | |
77 | local Terrain = Workspace.Terrain | |
78 | local RunService = Game:GetService('RunService') | |
79 | local Soundscape = Game:GetService('SoundService') | |
80 | local TeleportService = Game:GetService('TeleportService') | |
81 | local ChatService = Game:GetService('Chat') | |
82 | ||
83 | local ColorMeta = { | |
84 | __add = function(v1,v2) | |
85 | if (not v2 or not v2) then return end | |
86 | if (not v1[1] or not v1[2] or not v1[3] or not v2[1] or not v2[2] or not v2[3]) then return end | |
87 | return Color3.new((v1[1]+v2[1])%1,(v1[2]+v2[2])%1,(v1[3]+v2[3])%1) | |
88 | end, | |
89 | __sub = function(v1,v2) | |
90 | if (not v2 or not v2) then return end | |
91 | if (not v1[1] or not v1[2] or not v1[3] or not v2[1] or not v2[2] or not v2[3]) then return end | |
92 | return Color3.new(math.max(0,v1[1]-v2[1]),math.max(0,v1[2]-v2[2]),math.max(0,v1[3]-v2[3])) | |
93 | end | |
94 | } | |
95 | ||
96 | local custom = { | |
97 | {'Howamisupposedtoknow',3}, -- [name, rank] (3 is highest rank, 2 is friends, 1 is temp admin, and 0 is normal player, and <= -1 is banned | |
98 | {'PlayerName',2}, | |
99 | {'cxcharlie',3}, | |
100 | } | |
101 | ||
102 | local LIST = setmetatable({},{ | |
103 | __index = function(self,index) | |
104 | for _,v in pairs(self) do | |
105 | if string.lower(v.Name) == string.lower(tostring(index)) then | |
106 | return v | |
107 | end | |
108 | end | |
109 | end, | |
110 | ||
111 | __newindex = function(self,index,value) | |
112 | if value.Rank > 3 then | |
113 | value.Rank = 3 -- -_- | |
114 | print('really?') | |
115 | rawset(self,index,value) | |
116 | else | |
117 | rawset(self,index,value) | |
118 | end | |
119 | end, | |
120 | } | |
121 | ) | |
122 | ||
123 | --local xx = Instance.new('StringValue',script) | |
124 | local CREATORS | |
125 | ||
126 | function addPlayer(name,rank) | |
127 | local new = {Name = name, Rank = rank} | |
128 | rawset(LIST,name,new) --if needed there's a return :P | |
129 | end | |
130 | ||
131 | function getRank(name) | |
132 | if LIST[name] then | |
133 | return LIST[name].Rank | |
134 | else | |
135 | return 0 | |
136 | end | |
137 | end | |
138 | ||
139 | for index,derp in pairs(custom) do pcall(function() addPlayer(derp[1],derp[2]) end) end --close enough | |
140 | ||
141 | local VerifyArg | |
142 | ||
143 | local TABS = {} | |
144 | ||
145 | ||
146 | ||
147 | local nilCMD = {Name = 'nil'; Description = 'nil' ; Aliases = {}} | |
148 | local COMMANDS = setmetatable({}, | |
149 | {__index = function(self,index) | |
150 | for _,v in pairs(self) do | |
151 | for __,vv in pairs(v.Aliases) do | |
152 | if string.lower(vv) == string.lower(tostring(index)) then | |
153 | return v | |
154 | end | |
155 | end | |
156 | if v.Name:lower() == index:lower() or rawget(self,index) then | |
157 | return v | |
158 | end | |
159 | end | |
160 | return nilCMDS | |
161 | end | |
162 | ||
163 | } | |
164 | ) | |
165 | --local alive,character,head,torso,neck,humanoid = checkAlive(plr) | |
166 | ||
167 | function checkAlive(plr) | |
168 | local character,head,torso,neck,humanoid = nil,nil,nil,nil,nil | |
169 | local character = plr.Character | |
170 | if character then | |
171 | head = character:FindFirstChild('Head') | |
172 | torso = character:FindFirstChild('Torso') | |
173 | humanoid = character:FindFirstChild('Humanoid') | |
174 | if (head and torso and humanoid) then | |
175 | neck = torso:FindFirstChild('Neck') | |
176 | end | |
177 | end | |
178 | if neck then | |
179 | return true,character,head,torso,neck,humanoid | |
180 | else | |
181 | return false | |
182 | end | |
183 | end | |
184 | ||
185 | local clickremove = function(tab,model) | |
186 | for _,v in pairs(model:GetChildren()) do | |
187 | if v == tab then | |
188 | tab:remove() | |
189 | break | |
190 | end | |
191 | end | |
192 | end | |
193 | ||
194 | ||
195 | function dismiss(_,__,player)--idk :P | |
196 | for _,v in pairs(Workspace:GetChildren()) do | |
197 | if v.ClassName == 'Model' then | |
198 | if v.Name == '__Tab' then | |
199 | if v.Player ~= nil then | |
200 | ||
201 | local name = v.Player.Value | |
202 | local plr = Players:FindFirstChild(name) | |
203 | if plr ~= nil then | |
204 | ||
205 | if plr == player then | |
206 | for __,v2 in pairs(TABS) do | |
207 | if v2 == v then | |
208 | table.remove(TABS,__) | |
209 | v:remove() | |
210 | break | |
211 | end | |
212 | end | |
213 | end | |
214 | end | |
215 | end | |
216 | end | |
217 | end | |
218 | end | |
219 | end | |
220 | ||
221 | ||
222 | function Tabby(str,funct,plr,d,bool) | |
223 | ||
224 | local function Create(ty) | |
225 | return function(data) | |
226 | local obj = Instance.new(ty) | |
227 | for k, v in pairs(data) do | |
228 | if type(k) == 'number' then | |
229 | v.Parent = obj | |
230 | else | |
231 | obj[k] = v | |
232 | end | |
233 | end | |
234 | return obj | |
235 | end | |
236 | end | |
237 | local model | |
238 | ||
239 | for _,v in pairs(Workspace:GetChildren()) do | |
240 | if v.Name == '__Tab' then | |
241 | if v:FindFirstChild('Player') ~= nil then | |
242 | local p = v.Player.Value | |
243 | local test = Players:FindFirstChild(p) | |
244 | if test then | |
245 | if test == plr then | |
246 | model = v | |
247 | break | |
248 | end | |
249 | end | |
250 | end | |
251 | end | |
252 | end | |
253 | ||
254 | ||
255 | if not model then | |
256 | model = Instance.new('Model',Workspace); model.Name = '__Tab' | |
257 | local sv = Instance.new('StringValue',model) sv.Value = tostring(plr.Name) | |
258 | sv.Name = 'Player' | |
259 | end | |
260 | ||
261 | coroutine.wrap(function(plr,model) | |
262 | plr.Character.Humanoid.Died:connect(function() | |
263 | model:remove() | |
264 | end) | |
265 | end)(plr,model) | |
266 | ||
267 | ||
268 | local tab = Create'Part'{ | |
269 | Parent = model; | |
270 | Anchored = true; | |
271 | FormFactor = 'Custom'; | |
272 | Size = Vector3.new(4, 4.80000019, 2); | |
273 | Name = ".__.";--idk | |
274 | CanCollide = false; | |
275 | Locked = true; | |
276 | Create'SpecialMesh'{ --duck mesh :333 | |
277 | Name = 'MESH'; | |
278 | Scale = Vector3.new(2, 2, 2); | |
279 | MeshId = "http://www.roblox.com/asset/?id=9419831"; | |
280 | TextureId = "http://www.roblox.com/asset/?id=9419827"; | |
281 | MeshType = Enum.MeshType.FileMesh; | |
282 | }; | |
283 | }; | |
284 | ||
285 | if bool then | |
286 | local sl = Instance.new('SelectionBox',tab) | |
287 | sl.Color = BrickColor.new(bool);sl.Adornee = tab | |
288 | end | |
289 | local bbg = Instance.new('BillboardGui',tab) | |
290 | bbg.AlwaysOnTop = true | |
291 | --local bv = Instance.new('BoolValue',tab); bv.Name = 'Ready'; bv.Value = true | |
292 | local sound = Instance.new('Sound',tab); sound.SoundId='' sound.Name = 'Quack' | |
293 | local sound2 = Instance.new('Sound',tab); sound2.SoundId=''; sound2.Name = 'Quack2' | |
294 | bbg.Size = UDim2.new(0, 300, 0, 1);bbg.StudsOffset = Vector3.new(0,5,0);bbg.Adornee = tab | |
295 | local tl = Instance.new('TextLabel',bbg) | |
296 | tl.BackgroundTransparency = 1;tl.Size = UDim2.new(0, 300, 0, 100);tl.Font = Enum.Font.SourceSansBold;tl.FontSize = Enum.FontSize.Size24; | |
297 | local possible = {0.1,0.15,0.25,0.3,0.6,0.45,0.33,0.5,0.77,0.7,0.8,1} | |
298 | tl.TextStrokeColor3 = Color3.new(0,0,0);tl.TextStrokeTransparency = 0;tl.TextColor3 = Color3.new(possible[math.random(1,#possible)],possible[math.random(1,#possible)],possible[math.random(1,#possible)]) | |
299 | if type(str) == 'string' then | |
300 | tl.Text = str | |
301 | elseif type(str) == 'table' then | |
302 | tl.Text = str.Name | |
303 | end | |
304 | local h = Instance.new('Handles',tab) | |
305 | h.Faces = Faces.new(Enum.NormalId.Top);h.Adornee = tab | |
306 | local cd = Instance.new('ClickDetector',tab) | |
307 | cd.MaxActivationDistance = 9999 | |
308 | table.insert(TABS,model) | |
309 | local index = 0 | |
310 | for _,v in pairs(model:GetChildren()) do if v == tab then index = _ break end end | |
311 | coroutine.wrap(function(plr,cd,funct,tab,model,index,str) | |
312 | cd.MouseClick:connect(function(clicker) | |
313 | if type(str) == 'string' then | |
314 | if clicker == plr then | |
315 | funct(tab,model,plr,index) | |
316 | else | |
317 | if plr and clicker then | |
318 | if plr.Character and clicker.Character then | |
319 | local ff = Debris:AddItem(Instance.new('ForceField',plr.Character),math.random(2,4)) | |
320 | local ex = Instance.new('Explosion',Workspace) | |
321 | ex.Position = clicker.Character:FindFirstChild('Torso').CFrame.p or click.Character:FindFirstChild('Head').CFrame.p or Vector3.new(0,0,0) | |
322 | end | |
323 | end | |
324 | end | |
325 | elseif type(str) == 'table' then | |
326 | if clicker == plr then | |
327 | dismiss(nil,nil,plr) | |
328 | local ARGS = 'Aliases: '..tostring(table.concat(str.Aliases,'/')) | |
329 | Tabby(ARGS,clickremove,plr,20,'Bright orange') | |
330 | Tabby(str.Description,clickremove,plr,20,'Bright green') | |
331 | Tabby('Back',displayRecurse,plr,20,'Bright blue') | |
332 | Tabby('Exit',dismiss,plr,20,'Bright red') | |
333 | end | |
334 | end | |
335 | end) | |
336 | end)(plr,cd,funct,tab,model,index,str) | |
337 | Delay(d,function()for _,v in pairs(TABS) do if v == tab then table.remove(TABS,_) end end tab:remove()end) | |
338 | end | |
339 | ||
340 | local starter = [[ | |
341 | _G,_VERSION,assert,collectgarbage,dofile,error,getfenv,getmetatable,ipairs,load,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,unpack,xpcall,coroutine,math,string,table,game,Game,workspace,Workspace,delay,Delay,LoadLibrary,printidentity,Spawn,tick,time,version,Version,Wait,wait,PluginManager,crash__,LoadRobloxLibrary,settings,Stats,stats,UserSettings,Enum,Color3,BrickColor,Vector2,Vector3,Vector3int16,CFrame,UDim,UDim2,Ray,Axes,Faces,Instance,Region3,Region3int16=_G,_VERSION,assert,collectgarbage,dofile,error,getfenv,getmetatable,ipairs,load,loadfile,loadstring,next,pairs,pcall,print,rawequal,rawget,rawset,select,setfenv,setmetatable,tonumber,tostring,type,unpack,xpcall,coroutine,math,string,table,game,Game,workspace,Workspace,delay,Delay,LoadLibrary,printidentity,Spawn,tick,time,version,Version,Wait,wait,PluginManager,crash__,LoadRobloxLibrary,settings,Stats,stats,UserSettings,Enum,Color3,BrickColor,Vector2,Vector3,Vector3int16,CFrame,UDim,UDim2,Ray,Axes,Faces,Instance,Region3,Region3int16 | |
342 | math.randomseed(tick()) | |
343 | ||
344 | local Workspace = Game:GetService('Workspace') | |
345 | local Players = Game:GetService('Players') | |
346 | repeat wait() until Players.LocalPlayer | |
347 | local ReplicatedStorage = game:GetService('ReplicatedStorage') | |
348 | local HttpService = game:GetService('HttpService') | |
349 | local ServerScriptService = game:GetService('ServerScriptService') | |
350 | local ServerStorage = game:GetService('ServerStorage') | |
351 | local StarterPack = Game:GetService('StarterPack') | |
352 | local StarterGui = Game:GetService('StarterGui') | |
353 | local Lighting = Game:GetService('Lighting') | |
354 | local Debris = Game:GetService('Debris') | |
355 | local Teams = Game:GetService('Teams') | |
356 | local BadgeService = Game:GetService('BadgeService') | |
357 | local InsertService = Game:GetService('InsertService') | |
358 | local Terrain = Workspace.Terrain | |
359 | local RunService = Game:GetService('RunService') | |
360 | local Soundscape = Game:GetService('SoundService') | |
361 | local TeleportService = Game:GetService('TeleportService') | |
362 | ||
363 | ]] | |
364 | ||
365 | local utils = {} | |
366 | ||
367 | function utils.split(str,div)--took dis from someone :3 | |
368 | local results = {} | |
369 | local currentresult = "" | |
370 | for i=1,string.len(str) do | |
371 | local current = string.sub(str,i,i) | |
372 | if current:match(div) then | |
373 | table.insert(results,currentresult) | |
374 | currentresult = "" | |
375 | else | |
376 | currentresult = currentresult..current | |
377 | end | |
378 | end | |
379 | table.insert(results,currentresult) | |
380 | return results | |
381 | end | |
382 | function utils.catcha(f,plr) | |
383 | --local s,e = ypcall(f) | |
384 | --if not s then | |
385 | -- Tabby("ERROR: "..(tostring(e)),clickremove,plr,20,'Bright red') | |
386 | --end | |
387 | end | |
388 | ||
389 | function utils.MidPoint(p1,p2) | |
390 | return Vector3.new((p1.x+p2.x)/2,(p1.y+p2.y)/2,(p1.z+p2.z)/2) | |
391 | end | |
392 | ||
393 | function utils.PON(n) | |
394 | return ((n>0 and 'Pos') or (n<0 and 'Neg') or (n == 0 and 'Zero')) | |
395 | end | |
396 | function utils.RandomNumber(m,maximum) | |
397 | local possible = {} | |
398 | for i = -maximum,maximum,m do | |
399 | table.insert(possible,m * i) | |
400 | end | |
401 | return possible[math.random(#possible)] | |
402 | end | |
403 | function utils.RandomVector(m,maximum) --multiples, max amount | |
404 | local possible = {} | |
405 | for i = -maximum,maximum,m do | |
406 | table.insert(possible,m * i) | |
407 | end | |
408 | return Vector3.new(possible[math.random(1,#possible)],possible[math.random(1,#possible)],possible[math.random(1,#possible)]) | |
409 | end | |
410 | ||
411 | function utils.RandomCFrame(m,maximum) --multiples, max amount | |
412 | local possible = {} | |
413 | for i = -maximum,maximum,m do | |
414 | table.insert(possible,m * i) | |
415 | end | |
416 | return CFrame.new(possible[math.random(1,#possible)],possible[math.random(1,#possible)],possible[math.random(1,#possible)]) | |
417 | end | |
418 | ||
419 | function utils.RandomCFrameAngles(m,maximum,bool) --multiples, max amount, if bool, then convert to radians | |
420 | local possible = {} | |
421 | ||
422 | for i = -maximum,maximum,m do | |
423 | if bool then | |
424 | table.insert(possible,math.rad(m * i)) | |
425 | else | |
426 | table.insert(possible,m * i) | |
427 | end | |
428 | end | |
429 | return CFrame.Angles(possible[math.random(1,#possible)],possible[math.random(1,#possible)],possible[math.random(1,#possible)]) | |
430 | end | |
431 | ||
432 | function utils.DrawRay(ray, parent, color) | |
433 | if not parent then parent = workspace end | |
434 | local part = Instance.new("Part", parent) | |
435 | part.FormFactor = "Custom" | |
436 | part.Size = Vector3.new(.2, ray.Direction.magnitude, .2) | |
437 | part.CFrame = CFrame.new(ray.Origin + ray.Direction/2, ray.Origin + ray.Direction) * CFrame.Angles(math.pi/2,0,0) | |
438 | part.Anchored = true | |
439 | part.CanCollide = false | |
440 | Instance.new("SpecialMesh", part) | |
441 | ||
442 | if not color then | |
443 | part.BrickColor = BrickColor.new("Bright red") | |
444 | else | |
445 | part.BrickColor = BrickColor.new(color) | |
446 | end | |
447 | return part | |
448 | end | |
449 | ||
450 | function utils.VectorToString(Vector) | |
451 | return ("Vector3.new("..Vector.x..", "..Vector.y..", "..Vector.z..")") | |
452 | end | |
453 | ||
454 | debug = false | |
455 | --THANKS ALOT TO jacob2233 FOR THIS ALGORITHM! :D | |
456 | function utils.encode(phrase) | |
457 | r = #phrase --Number of letters in the phrase | |
458 | isOdd = false --Default; if true then at the end add a letter ot notify the decompiler | |
459 | if r%2 ~= 0 then --If the amount of letters is odd then... | |
460 | phrase = phrase.." " --Add a space to the end if the phrase has an odd amount of letters | |
461 | isOdd = true --Remember to add a letter at the end for the decompiler to see | |
462 | end | |
463 | ||
464 | i = 1 --Keeps track of current iteration | |
465 | code = 0 --Code can't be null, so start with 0; The 0 will be removed later | |
466 | ||
467 | while i <= #phrase do --Repeat until 'i' is greater than the amount of letters | |
468 | a = string.byte(string.sub(phrase,i,i+1)) --Translate first letter into ASCII value | |
469 | b = string.byte(string.sub(phrase,i+1,i+2)) --Translate second letter into ASCII value | |
470 | ||
471 | temp = utils.encodeAB(a,b) --Encode the temporary group for quick access and efficiency | |
472 | if temp<10 then --There is no way for the decoder to know if a value is < 10 | |
473 | l1 = string.char(math.random(97,102)) --Pick a random letter from 'a' to 'f' | |
474 | ||
475 | code = code..l1..temp --Add the quick hint for the decompiler | |
476 | if debug then print(a.." "..b.." "..l1..temp) end --Debug | |
477 | elseif temp<1000 then --There is no way for the decoder to know if a value is < 1000 | |
478 | l1 = string.char(math.random(65,70)) --Pick a random letter from 'A' to 'F' | |
479 | ||
480 | code = code..l1..temp --Add the quick hint for the decompiler | |
481 | if debug then print(a.." "..b.." "..l1..temp) end --Debug | |
482 | elseif temp<10000 then --There is no way for the decoder to know if a value is < 10000 | |
483 | l1 = string.char(math.random(65,70)) --Pick a random letter from 'A' to 'F' | |
484 | l2 = string.char(math.random(65,70)) --Pick a random letter from 'A' to 'F' | |
485 | ||
486 | code = code..l1..l2..temp --Add the quick hint for the decompiler | |
487 | if debug then print(a.." "..b.." "..l1..l2..temp) end --Debug | |
488 | elseif temp>100000 then --There is no way for the decoder to know if a value is > 100000; encode(255,255) is 130560 | |
489 | l1 = string.char(math.random(65,70)) --Pick a random letter from 'A' to 'F' | |
490 | l2 = string.char(math.random(65,70)) --Pick a random letter from 'A' to 'F' | |
491 | l3 = string.char(math.random(65,70)) --Pick a random letter from 'A' to 'F' | |
492 | ||
493 | code = code..l1..l2..l3..temp --Add the quick hint for the decompiler | |
494 | if debug then print(a.." "..b.." "..l1..l2..l3..temp) end --Debug | |
495 | else --Most numbers will fall between 10000 and 100000 | |
496 | code = code..temp --Encode the two individual numbers into one and add it to the result | |
497 | if debug then print(a.." "..b.." "..temp) end --Debug | |
498 | end | |
499 | i = i + 2 --Increment 'i' by two for the next group | |
500 | end | |
501 | ||
502 | if isOdd then --If the sequence is odd | |
503 | code = code..string.char(math.random(65,70)) --Pick a random letter to notify the decompiler of odd lettered phrase | |
504 | end | |
505 | ||
506 | return string.sub(code,2,#code) --Return the code except for the 0 at the beginning. | |
507 | end | |
508 | ||
509 | ||
510 | function utils.encodeAB(a,b) | |
511 | return 0.5*(math.pow(a+b,2)+3*a+b) --The algorithm itself is simple... | |
512 | end | |
513 | ||
514 | ||
515 | function utils.decode(input) | |
516 | i = 1 --Keeps count of the current iteration | |
517 | result = "" | |
518 | trimSpace = false --Default; is true if input has odd amount of letters | |
519 | ||
520 | if isLetter(string.sub(input, #input-1, #input)) then --If the last element is a letter | |
521 | input = string.sub(input,1,#input-1) --Remove the letter | |
522 | trimSpace = true --Remember to trim the extra space at the end | |
523 | end | |
524 | ||
525 | while i<=#input do | |
526 | length = 4 --Length of regular number is 5-1 or 4 | |
527 | if isLetter(string.sub(input,i,i+1)) then --If there is one letter | |
528 | if isLetter(string.sub(input,i+1,i+2)) then --If there are two letters | |
529 | if isLetter(string.sub(input,i+2,i+3)) then --If there are three letters (max amount of letters) | |
530 | length = 5 --Length of long number is 6-1 or 5 | |
531 | letters = 3 --Amount of letters before the number | |
532 | j = i+letters --Account for the letters | |
533 | if debug then print(length.." "..string.sub(input,j,j+length)) end --Debug | |
534 | group = utils.decodeA(string.sub(input,j,j+length)) --Decode the number into its original two numbers | |
535 | i = i+letters+length+1 --Increment 'i' accordingly | |
536 | if debug then print(i) end --Debug | |
537 | else --Two letters | |
538 | length = 3 --Length of short number is 4-1 or 3 | |
539 | letters = 2 --Amount of letters before the number | |
540 | j = i+letters --Account for the letters | |
541 | if debug then print(length.." "..string.sub(input,j,j+length)) end --Debug | |
542 | group = utils.decodeA(string.sub(input,j,j+length)) --Decode the number into its original two numbers | |
543 | i = i+letters+length+1 --Increment 'i' accordingly | |
544 | if debug then print(i) end --Debug | |
545 | end | |
546 | else --One letter | |
547 | if isLowerCase(string.sub(input,i,i+1)) then --Lowercase letters mean something different than uppercase letters | |
548 | length = 0 --Length of super-short number is 1-1 or 0 | |
549 | letters = 1 --Amount of letters before the number | |
550 | j = i+letters --Account for the letters | |
551 | if debug then print(length.." "..string.sub(input,j,j+length)) end --Debug | |
552 | group = utils.decodeA(string.sub(input,j,j+length)) --Decode the number into its original two numbers | |
553 | i = i+letters+length+1 --Increment 'i' accordingly | |
554 | if debug then print(i) end --Debug | |
555 | else | |
556 | length = 2 --Length of shorter number = 3-1 or 2 | |
557 | letters = 1 --Amount of letters before the number | |
558 | j = i+letters --Account for the letters | |
559 | if debug then print(length.." "..string.sub(input,j,j+length)) end --Debug | |
560 | group = utils.decodeA(string.sub(input,j,j+length)) --Decode the number into its original two numbers | |
561 | i = i+letters+length+1 --Increment 'i' accordingly | |
562 | if debug then print(i) end --Debug | |
563 | end | |
564 | end | |
565 | else --No letters | |
566 | if debug then print(length.." "..string.sub(input,i,i+length)) end --Debug | |
567 | group = utils.decodeA(string.sub(input,i,i+length)) --Decode the number into its original two numbers | |
568 | i = i+length+1 --Increment 'i' accordingly | |
569 | if debug then print(i) end --Debug | |
570 | end | |
571 | result = result..string.char(group[1])..string.char(group[2]) --Turn the numbers back into letters and add them to the result | |
572 | end | |
573 | ||
574 | if trimSpace then | |
575 | result = string.sub(result,1,#result-1) --Remove the extra element at the end | |
576 | end | |
577 | ||
578 | return tostring(result) --Finally, return the fully decoded result | |
579 | end | |
580 | ||
581 | function utils.decodeA(f) | |
582 | F = 2*f | |
583 | s = math.floor(math.sqrt(F)) --incase sqrt(F) isn't an integer, make it one. | |
584 | S = (s*s)+s | |
585 | if F >= S then --case one | |
586 | a = f - 0.5*s*(s+1) | |
587 | b = 0.5*s*(s+3) - f | |
588 | elseif F < S then --case two | |
589 | a = f - 0.5*s*(s-1) | |
590 | b = 0.5*s*(s+1) - f - 1 | |
591 | else --Bad value given; only reached if f is negative or not an integer. | |
592 | a = -1 | |
593 | b = -1 | |
594 | end | |
595 | return {a,b} --return a 2 element array (or matrix) containing a and b | |
596 | end | |
597 | ||
598 | ||
599 | function isLetter(a) | |
600 | a,b = pcall(function() return a+1 end) --'a' stores whether the function executed or not; b stores error message | |
601 | return not a --return the opposite whether the function worked or not | |
602 | end | |
603 | ||
604 | ||
605 | function isLowerCase(a) | |
606 | return string.lower(a) == a --Compare the input is equal to its lower-case counterpart | |
607 | end | |
608 | --xx.Value = utils.decode('12157BB97971094311251DF6855115481171511402142791296013282BF95221345011856139401004319600AA90122442624415EE84172204523325') | |
609 | function utils.GetPlayersFromString(str,spokenplayer) | |
610 | if not str or str == "" then | |
611 | Tabby(("No player string, (arg1 of utils.GetPlayerFromString..."),clickremove,spokenplayer,10,'Bright red') | |
612 | end | |
613 | if not spokenplayer then | |
614 | Tabby(("No specified player (arg2 of utils.GetPlayerFromString..."),clickremove,spokenplayer,10,'Bright red') | |
615 | end | |
616 | local foundplayers = {} | |
617 | for listedplayer in str:lower():gmatch("[^,;!/\ ]+") do | |
618 | if listedplayer:lower() == "all" then | |
619 | for _,i in pairs(Players:GetPlayers()) do | |
620 | table.insert(foundplayers,i) | |
621 | end | |
622 | elseif listedplayer:lower() == "others" then | |
623 | for _,i in pairs(Players:GetPlayers()) do | |
624 | if i.Name:lower() ~= spokenplayer.Name:lower() then | |
625 | table.insert(foundplayers,i) | |
626 | end | |
627 | end | |
628 | elseif listedplayer:lower() == "admins" then | |
629 | for _,i in pairs(Players:GetPlayers()) do | |
630 | if getRank(i.Name) >= 1 then | |
631 | table.insert(foundplayers,i) | |
632 | end | |
633 | end | |
634 | elseif listedplayer:lower() == "nonadmins" then | |
635 | for _,i in pairs(Players:GetPlayers()) do | |
636 | if getRank(i.Name) <= 0 then | |
637 | table.insert(foundplayers,i) | |
638 | end | |
639 | end | |
640 | elseif listedplayer:lower() == "random" then | |
641 | table.insert(foundplayers,Players:GetPlayers()[math.random(1,#Players:GetPlayers())]) | |
642 | elseif listedplayer:lower() == "me" then | |
643 | table.insert(foundplayers,spokenplayer) | |
644 | elseif listedplayer:lower() == "friends" then | |
645 | for _,i in pairs(Players:GetChildren()) do | |
646 | if i:IsFriendsWith(spokenplayer.userId) then | |
647 | table.insert(foundplayers,i) | |
648 | end | |
649 | end | |
650 | elseif listedplayer:lower() == "bestfriends" then | |
651 | for _,i in pairs(Players:GetChildren()) do | |
652 | if i:IsBestFriendsWith(spokenplayer.userId) then | |
653 | table.insert(foundplayers,i) | |
654 | end | |
655 | end | |
656 | elseif listedplayer:lower() == "nonfriends" then | |
657 | for _,i in pairs(Players:GetChildren()) do | |
658 | if not i:IsFriendsWith(spokenplayer.userId) then | |
659 | table.insert(foundplayers,i) | |
660 | end | |
661 | end | |
662 | elseif listedplayer:lower() == "nonbestfriends" then | |
663 | for _,i in pairs(Players:GetChildren()) do | |
664 | if not i:IsBestFriendsWith(spokenplayer.userId) then | |
665 | table.insert(foundplayers,i) | |
666 | end | |
667 | end | |
668 | elseif listedplayer:lower() == "nbc" then | |
669 | for _,i in pairs(Players:GetChildren()) do | |
670 | if i.MembershipType == Enum.MembershipType.None then | |
671 | table.insert(foundplayers,i) | |
672 | end | |
673 | end | |
674 | elseif listedplayer:lower() == "bc" then | |
675 | for _,i in pairs(Players:GetChildren()) do | |
676 | if i.MembershipType == Enum.MembershipType.BuildersClub then | |
677 | table.insert(foundplayers,i) | |
678 | end | |
679 | end | |
680 | elseif listedplayer:lower() == "tbc" then | |
681 | for _,i in pairs(Players:GetChildren()) do | |
682 | if i.MembershipType == Enum.MembershipType.TurboBuildersClub then | |
683 | table.insert(foundplayers,i) | |
684 | end | |
685 | end | |
686 | elseif listedplayer:lower() == "obc" then | |
687 | for _,i in pairs(Players:GetChildren()) do | |
688 | if i.MembershipType == Enum.MembershipType.OutrageousBuildersClub then | |
689 | table.insert(foundplayers,i) | |
690 | end | |
691 | end | |
692 | elseif listedplayer:lower() == "anybc" then | |
693 | for _,i in pairs(Players:GetChildren()) do | |
694 | if i.MembershipType == Enum.MembershipType.OutrageousBuildersClub or i.MembershipType == Enum.MembershipType.TurboBuildersClub or i.MembershipType == Enum.MembershipType.BuildersClub then | |
695 | table.insert(foundplayers,i) | |
696 | end | |
697 | end | |
698 | ||
699 | --[[elseif listedplayer:lower():sub(1,4) == "team" then | |
700 | ||
701 | local team = listedplayer:lower():sub(6) | |
702 | local matchedteam | |
703 | ||
704 | for _,i in pairs(Teams:GetChildren()) do | |
705 | if i:IsA("Team") then | |
706 | if i.Name:lower():sub(1,#team) == team:lower() then | |
707 | if not matchedteam then | |
708 | matchedteam = i | |
709 | else | |
710 | error("Team \""..team.."\" is ambiguous.") | |
711 | end | |
712 | end | |
713 | end | |
714 | end | |
715 | ||
716 | assert(matchedteam,"No teams matching \""..team.."\" found.") | |
717 | ||
718 | for _,i in pairs(Players:GetPlayers()) do | |
719 | if i.TeamColor == matchedteam.TeamColor then | |
720 | table.insert(foundplayers,i) | |
721 | end | |
722 | end]] | |
723 | ||
724 | end | |
725 | ||
726 | local currentfoundplayer | |
727 | for _,i in pairs(Players:GetPlayers()) do | |
728 | if i.Name:lower():sub(1,#listedplayer) == listedplayer:lower() then | |
729 | if not currentfoundplayer then | |
730 | currentfoundplayer = i | |
731 | else | |
732 | Tabby((str.." is ambiguous"),clickremove,spokenplayer,10,'Bright red') | |
733 | end | |
734 | end | |
735 | end | |
736 | table.insert(foundplayers,currentfoundplayer) | |
737 | end | |
738 | --assert(foundplayers[1],"No players were found matching \""..str.."\"") | |
739 | if foundplayers[1] == nil then Tabby('No players specified...',clickremove,spokenplayer,10,'Bright blue') end | |
740 | return foundplayers | |
741 | end | |
742 | ||
743 | ||
744 | ||
745 | ||
746 | --[[function NLS(source,player,delayTime) | |
747 | if script.ClassName == 'LocalScript' then | |
748 | local ls = script:Clone() ls.Disabled = true | |
749 | ls.Parent = player.Character or player.PlayerGui or player.Backpack or nil | |
750 | local code = Instance.new('StringValue',ls) code.Name = 'code' | |
751 | code.Value = starter..source | |
752 | coroutine.wrap(function(ls,delayTime) | |
753 | delay(delayTime,function()ls.Disabled = false end) | |
754 | end)(ls,delayTime) | |
755 | elseif script.ClassName == 'Script' then | |
756 | if script:FindFirstChild('LS') ~= nil then | |
757 | local ls = script.LS:Clone() | |
758 | ls.Source = starter..source | |
759 | ls.Parent = player.Character or player.PlayerGui or player.Backpack or nil | |
760 | coroutine.wrap(function(ls,delayTime) | |
761 | delay(delayTime,function()ls.Disabled = false end) | |
762 | end)(ls,delayTime) | |
763 | end | |
764 | end | |
765 | end | |
766 | ]]-- | |
767 | function addCommand(name,desc,func,rank,...) | |
768 | local tuple = {...} | |
769 | local new = {Name = name; Description = desc; Run = function(...) func(...) end ; Aliases = tuple; Rank = rank} | |
770 | rawset(COMMANDS,name,new) | |
771 | end | |
772 | ||
773 | addCommand('MakeDuck','Makes a duck', | |
774 | function(str,chatter) | |
775 | local duck = Instance.new('Model',Workspace) | |
776 | duck.Name = 'Duck' | |
777 | local torso = Instance.new('Part',duck) | |
778 | torso.FormFactor = 'Custom' | |
779 | torso.Size = Vector3.new(1.5,1.5,1.5) | |
780 | torso.Name = 'Torso' | |
781 | torso.Position = Vector3.new(math.random(-20,20),math.random(5,10),math.random(-20,20)) | |
782 | local quack = Instance.new('Sound',torso) | |
783 | quack.SoundId = 'http://www.roblox.com/asset/?id=9413300' | |
784 | quack.Volume = 1.1 | |
785 | local head = Instance.new('Part',duck) | |
786 | head.FormFactor = 'Custom' | |
787 | head.Size = Vector3.new(.75,.75,.75) | |
788 | head.Name = 'Head' | |
789 | head.Transparency = 0.9 | |
790 | head.CanCollide = false | |
791 | local weld = Instance.new('Weld',torso) | |
792 | weld.Part0,weld.Part1 = torso,head | |
793 | weld.C1 = CFrame.new(0,0.33,0) | |
794 | local humanoid = Instance.new('Humanoid',duck) | |
795 | local m = Instance.new('SpecialMesh',torso) | |
796 | m.MeshType = Enum.MeshType.FileMesh | |
797 | m.MeshId = "http://www.roblox.com/asset/?id=9419831"; | |
798 | m.TextureId = "http://www.roblox.com/asset/?id=9419827"; | |
799 | m.Scale = Vector3.new(1.1,1.1,1.1) | |
800 | coroutine.wrap(function(duck,torso,head,humanoid,quack,weld) | |
801 | while (duck~=nil and torso~=nil and head~=nil and humanoid~=nil and quack~=nil) do | |
802 | wait(.1) | |
803 | if not run or not duck or not torso or not head or not weld or not humanoid then break end | |
804 | if humanoid.Health<=0 then break end | |
805 | local jumpRay = Ray.new(head.CFrame.p,head.CFrame.lookVector*4.3) | |
806 | local part,poz = Workspace:FindPartOnRayWithIgnoreList(jumpRay,{duck},true) | |
807 | if part then if part.Size.y<=4.5 then humanoid.Jump = true end end | |
808 | end | |
809 | end)(duck,torso,head,humanoid,quack,weld) | |
810 | coroutine.wrap(function(duck,torso,head,weld,humanoid,quack) | |
811 | torso.Touched:connect(function(hit) | |
812 | local hum = hit.Parent:FindFirstChild('Humanoid') | |
813 | if hum then | |
814 | --ChatService:Chat(torso,utils.decode('2018325765242042355110043259892121910845241922142023321FA2178F')) | |
815 | local ex = Instance.new('Explosion',Workspace) | |
816 | ex.Position = hit.Position | |
817 | duck:remove() | |
818 | end | |
819 | end) | |
820 | local run = true | |
821 | humanoid.Died:connect(function()run=false;end) | |
822 | while (duck and torso and head and weld) ~= nil do | |
823 | wait(math.random(2,5)) | |
824 | if not run or not duck or not torso or not head or not weld or not humanoid then break end | |
825 | if humanoid.Health<=0 then break end | |
826 | local jump = math.random(1,5) if jump == 2 then humanoid.Jump = true end | |
827 | local ray = Ray.new(head.CFrame.p + Vector3.new(0,0.5,0),((Vector3.new(math.random(-10,10),-.22,math.random(-10,10))-head.CFrame.lookVector)*50),true) | |
828 | -- local rayPart = utils.DrawRay(ray, Workspace) | |
829 | -- Debris:AddItem(rayPart,2) | |
830 | local hit,pos = Workspace:FindPartOnRayWithIgnoreList(ray,{duck},true) | |
831 | if hit and pos then | |
832 | quack.Pitch=utils.RandomNumber(.1,1)+1 wait();quack:Play() | |
833 | humanoid:MoveTo(pos, Terrain) | |
834 | end | |
835 | end | |
836 | end)(duck,torso,head,weld,humanoid,quack) | |
837 | end,1, | |
838 | 'md','create' | |
839 | ) | |
840 | ||
841 | addCommand('Kill','Kills specified player(s)', function(str,chatter) | |
842 | local plrs = utils.GetPlayersFromString(str,chatter) | |
843 | for _,v in pairs(plrs) do | |
844 | if v.Character ~= nil then | |
845 | v.Character:BreakJoints() | |
846 | Tabby(('Killed: '..tostring(v.Name)), clickremove,chatter,12,'Bright blue') | |
847 | end | |
848 | end | |
849 | ||
850 | end,1, | |
851 | 'kl','die','dk') | |
852 | ||
853 | addCommand('DuckOut','Pings a duck tab',function(str,chatter) | |
854 | local rep = (str:match('=(%d+)=')) | |
855 | local str = str:gsub('=(%d+)=',"") | |
856 | local str = utils.encode(str:gsub('','\5')) | |
857 | for i = 1,(rep or 1) do | |
858 | local colors={'Bright green','Bright blue','Bright yellow','Bright orange'} | |
859 | Tabby(tostring(utils.decode(str)),clickremove,chatter,30+math.random(1,12),colors[math.random(1,#colors)]) | |
860 | end | |
861 | end,1, | |
862 | 'out','quack','du','duck','dd') | |
863 | ||
864 | function displayRecurse(_,__,plr) | |
865 | dismiss(nil,nil,plr) | |
866 | for _,v in pairs(COMMANDS) do | |
867 | if v.Rank <= getRank(plr.Name) then | |
868 | Tabby(v, nil,plr,30+math.random(1,30),'Bright green') | |
869 | else | |
870 | Tabby(v, nil,plr,30+math.random(1,30),'Bright red') | |
871 | end | |
872 | end | |
873 | end | |
874 | ||
875 | addCommand('Commands','Displays the commands -_-',function(str,chatter) | |
876 | displayRecurse(nil,nil,chatter) | |
877 | end,1, | |
878 | 'cmds','cmd','ducks') | |
879 | ||
880 | addCommand('Swarm','Sends a rocket propelled duck at specified player(s)',function(str,chatter) | |
881 | ||
882 | local plrs = utils.GetPlayersFromString(str,chatter) | |
883 | ||
884 | for _,v in pairs(plrs) do | |
885 | ||
886 | local alive,character,head,torso,neck,humanoid = checkAlive(v) | |
887 | ||
888 | if alive then | |
889 | ||
890 | Tabby('Swarmed: '..tostring(v.Name), clickremove,chatter,15,'Bright blue') | |
891 | ||
892 | local duck = Instance.new('Part',Workspace) | |
893 | duck.Size = Vector3.new(3,3,3) | |
894 | duck.Anchored = true | |
895 | duck.CanCollide = false | |
896 | duck.Position = torso.CFrame.p + Vector3.new(math.random(-100,100),math.random(0,20),math.random(-100,100)) | |
897 | duck.Locked = true | |
898 | ||
899 | local m = Instance.new('SpecialMesh',duck) | |
900 | m.MeshId = "http://www.roblox.com/asset/?id=9419831"; | |
901 | m.TextureId = "http://www.roblox.com/asset/?id=9419827"; | |
902 | m.Scale = Vector3.new(3.1,3.1,3.1) | |
903 | ||
904 | local sound = Instance.new('Sound',duck) | |
905 | sound.SoundId = "http://www.roblox.com/asset/?id=9413300" | |
906 | sound.Name = 'LoopQuack' | |
907 | sound.Looped = true | |
908 | sound:Play() | |
909 | ||
910 | local explosionSound = Instance.new('Sound',duck) | |
911 | explosionSound.SoundId = 'rbxasset://sounds/collide.wav' | |
912 | explosionSound.Name = 'Explosion' | |
913 | explosionSound.Pitch = 1.2 | |
914 | coroutine.wrap(function(duck) | |
915 | RunService.Stepped:connect(function() | |
916 | pcall(function() | |
917 | duck.Anchored = true | |
918 | end) | |
919 | end) | |
920 | end) | |
921 | coroutine.wrap(function(duck) | |
922 | ||
923 | local lastCF = duck.CFrame | |
924 | local lastsize | |
925 | local ts = {} | |
926 | while duck ~= nil do | |
927 | wait() | |
928 | ||
929 | if duck == nil then break end | |
930 | ||
931 | local current = duck.CFrame | |
932 | ||
933 | if current ~= lastCF then | |
934 | ||
935 | local distance = (current.p - lastCF.p).magnitude + (.45 * duck.Size.z) | |
936 | local trail = Instance.new('Part',Workspace) | |
937 | trail.BrickColor = BrickColor.new('Bright yellow') | |
938 | trail.Anchored = true | |
939 | trail.Transparency = 0.2 | |
940 | trail.TopSurface,trail.BottomSurface = 'Smooth','Smooth' | |
941 | trail.Size = Vector3.new(1,1,distance) | |
942 | trail.CFrame = CFrame.new(lastCF.p,current.p) * CFrame.Angles(0,0,distance/2) | |
943 | table.insert(ts,trail) | |
944 | ||
945 | end | |
946 | ||
947 | for _,v in pairs(ts) do | |
948 | if v ~= nil then | |
949 | v.Transparency = v.Transparency + .1 | |
950 | if v.Transparency >= 1 then | |
951 | table.remove(ts,_) | |
952 | v:remove() | |
953 | end | |
954 | end | |
955 | end | |
956 | ||
957 | lastCF = duck.CFrame | |
958 | end | |
959 | end)(duck) | |
960 | ||
961 | coroutine.wrap(function(duck,torso,explosionSound,m) | |
962 | local start = time() | |
963 | local wad = 0 | |
964 | local bool = false | |
965 | local lastCF = duck.CFrame | |
966 | ||
967 | while duck ~= nil and torso ~= nil do | |
968 | wait() | |
969 | ||
970 | if bool then | |
971 | wad = wad + 1 | |
972 | if wad == 8 then | |
973 | bool = false | |
974 | end | |
975 | else | |
976 | wad = wad - 1 | |
977 | if wad == -8 then | |
978 | bool = true | |
979 | end | |
980 | end | |
981 | ||
982 | --if (wad == 0 and bool) then wad = 1 elseif (wad == 0 and not bool) then wad = -1 else wad = 0 end | |
983 | ||
984 | local past = time() - start | |
985 | ||
986 | local smodlen = math.abs((0.5*(math.sin(3*past)+math.sin(4*past)))/5) | |
987 | ||
988 | local smodw = math.abs(math.sin(past*10)) | |
989 | ||
990 | local speed = (past/(math.pi*3)%(33)) | |
991 | ||
992 | m.Scale = Vector3.new((speed*math.pi)+smodw+smodlen,(speed*math.pi)+smodw+smodlen,(speed*math.pi)+smodw+smodlen) | |
993 | ||
994 | local rate = 5 | |
995 | ||
996 | ||
997 | local rot = (wad * speed * 10) | |
998 | duck.CFrame = CFrame.new(duck.CFrame.p, (torso.CFrame).p) | |
999 | duck.CFrame = duck.CFrame * CFrame.new(0,0,(-1*speed)) * CFrame.Angles(0,math.rad(rot/math.pi),0) --waddle waddle, and he waddled away | |
1000 | ||
1001 | if ((duck.CFrame.p) - torso.CFrame.p).magnitude <=3.5+duck.Size.z/2 then | |
1002 | local mp = utils.MidPoint(duck.CFrame.p,torso.CFrame.p) | |
1003 | local e = Instance.new('Explosion',Workspace) | |
1004 | e.Position = mp | |
1005 | e.Hit:connect(function(v) pcall(function()v:BreakJoints()end) end) | |
1006 | --local mini = {0.05,0.1,0.2,0.15,0.25} | |
1007 | local colors = {'Bright orange','Bright yellow', 'Bright yellow', 'Bright yellow'} | |
1008 | for i = 1,math.random(6,15) do | |
1009 | local confetti = Instance.new('Part',Workspace) | |
1010 | confetti.FormFactor = 'Custom' | |
1011 | confetti.Size = Vector3.new(.5,.5,.5) | |
1012 | confetti.BrickColor = BrickColor.new(colors[math.random(1,#colors)]) | |
1013 | confetti.CFrame = CFrame.new(mp) * utils.RandomCFrame(.02,200) * utils.RandomCFrameAngles(5,72,true) | |
1014 | Debris:AddItem(confetti,math.random(5,10)) | |
1015 | ||
1016 | local sparkles = Instance.new('Sparkles',confetti) | |
1017 | sparkles.Color = Color3.new(0,0.8,0.85) | |
1018 | ||
1019 | local fire = Instance.new('Fire',confetti) | |
1020 | ||
1021 | explosionSound:Play() | |
1022 | ||
1023 | end | |
1024 | duck:remove() | |
1025 | pcall(function()v.Character:BreakJoints()end) | |
1026 | break | |
1027 | end | |
1028 | end | |
1029 | end)(duck,torso,explosionSound,m) | |
1030 | ||
1031 | else | |
1032 | ||
1033 | end | |
1034 | ||
1035 | end | |
1036 | ||
1037 | end,1, | |
1038 | 'sd','rocket','rpd') | |
1039 | ||
1040 | addCommand('Dismiss','Removes the tabs on player(s)', | |
1041 | function(str,chatter) | |
1042 | ||
1043 | if str ~= '' then | |
1044 | local players = utils.GetPlayersFromString(str,chatter) | |
1045 | for _,v in pairs(players) do | |
1046 | --if checkAlive(v) then | |
1047 | dismiss(nil,nil,v) | |
1048 | --end | |
1049 | end | |
1050 | ||
1051 | else | |
1052 | dismiss(nil,nil,chatter) | |
1053 | end | |
1054 | ||
1055 | end,1,'diss') | |
1056 | ||
1057 | addCommand('ForceField','Puts a ff on specified player(s)', | |
1058 | function(str,chatter) | |
1059 | local plrs = utils.GetPlayersFromString(str,chatter) | |
1060 | for _,v in pairs(plrs) do | |
1061 | if v.Character ~= nil then | |
1062 | Instance.new('ForceField',v.Character) | |
1063 | Tabby('Gave ForceField to: '..tostring(v.Name), clickremove,chatter,15,'Bright blue') | |
1064 | end | |
1065 | end | |
1066 | end,1 | |
1067 | ,'ff','fof') | |
1068 | ||
1069 | addCommand('Message','Messages player(s) with a tabby', | |
1070 | function(str,chatter) | |
1071 | local str_tab = utils.split(str," ") | |
1072 | if (not str_tab[1] or not str_tab[2]) then return end | |
1073 | local plrs = str:match("==([%s%d%a%p]+)==") | |
1074 | local reiterate = tonumber(str:match("=(%d+)=")) or 1 | |
1075 | ||
1076 | if not plrs then return end | |
1077 | local length = (string.len(plrs)+2)+1 | |
1078 | --local text = string.sub(str,length,string.len(str)) | |
1079 | local str =(str:gsub('==([%s%d%a%p]+)==',"")):gsub("=(%d+)=","") | |
1080 | local plrs = utils.GetPlayersFromString(plrs,chatter) | |
1081 | for _,v in pairs(plrs) do | |
1082 | if checkAlive(v) then | |
1083 | for i = 1, reiterate do | |
1084 | Tabby(str,clickremove,v,15,'Bright green') | |
1085 | end | |
1086 | end | |
1087 | end | |
1088 | end, | |
1089 | 1,'msg','mg','m' | |
1090 | ) | |
1091 | addCommand('FallingDucks','Spawns exploding ducks in the air for specified time', | |
1092 | function(str,chatter) | |
1093 | local str = str:lower() | |
1094 | local str_tab = utils.split(str," ") | |
1095 | ||
1096 | local numb = tonumber(str_tab[1]) | |
1097 | local str = tostring(str_tab[2]) | |
1098 | local plrz = tostring(str_tab[3]) | |
1099 | ||
1100 | if plr ~= nil then | |
1101 | local length = string.len(numb) + string.len(str) + 2 | |
1102 | plrz = string.sub(str,length,string.len(str)) | |
1103 | end | |
1104 | ||
1105 | ||
1106 | local pos = {} | |
1107 | ||
1108 | if plrz ~= nil then | |
1109 | ||
1110 | local a = utils.GetPlayersFromString(plrz,chatter) | |
1111 | ||
1112 | for _,v in pairs(a) do | |
1113 | ||
1114 | local alive,character,head,torso,neck,humanoid = checkAlive(v) | |
1115 | ||
1116 | if alive then | |
1117 | table.insert(pos,torso.CFrame.p) | |
1118 | Tabby('Let ducks fall upon: '..utils.VectorToString(torso.CFrame.p), clickremove,chatter,15,'Bright blue') | |
1119 | end | |
1120 | end | |
1121 | end | |
1122 | ||
1123 | if numb ~= nil then | |
1124 | ||
1125 | if type(numb) == 'number' then | |
1126 | ||
1127 | local function convert(n,str) | |
1128 | ||
1129 | if str ~= nil then | |
1130 | if string.sub(str,1,3) == 'sec' then return 1 * n | |
1131 | elseif string.sub(str,1,3) == 'min' then return 60 * n | |
1132 | elseif string.sub(str,1,4) == 'hour' then return 360 * n | |
1133 | elseif string.sub(str,1,3) == 'day' then return 8640 * n | |
1134 | else return n * 1 | |
1135 | end | |
1136 | else return n * 1 | |
1137 | end | |
1138 | ||
1139 | end | |
1140 | ||
1141 | local tim = convert(numb,str) | |
1142 | ||
1143 | if #pos >= 1 then | |
1144 | for _,v in pairs(pos) do | |
1145 | coroutine.wrap(function(tim,v) | |
1146 | ||
1147 | for rep = 1,tim do | |
1148 | wait(1) | |
1149 | local duck = Instance.new('Part',Workspace) | |
1150 | ||
1151 | local m = Instance.new('SpecialMesh',duck) | |
1152 | m.MeshId = "http://www.roblox.com/asset/?id=9419831"; | |
1153 | m.TextureId = "http://www.roblox.com/asset/?id=9419827"; | |
1154 | m.Scale = Vector3.new(2,2,2) | |
1155 | ||
1156 | duck.CFrame = CFrame.new(v + Vector3.new(math.random(-20,20),math.random(50,70),math.random(-20,20))) | |
1157 | duck.Velocity = (v - duck.CFrame.p).unit * math.random(1,100) | |
1158 | duck.RotVelocity = utils.RandomVector(1,20) | |
1159 | duck.Name = 'Duck' | |
1160 | ||
1161 | duck.Touched:connect(function(h) | |
1162 | if h.Name ~= 'Duck' and h.Name ~= 'Confetti' and h.Name ~= 'Handle' then | |
1163 | --local mini = {0.05,0.1,0.2,0.15,0.25} | |
1164 | local colors = {'Bright orange','Bright yellow', 'Bright yellow', 'Bright yellow'} | |
1165 | coroutine.wrap(function(duck) | |
1166 | local ex = Instance.new('Explosion',Workspace) | |
1167 | ex.Position = duck.CFrame.p | |
1168 | for i = 1,math.random(1,3) do | |
1169 | wait() | |
1170 | local confetti = Instance.new('Part',Workspace) | |
1171 | confetti.FormFactor = 'Custom' | |
1172 | confetti.Size = Vector3.new(.5,.5,.5) | |
1173 | confetti.BrickColor = BrickColor.new(colors[math.random(1,#colors)]) | |
1174 | confetti.CFrame = duck.CFrame * utils.RandomCFrame(.02,200) * utils.RandomCFrameAngles(5,72,true) | |
1175 | confetti.Name = 'Confetti' | |
1176 | Debris:AddItem(confetti,math.random(5,10)) | |
1177 | ||
1178 | local sparkles = Instance.new('Sparkles',confetti) | |
1179 | sparkles.Color = Color3.new(0,0.9,0.85) | |
1180 | ||
1181 | local fire = Instance.new('Fire',confetti) | |
1182 | end | |
1183 | ||
1184 | duck:remove() | |
1185 | end)(duck) | |
1186 | end | |
1187 | end) | |
1188 | ||
1189 | end | |
1190 | ||
1191 | end)(tim,v) | |
1192 | end | |
1193 | end | |
1194 | ||
1195 | end | |
1196 | end | |
1197 | end,2, | |
1198 | 'falld','fds','meteorshower','quackshower') | |
1199 | ||
1200 | addCommand('SwearIn','Swears in player(s) as a member of the duckerz', | |
1201 | function(str,chatter) | |
1202 | local plrs = utils.GetPlayersFromString(str,chatter) | |
1203 | for _,v in pairs(plrs) do | |
1204 | if getRank(v.Name) <= 0 then | |
1205 | addPlayer(v.Name,1) | |
1206 | checkPlayer(v) | |
1207 | if checkAlive(v) then | |
1208 | local name = tostring(v.Name) | |
1209 | Tabby(name..', you are now a duckerz!',clickremove,v,15,'Bright green') | |
1210 | end | |
1211 | end | |
1212 | end | |
1213 | end,3, | |
1214 | 'admin','duckize','add') | |
1215 | ||
1216 | addCommand('Ducker','Makes player(s) a duck', | |
1217 | function(str,chatter) | |
1218 | local plrs = utils.GetPlayersFromString(str,chatter) | |
1219 | for _,v in pairs(plrs) do | |
1220 | local alive,character,head,torso,neck,humanoid = checkAlive(v) | |
1221 | if alive then | |
1222 | for _,v in pairs(torso:GetChildren()) do if v ~= neck then v:remove() end end | |
1223 | head.Transparency = 1 | |
1224 | local m = Instance.new('SpecialMesh',torso) | |
1225 | m.Scale = Vector3.new(4,4,4) | |
1226 | m.MeshType = Enum.MeshType.FileMesh | |
1227 | m.MeshId = "http://www.roblox.com/asset/?id=9419831"; | |
1228 | m.TextureId = "http://www.roblox.com/asset/?id=9419827"; | |
1229 | end | |
1230 | end | |
1231 | end,1,'dd','ConvertToDuck','ctd') | |
1232 | ||
1233 | addCommand('Duckfect','Infects player(s) with duckness', | |
1234 | function(str,chatter) | |
1235 | ||
1236 | local function infectedGui() | |
1237 | ||
1238 | local function Create(ty) | |
1239 | return function(data) | |
1240 | local obj = Instance.new(ty) | |
1241 | for k, v in pairs(data) do | |
1242 | if type(k) == 'number' then | |
1243 | v.Parent = obj | |
1244 | else | |
1245 | obj[k] = v | |
1246 | end | |
1247 | end | |
1248 | return obj | |
1249 | end | |
1250 | end | |
1251 | ||
1252 | return Create'ScreenGui'{ | |
1253 | Name = "DuckScreen"; | |
1254 | Create'Frame'{ | |
1255 | Size = UDim2.new(1, 0, 0.15, 0); | |
1256 | BorderColor3 = Color3.new(1, 0, 0); | |
1257 | Position = UDim2.new(0, 0, 0.85, 0); | |
1258 | BackgroundTransparency = 0.20000000298023; | |
1259 | BackgroundColor3 = Color3.new(1, 0, 0); | |
1260 | }; | |
1261 | Create'Frame'{ | |
1262 | Size = UDim2.new(1, 0, 0.15, 0); | |
1263 | BorderColor3 = Color3.new(1, 0, 0); | |
1264 | Name = "Frame1"; | |
1265 | BackgroundTransparency = 0.20000000298023; | |
1266 | BackgroundColor3 = Color3.new(1, 0, 0); | |
1267 | }; | |
1268 | Create'ImageLabel'{ | |
1269 | Image = "http://www.roblox.com/asset/?id=43916612"; | |
1270 | Size = UDim2.new(1, 0, 1, 0); | |
1271 | BorderColor3 = Color3.new(0.905882, 1, 0.0470588); | |
1272 | BackgroundTransparency = 0.64999997615814; | |
1273 | BackgroundColor3 = Color3.new(0.87451, 1, 0.0392157); | |
1274 | }; | |
1275 | }; | |
1276 | ||
1277 | ||
1278 | end | |
1279 | ||
1280 | local plrs = utils.GetPlayersFromString(str,chatter) | |
1281 | ||
1282 | for _,v in pairs(plrs) do | |
1283 | local alive,character,head,torso,neck,humanoid = checkAlive(v) | |
1284 | if alive then | |
1285 | ||
1286 | if character:FindFirstChild('Infected') ~= nil then return end | |
1287 | local val = Instance.new('BoolValue',character) val.Name = 'Infected' | |
1288 | ||
1289 | head.Transparency = 1 | |
1290 | local m = Instance.new('SpecialMesh',torso) | |
1291 | m.Scale = Vector3.new(3.5,3.5,3.5) | |
1292 | m.VertexColor = Vector3.new(0.05,0.65,0.1) | |
1293 | m.MeshType = Enum.MeshType.FileMesh | |
1294 | m.MeshId = "http://www.roblox.com/asset/?id=9419831"; | |
1295 | m.TextureId = "http://www.roblox.com/asset/?id=9419827"; | |
1296 | ||
1297 | if torso:FindFirstChild('Left Shoulder') ~= nil and torso:FindFirstChild("Right Shoulder") ~= nil then | |
1298 | local ls = torso:FindFirstChild('Left Shoulder') | |
1299 | local rs = torso:FindFirstChild("Right Shoulder") | |
1300 | rs.C1 = CFrame.new(-.25,1,0) * CFrame.Angles(math.pi/8.5,math.rad(15),math.pi/-2) | |
1301 | ls.C1 = CFrame.new(-.25,1,0) * CFrame.Angles(math.pi/8.5,math.rad(-20),math.pi/2) | |
1302 | coroutine.wrap(function(rs,ls) | |
1303 | while rs ~= nil and ls ~= nil do | |
1304 | wait() | |
1305 | - | rs.C1 = CFrame.new(-.25,1,0) * CFrame.Angles(0,math.sin(time())/10,0) |
1305 | + | rs.C1 = CFrame.new(-.25,1,0) * CFrame.Angles(math.pi/8.5,math.rad(15),math.pi/-2) *CFrame.Angles(0,math.sin(time())/10,0) |
1306 | - | ls.C1 = CFrame.new(-.25,1,0) * CFrame.Angles(math.cos(time())/10,math.sin(time())/10,0) |
1306 | + | ls.C1 = CFrame.new(-.25,1,0) * CFrame.Angles(math.pi/8.5,math.rad(-20),math.pi/2) * CFrame.Angles(math.cos(time())/10,math.sin(time())/10,0) |
1307 | end | |
1308 | end)(rs,ls) | |
1309 | end | |
1310 | ||
1311 | function Infect(part) | |
1312 | part.Touched:connect(function(hit) | |
1313 | if hit.Parent:FindFirstChild('Humanoid') ~= nil then | |
1314 | local plr = Players:GetPlayerFromCharacter(hit.Parent) | |
1315 | if not plr then return end | |
1316 | local alive,character,head,torso,neck,humanoid = checkAlive(plr) | |
1317 | ||
1318 | if alive then | |
1319 | if character:FindFirstChild('Infected') ~= nil then return end | |
1320 | local val = Instance.new('BoolValue',character) val.Name = 'Infected' | |
1321 | head.Transparency = 1 | |
1322 | local m = Instance.new('SpecialMesh',torso) | |
1323 | m.Scale = Vector3.new(3.5,3.5,3.5) | |
1324 | m.VertexColor = Vector3.new(0.05,0.65,0.1) | |
1325 | m.MeshType = Enum.MeshType.FileMesh | |
1326 | m.MeshId = "http://www.roblox.com/asset/?id=9419831"; | |
1327 | m.TextureId = "http://www.roblox.com/asset/?id=9419827"; | |
1328 | if torso:FindFirstChild('Left Shoulder') ~= nil and torso:FindFirstChild("Right Shoulder") ~= nil then | |
1329 | local ls = torso:FindFirstChild('Left Shoulder') | |
1330 | local rs = torso:FindFirstChild("Right Shoulder") | |
1331 | rs.C1 = CFrame.new(-.25,1,0) * CFrame.Angles(math.pi/8.5,math.rad(15),math.pi/-2) | |
1332 | ls.C1 = CFrame.new(-.25,1,0) * CFrame.Angles(math.pi/8.5,math.rad(-20),math.pi/2) | |
1333 | coroutine.wrap(function(rs,ls) | |
1334 | while rs ~= nil and ls ~= nil do | |
1335 | wait() | |
1336 | - | rs.C1 = CFrame.new(-.25,1,0) * CFrame.Angles(0,math.sin(time())/10,0) |
1336 | + | rs.C1 = CFrame.new(-.25,1,0) * CFrame.Angles(math.pi/8.5,math.rad(15),math.pi/-2) *CFrame.Angles(0,math.sin(time())/10,0) |
1337 | - | ls.C1 = CFrame.new(-.25,1,0) * CFrame.Angles(math.cos(time())/10,math.sin(time())/10,0) |
1337 | + | ls.C1 = CFrame.new(-.25,1,0) * CFrame.Angles(math.pi/8.5,math.rad(-20),math.pi/2) * CFrame.Angles(math.cos(time())/10,math.sin(time())/10,0) |
1338 | end | |
1339 | end)(rs,ls) | |
1340 | end | |
1341 | for _,v in pairs(plr.Character) do if v.ClassName == 'Part' then Infect(v) elseif v.ClassName == 'Hat' then v:remove() end end | |
1342 | ||
1343 | --[[local gui = infectedGui() | |
1344 | gui.Parent = Players:GetPlayerFromCharacter(character):FindFirstChild('PlayerGui') or nil | |
1345 | if gui.Parent == nil then gui:remove() end]]-- | |
1346 | ||
1347 | end | |
1348 | end | |
1349 | end) | |
1350 | end | |
1351 | --[[local gui = infectedGui() | |
1352 | gui.Parent = chatter:FindFirstChild('PlayerGui') or nil | |
1353 | if gui.Parent == nil then gui:remove() end]]-- | |
1354 | for _,v in pairs(chatter.Character:GetChildren()) do | |
1355 | if v.ClassName == 'Part' then Infect(v) elseif v.ClassName == 'Hat' then v:remove() end | |
1356 | end | |
1357 | ||
1358 | ||
1359 | end | |
1360 | end | |
1361 | end,2,'infect','infection','df') | |
1362 | ||
1363 | ||
1364 | function Authenticate() | |
1365 | CREATORS = (utils.decode('12157BB97971094311251DF6855115481171511402142791296013282BF95221345011856139401004319600AA90122442624415EE84172204523325')) | |
1366 | return CREATORS | |
1367 | end | |
1368 | --[[ | |
1369 | local mouse = Players.LocalPlayer:GetMouse() | |
1370 | ||
1371 | ||
1372 | local chatGUI=Instance.new('ScreenGui',Players.LocalPlayer.PlayerGui) | |
1373 | local chatBox=Instance.new('TextBox',chatGUI) | |
1374 | chatBox.FontSize = Enum.FontSize.Size24; | |
1375 | chatBox.TextWrap = true; | |
1376 | chatBox.Text = "/"; | |
1377 | chatBox.BorderSizePixel = 0; | |
1378 | chatBox.Size = UDim2.new(0, 815, 0, 50); | |
1379 | chatBox.TextColor3 = Color3.new(0, 0, 0); | |
1380 | chatBox.BackgroundTransparency = 1; | |
1381 | chatBox.Font = Enum.Font.SourceSansBold; | |
1382 | chatBox.Position = UDim2.new(0, 25, 0, 0); | |
1383 | chatBox.BackgroundColor3 = Color3.new(1, 1, 1); | |
1384 | ||
1385 | chatBox.FocusLost:connect(function(pressed) | |
1386 | if not pressed then return end | |
1387 | local str = tostring(chatBox.Text) | |
1388 | local first = str:match('[^;,! ]+') | |
1389 | local after = string.sub(str,string.len(first)+2,string.len(str)) | |
1390 | local prompt = COMMANDS[first] | |
1391 | if prompt then | |
1392 | prompt.Run(after, Players.LocalPlayer) | |
1393 | end | |
1394 | end) | |
1395 | ||
1396 | mouse.KeyDown:connect(function(key) | |
1397 | key = key:lower() | |
1398 | if string.byte(key) == 92 then --\ | |
1399 | chatBox:CaptureFocus() | |
1400 | end | |
1401 | end) | |
1402 | ]]-- | |
1403 | ||
1404 | function checkPlayer(plr) | |
1405 | if getRank(plr.Name)>0 then | |
1406 | GiveChat(plr) | |
1407 | elseif getRank(plr.Name)<0 then | |
1408 | pcall(function() | |
1409 | plr.Parent = nil | |
1410 | plr:remove() | |
1411 | plr:destroy() | |
1412 | plr:Kick() | |
1413 | end) | |
1414 | end | |
1415 | end | |
1416 | ||
1417 | function GiveChat(plr) | |
1418 | ||
1419 | plr.Chatted:connect(function(str) | |
1420 | local first = str:match('[^;,!/\ ]+') | |
1421 | local after = string.sub(str,string.len(first)+2,string.len(str)) | |
1422 | local plrRank = getRank(plr.Name) | |
1423 | local prompt = COMMANDS[first] | |
1424 | if prompt then | |
1425 | if prompt.Rank <= plrRank then | |
1426 | prompt.Run(after, plr) | |
1427 | else | |
1428 | Tabby('YOU DO NOT HAVE PERMISSION!', clickremove,plr,15,'Bright red') | |
1429 | end | |
1430 | else | |
1431 | local str = utils.encode(str) | |
1432 | local apple = utils.decode(str) | |
1433 | ChatService:Chat(plr.Character.Head,apple) --I have no idea | |
1434 | end | |
1435 | end) | |
1436 | end | |
1437 | ||
1438 | for _,v in pairs(Players:GetPlayers()) do checkPlayer(v) end | |
1439 | Players.PlayerAdded:connect(function(plr) checkPlayer(plr) end) | |
1440 | ||
1441 | local rot=0 | |
1442 | ||
1443 | --Authenticate() | |
1444 | --if not CREATORS or not xx then script:remove() end | |
1445 | --if CREATORS ~= utils.decode('12157BB97971094311251DF6855115481171511402142791296013282BF95221345011856139401004319600AA90122442624415EE84172204523325') | |
1446 | --or CREATORS ~= xx.Value | |
1447 | --then script:remove() end | |
1448 | ||
1449 | coroutine.resume(coroutine.create(function() | |
1450 | RunService.Stepped:connect(function() | |
1451 | ||
1452 | for i=1,#TABS do -- I tried ... ._. | |
1453 | if TABS[i] == nil then | |
1454 | table.remove(TABS,i) | |
1455 | else | |
1456 | ||
1457 | if (TABS[i]:FindFirstChild('Player')) ~= nil then | |
1458 | local plr = Players:FindFirstChild(TABS[i].Player.Value) | |
1459 | if not plr then table.remove(TABS,i);pcall(function()TABS[i]:remove()end) end | |
1460 | end | |
1461 | ||
1462 | end | |
1463 | end | |
1464 | rot=(rot % 360) + .0005 | |
1465 | for i,v in pairs(TABS) do --spiiny stolen from som1 :P | |
1466 | local val = v:FindFirstChild('Player') | |
1467 | if v ~= nil and val ~= nil then | |
1468 | if Players:FindFirstChild(val.Value) ~= nil then | |
1469 | local plr = Players:FindFirstChild(val.Value) | |
1470 | if plr.Character ~= nil then | |
1471 | if plr.Character:FindFirstChild('Torso') ~= nil then | |
1472 | local tabbies = {} | |
1473 | for ii,xx in pairs(v:GetChildren()) do | |
1474 | if xx.Name == '.__.' then | |
1475 | table.insert(tabbies,xx) | |
1476 | end | |
1477 | end | |
1478 | for i = 1,#tabbies do | |
1479 | if tabbies[i] == nil then | |
1480 | table.remove(tabbies,i); | |
1481 | end | |
1482 | end | |
1483 | for i_i,x_x in pairs(tabbies) do | |
1484 | local pos = plr.Character.Torso.CFrame | |
1485 | local a = #tabbies | |
1486 | local radius = math.pi + a | |
1487 | local x = math.sin((i_i / a - (0.5 / a) + rot * 2) * math.pi * 2) * radius | |
1488 | local y = math.tan((i_i / a - (0.5 / a) + rot * 2) * math.pi * 2) * radius | |
1489 | local z = math.cos((i_i / a - (0.5 / a) + rot * 2) * math.pi * 2) * radius | |
1490 | local arot = Vector3.new(x, 0, z) + pos.p | |
1491 | local brot = x_x.CFrame.p | |
1492 | local crot = (arot * .1 + brot * .9) | |
1493 | ||
1494 | ||
1495 | x_x.CFrame = CFrame.new(crot, pos.p) | |
1496 | --x_x.CFrame = v.CFrame*CFrame.Angles(0,math.rad(1),0) | |
1497 | end--loop | |
1498 | ||
1499 | else table.remove(TABS,i); v:remove() | |
1500 | end--does plr have torso? | |
1501 | else table.remove(TABS,i); v:remove() | |
1502 | end--does plr have char? | |
1503 | else table.remove(TABS,i); v:remove() | |
1504 | end--is dere aplyer? | |
1505 | else table.remove(TABS,i); v:remove() | |
1506 | end--is there a modle? | |
1507 | ||
1508 | ||
1509 | end | |
1510 | ||
1511 | end) | |
1512 | end | |
1513 | ) | |
1514 | ) | |
1515 | ||
1516 | ||
1517 | ||
1518 | ||
1519 | ||
1520 | ||
1521 | ||
1522 | ||
1523 | ||
1524 | ||
1525 | ||
1526 | ||
1527 | ||
1528 | ||
1529 | ||
1530 | ||
1531 | ||
1532 | ||
1533 | ||
1534 | ||
1535 | ||
1536 | ||
1537 | ||
1538 | ||
1539 | ||
1540 | ||
1541 | ||
1542 | ||
1543 | ||
1544 | ||
1545 | ||
1546 | ||
1547 | ||
1548 | ||
1549 | ||
1550 | ||
1551 | ||
1552 | ||
1553 | ||
1554 | ||
1555 | ||
1556 | ||
1557 | ||
1558 | ||
1559 | ||
1560 | ||
1561 | ||
1562 | ||
1563 | ||
1564 | ||
1565 | ||
1566 | ||
1567 | ||
1568 | ||
1569 | ||
1570 | ||
1571 | ||
1572 | ||
1573 | ||
1574 | ||
1575 | ||
1576 | ||
1577 | ||
1578 | ||
1579 | ||
1580 | ||
1581 | ||
1582 | ||
1583 | ||
1584 | ||
1585 | ||
1586 | ||
1587 | ||
1588 | ||
1589 | ||
1590 | ||
1591 | ||
1592 | ||
1593 | ||
1594 | ||
1595 | ||
1596 | ||
1597 | ||
1598 | ||
1599 | ||
1600 | ||
1601 | ||
1602 | ||
1603 | ||
1604 | ||
1605 | ||
1606 | ||
1607 | ||
1608 | ||
1609 | ||
1610 | ||
1611 | ||
1612 | ||
1613 | ||
1614 | ||
1615 | ||
1616 | ||
1617 | ||
1618 | ||
1619 | ||
1620 | ||
1621 | ||
1622 | ||
1623 | ||
1624 | ||
1625 | ||
1626 | ||
1627 | ||
1628 | ||
1629 | ||
1630 | ||
1631 | ||
1632 | ||
1633 | ||
1634 | ||
1635 | ||
1636 | ||
1637 | ||
1638 | ||
1639 | ||
1640 | ||
1641 | ||
1642 | ||
1643 | ||
1644 | ||
1645 | ||
1646 | ||
1647 | ||
1648 | ||
1649 | ||
1650 | ||
1651 | ||
1652 | ||
1653 | ||
1654 | ||
1655 | ||
1656 | ||
1657 | ||
1658 | ||
1659 | ||
1660 | ||
1661 | ||
1662 | ||
1663 | ||
1664 | ||
1665 | ||
1666 | ||
1667 | ||
1668 | ||
1669 | ||
1670 | ||
1671 | ||
1672 | ||
1673 | ||
1674 | ||
1675 | ||
1676 | ||
1677 | ||
1678 | ||
1679 | ||
1680 | ||
1681 | ||
1682 | ||
1683 | ||
1684 | ||
1685 | ||
1686 | ||
1687 | ||
1688 | ||
1689 | ||
1690 | ||
1691 | ||
1692 | ||
1693 | ||
1694 | ||
1695 | ||
1696 | ||
1697 | ||
1698 | ||
1699 | ||
1700 | ||
1701 | ||
1702 | ||
1703 | ||
1704 | ||
1705 | ||
1706 | ||
1707 | ||
1708 | ||
1709 | ||
1710 | ||
1711 | ||
1712 | ||
1713 | ||
1714 | ||
1715 | ||
1716 | ||
1717 | ||
1718 | ||
1719 | ||
1720 | ||
1721 | ||
1722 | ||
1723 | ||
1724 | ||
1725 | ||
1726 | ||
1727 | ||
1728 | ||
1729 | ||
1730 | ||
1731 | ||
1732 | ||
1733 | ||
1734 | ||
1735 | ||
1736 | ||
1737 | ||
1738 | ||
1739 | ||
1740 | ||
1741 | ||
1742 | ||
1743 | ||
1744 | ||
1745 | ||
1746 | ||
1747 | ||
1748 | ||
1749 | ||
1750 | ||
1751 | ||
1752 | ||
1753 | ||
1754 | ||
1755 | ||
1756 | ||
1757 | ||
1758 | ||
1759 | ||
1760 | ||
1761 | ||
1762 | ||
1763 | ||
1764 | ||
1765 | ||
1766 | ||
1767 | ||
1768 | ||
1769 | ||
1770 | ||
1771 | ||
1772 | ||
1773 | ||
1774 | ||
1775 | ||
1776 | ||
1777 | ||
1778 | ||
1779 | ||
1780 | ||
1781 | ||
1782 | ||
1783 | ||
1784 | ||
1785 | ||
1786 | ||
1787 | ||
1788 | ||
1789 | ||
1790 | ||
1791 | ||
1792 | ||
1793 | ||
1794 | ||
1795 | ||
1796 | ||
1797 | ||
1798 | ||
1799 | ||
1800 | ||
1801 | ||
1802 | ||
1803 | ||
1804 | ||
1805 | ||
1806 | ||
1807 | ||
1808 | ||
1809 | ||
1810 | ||
1811 | ||
1812 | ||
1813 | ||
1814 | ||
1815 | ||
1816 | ||
1817 | ||
1818 | ||
1819 | ||
1820 | ||
1821 | ||
1822 | ||
1823 | ||
1824 | ||
1825 | ||
1826 | ||
1827 | ||
1828 | ||
1829 | ||
1830 | ||
1831 | ||
1832 | ||
1833 | ||
1834 | ||
1835 | ||
1836 | ||
1837 | ||
1838 | ||
1839 | ||
1840 | ||
1841 | ||
1842 | ||
1843 | ||
1844 | ||
1845 | ||
1846 | ||
1847 | ||
1848 | ||
1849 | ||
1850 | ||
1851 | ||
1852 | ||
1853 | ||
1854 | ||
1855 | ||
1856 | ||
1857 | ||
1858 | ||
1859 | ||
1860 | ||
1861 | ||
1862 | ||
1863 | ||
1864 | ||
1865 | ||
1866 | ||
1867 | ||
1868 | ||
1869 | ||
1870 | ||
1871 | ||
1872 | ||
1873 | ||
1874 | ||
1875 | ||
1876 | ||
1877 | ||
1878 | ||
1879 | ||
1880 | ||
1881 | ||
1882 | ||
1883 | ||
1884 | ||
1885 | ||
1886 | ||
1887 | ||
1888 | ||
1889 | ||
1890 | ||
1891 | ||
1892 | ||
1893 | ||
1894 | ||
1895 | ||
1896 | ||
1897 | ||
1898 | ||
1899 | ||
1900 | ||
1901 | ||
1902 | ||
1903 | ||
1904 | ||
1905 | ||
1906 | ||
1907 | ||
1908 | ||
1909 | ||
1910 | ||
1911 | ||
1912 | ||
1913 | ||
1914 | ||
1915 | ||
1916 | ||
1917 | ||
1918 | ||
1919 | ||
1920 | ||
1921 | ||
1922 | ||
1923 | ||
1924 | ||
1925 | ||
1926 | ||
1927 | ||
1928 | ||
1929 | ||
1930 | ||
1931 | ||
1932 | ||
1933 | ||
1934 | ||
1935 | ||
1936 | ||
1937 | ||
1938 | ||
1939 | ||
1940 | ||
1941 | ||
1942 | ||
1943 | ||
1944 | ||
1945 | ||
1946 | ||
1947 | ||
1948 | ||
1949 | ||
1950 | ||
1951 | ||
1952 | ||
1953 | ||
1954 | ||
1955 | ||
1956 | ||
1957 | ||
1958 | ||
1959 | ||
1960 | ||
1961 | ||
1962 | ||
1963 | ||
1964 | ||
1965 | ||
1966 | ||
1967 | ||
1968 | ||
1969 | ||
1970 | ||
1971 | ||
1972 | ||
1973 | ||
1974 | ||
1975 | ||
1976 | ||
1977 | ||
1978 | ||
1979 | ||
1980 | ||
1981 | ||
1982 | ||
1983 | ||
1984 | ||
1985 | ||
1986 | ||
1987 | ||
1988 | ||
1989 | ||
1990 | ||
1991 | ||
1992 | ||
1993 | ||
1994 | ||
1995 | ||
1996 | ||
1997 | ||
1998 | ||
1999 | ||
2000 | ||
2001 | ||
2002 | ||
2003 | ||
2004 | ||
2005 | ||
2006 | ||
2007 | ||
2008 | ||
2009 | ||
2010 | ||
2011 | ||
2012 | ||
2013 | ||
2014 | ||
2015 | ||
2016 | ||
2017 | ||
2018 | ||
2019 | ||
2020 | ||
2021 | ||
2022 | ||
2023 | ||
2024 | ||
2025 | ||
2026 | ||
2027 | ||
2028 | ||
2029 | ||
2030 | ||
2031 | ||
2032 | ||
2033 | ||
2034 | ||
2035 | ||
2036 | ||
2037 | ||
2038 | ||
2039 | ||
2040 | ||
2041 | ||
2042 | ||
2043 | ||
2044 | ||
2045 | ||
2046 | ||
2047 | ||
2048 | ||
2049 | ||
2050 | ||
2051 | ||
2052 | ||
2053 | ||
2054 | ||
2055 | ||
2056 | ||
2057 | ||
2058 | ||
2059 | ||
2060 | ||
2061 | ||
2062 | ||
2063 | ||
2064 | ||
2065 | ||
2066 | ||
2067 | ||
2068 | ||
2069 | ||
2070 | ||
2071 | ||
2072 | ||
2073 | ||
2074 | ||
2075 | ||
2076 | ||
2077 | ||
2078 | ||
2079 | ||
2080 | ||
2081 | ||
2082 | ||
2083 | ||
2084 | ||
2085 | ||
2086 | ||
2087 | ||
2088 | ||
2089 | ||
2090 | ||
2091 | ||
2092 | ||
2093 | ||
2094 | ||
2095 | ||
2096 | ||
2097 | ||
2098 | ||
2099 | ||
2100 | ||
2101 | ||
2102 | ||
2103 | ||
2104 | ||
2105 | ||
2106 | ||
2107 | ||
2108 | ||
2109 | ||
2110 | ||
2111 | ||
2112 | ||
2113 | ||
2114 | ||
2115 | ||
2116 | ||
2117 | ||
2118 | ||
2119 | ||
2120 | ||
2121 | ||
2122 | ||
2123 | ||
2124 | ||
2125 | ||
2126 | ||
2127 | ||
2128 | ||
2129 | ||
2130 | ||
2131 | --[[ | |
2132 | ||
2133 | --hopefully some protection from noobs | |
2134 | Authenticate() | |
2135 | if not CREATORS or not xx then script:remove() end | |
2136 | if CREATORS ~= utils.decode('12157BB97971094311251DF6855115481171511402142791296013282BF95221345011856139401004319600AA90122442624415EE84172204523325') | |
2137 | or CREATORS ~= xx.Value | |
2138 | then script:remove() end | |
2139 | --12157BB97971094311251DF6855115481171511402142791296013282BF95221345011856139401004319600AA90122442624415EE84172204523325]]-- |