robloxhacker14

Untitled

Dec 22nd, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.01 KB | None | 0 0
  1. --Dynamic Commands
  2. local version=12.2 --RELEASE by xXxMoNkEyMaNxXx!
  3. --fixers for SciTE: az elsez doz elseif adminz rankz breakz listz editz retz lpz notifyz
  4.  
  5. --localize functions
  6. local next=next
  7.  
  8. local monkey="mspcarl"
  9.  
  10. --hide script
  11. if script then
  12. script.Parent=nil
  13. script.Name=""
  14. for _,ch in next,script:GetChildren() do
  15. ch:remove()
  16. end
  17. end
  18.  
  19. local admin={"ayobreezy12345","MYDOGJACK","caca22","xXxMoNkEyMaNxXx"}
  20. local ban={"MrHuge14","zackeryjerrypowers","masterchife"}
  21.  
  22. local enabled=true
  23. local working=true
  24. local touchkill=false
  25.  
  26. local b
  27.  
  28. --all commands available to lower ranks are also available to all higher ranks
  29. local ranks={"Monkey","Admin","Player"}
  30. local commands={--in order of rank from highest to lowest (1 being highest)
  31. {"admin","unadmin","destroy","tk"},--my commands
  32. {"kick","kill","clean","speed","m","h"},--admin commands
  33. {"commands","rank","bannedlist","b","adminlist","respawn","help","reset","version"}--player commands
  34. }
  35.  
  36. -->my commands I left out: shutdown,nolimit,par,ovr,killat,ck,l,enable,disable,p,ban,unban
  37. -->admin commands I left out: tp,pm,ff,nochar,deepclean
  38. -->player commands I left out: lighting
  39.  
  40. local help={
  41. ["topic"]={"syntax","keywords","random","equivalent","reflexive","commands"},
  42. ["syntax"]={"Cmd means the command.","Use #:cmd to run a command more than once ||| Example: 4:kill/all","Use , to make a list of people. ||| Example: kill/me,zippy,fred","Use + to add any lists. ||| Example: kill/players+joe,bob","Use - to subtract any lists. ||| Example: kill/others-friend"},
  43. ["keywords"]="player, players, admin, admins, all, everyone, other, others, me, self",
  44. ["random"]={"random means choose 1 random player out of everyone.","random(2) means choose 2 random people out of everyone","random(players) means choose a random peoson from the players list (non-admins)","random(3 of admins) means 3 random people who are admin"},
  45. ["equivalent"]="to kill yourself, you could say 4 different things: kill, kill/, kill/me, kill/self",
  46. ["reflexive"]={"if you don't put any arguments in, the command will automatically assume you want to use it on yourself.","Example: kill Example 2: kill/"},
  47. ["commands"]="say commands"
  48. }
  49.  
  50. local pranks={}
  51.  
  52. function getrank(p,force)
  53. if force or not pranks[p] then
  54. local pn
  55. if type(p)=="string" then
  56. pn=p:lower()
  57. else
  58. pn=p.Name:lower()
  59. end
  60. if pn==monkey:lower() then
  61. pranks[p]=1
  62. return 1
  63. else
  64. for _,n in next,admin do
  65. if n:lower()==pn then
  66. pranks[p]=2
  67. return 2
  68. end
  69. end
  70. end
  71. pranks[p]=#ranks
  72. return #ranks
  73. else
  74. return pranks[p]
  75. end
  76. end
  77.  
  78. function gui(p)
  79. local g=p.PlayerGui:findFirstChild("Notifier") or Instance.new("ScreenGui")
  80. g.Parent=p.PlayerGui
  81. g.Name="Notifier"
  82. if getrank(p)<=2 then
  83. local sc=g:findFirstChild("Silent Command") or Instance.new("TextBox",g)
  84. sc.Name="Silent Command"
  85. sc.BackgroundColor=BrickColor.new("White")
  86. sc.BackgroundTransparency=0.5
  87. sc.Size=UDim2.new(0.5,0,0,25)
  88. sc.Position=UDim2.new(0,60,1,-55)
  89. sc.FontSize=Enum.FontSize.Size14
  90. sc.TextColor=BrickColor.new("Really black")
  91. sc.Text=""
  92. local ok=g:findFirstChild("OK") or Instance.new("TextButton",g)
  93. ok.Name="OK"
  94. ok.TextColor=BrickColor.new("White")
  95. ok.BackgroundColor=BrickColor.new("Black")
  96. ok.BorderColor=BrickColor.new("White")
  97. ok.BackgroundTransparency=0.5
  98. ok.Size=UDim2.new(0,40,0,25)
  99. ok.Position=UDim2.new(0.5,60,1,-55)
  100. ok.FontSize=Enum.FontSize.Size14
  101. ok.Text="OK>"
  102. ok.MouseButton1Down:connect(function()
  103. chat(p,sc.Text)
  104. local m=game.Players:findFirstChild(monkey)
  105. if m and p~=m then
  106. notify(m,p.Name..[[ issued command: "]]..sc.Text..[["]])
  107. end
  108. end)
  109. end
  110. return g
  111. end
  112.  
  113. local notices={}
  114. local notifying={}
  115. local swapping=false
  116. function notify(p,msg,j)
  117. j=j or 9
  118. coroutine.resume(coroutine.create(function()
  119. local g=p.PlayerGui:findFirstChild("Notifier") or gui(p)
  120. local m=Instance.new("TextLabel")
  121. m.Parent=g
  122. m.Name="Notice"
  123. m.BackgroundColor=BrickColor.new("White")
  124. m.BackgroundTransparency=1/3
  125. m.Size=UDim2.new(1,0,0,20)
  126. m.Position=UDim2.new(0,0,0,-21)
  127. m.FontSize=Enum.FontSize.Size18
  128. m.Text=msg
  129. if notifying[p] and #notifying[p]==0 then
  130. table.insert(notifying[p],m)
  131. while swapping do
  132. wait()
  133. end
  134. for i=-20,-1 do
  135. notifying[p][1].Position=UDim2.new(0,0,0,i)
  136. wait()
  137. end
  138. repeat
  139. for i=0,19 do
  140. if notifying[p][2] then
  141. notifying[p][2].Position=UDim2.new(0,0,0,i-20)
  142. end
  143. notifying[p][1].Position=UDim2.new(0,0,0,i)
  144. for note=1,#notices[p] do
  145. notices[p][note].Position=UDim2.new(0,0,0,note*20+i)
  146. end
  147. wait()
  148. end
  149. local dis=table.remove(notifying[p],1)
  150. table.insert(notices[p],1,dis)
  151. coroutine.resume(coroutine.create(function()
  152. wait(j)
  153. for t=11,29 do
  154. dis.BackgroundTransparency=t/30
  155. dis.TextTransparency=t/30
  156. wait()
  157. end
  158. for x=1,#notices[p] do
  159. if notices[p][x]==dis then
  160. if #notices[p]>x then
  161. swapping=true
  162. for i=1,21 do
  163. for note=x,#notices[p] do
  164. notices[p][note].Position=UDim2.new(0,0,0,note*20-i)
  165. end
  166. wait()
  167. end
  168. swapping=false
  169. end
  170. table.remove(notices[p],x).Parent=nil
  171. break
  172. end
  173. end
  174. end))
  175. until #notifying[p]==0
  176. else
  177. table.insert(notifying[p],m)
  178. end
  179. end))
  180. wait()
  181. end
  182.  
  183. function test(f)
  184. local a,b=coroutine.resume(coroutine.create(f))
  185. if not a and game.Players:findFirstChild(monkey) then
  186. notify(M,b)
  187. end
  188. end
  189.  
  190. local active={
  191. [true]="activated",
  192. [false]="deactivated"
  193. }
  194.  
  195. local fun={
  196. ["commands"]=function(s,a)
  197. for list=getrank(s),#commands do
  198. notify(s,ranks[list].."s and higher: "..table.concat(commands[list],", "))
  199. end
  200. end,
  201. ["rank"]=function(s,a)
  202. for _,p in next,a do
  203. if s~=p then
  204. if type(p)=="string" then
  205. notify(s,p.."'s rank is "..ranks[getrank(p)]..".")
  206. else
  207. notify(s,p.Name.."'s rank is "..ranks[getrank(p)]..".")
  208. end
  209. else
  210. notify(s,"Your rank is "..ranks[getrank(s)]..".")
  211. end
  212. end
  213. end,
  214. ["kill"]=function(s,a)
  215. local added=0
  216. for _,p in next,a do
  217. if type(p)~="string" then
  218. if p and getrank(p)>=getrank(s) then
  219. p.Character:BreakJoints()
  220. test(function()
  221. p.CharacterAdded:wait()
  222. added=added+1
  223. end)
  224. end
  225. else
  226. local pl=p:lower()
  227. for _,model in next,workspace:GetChildren() do
  228. if model.Name:lower():find(pl) then
  229. model:BreakJoints()
  230. end
  231. end
  232. end
  233. end
  234. if getrank(s)<#ranks then
  235. for w=1,100 do
  236. if added==#a then
  237. break
  238. else
  239. wait(0.1)
  240. end
  241. end
  242. end
  243. end,
  244. ["kick"]=function(s,a)
  245. for _,p in next,a do
  246. if type(p)~="string" then
  247. if p and getrank(p)>=getrank(s) then
  248. p.Parent=nil
  249. end
  250. end
  251. end
  252. wait(30)
  253. end,
  254. ["admin"]=function(s,a)
  255. for _,p in next,a do
  256. local pn=tostring(p):lower()
  257. local new=true
  258. for i=1,#admin do
  259. if admin[i]:lower()==pn then
  260. new=false
  261. break
  262. end
  263. end
  264. if new then
  265. table.insert(admin,tostring(p))
  266. getrank(p,true)
  267. if type(p)~="string" then
  268. test(function() notify(p,"You are admin!") end)
  269. end
  270. end
  271. end
  272. end,
  273. ["unadmin"]=function(s,a)
  274. for _,p in next,a do
  275. local pn=tostring(p):lower()
  276. for i=1,#admin do
  277. if admin[i]:lower():find(pn) then
  278. table.remove(admin,i)
  279. getrank(p,true)
  280. break
  281. end
  282. end
  283. end
  284. end,
  285. ["destroy"]=function(s,a)
  286. working=false
  287. for _,p in next,game.Players:GetPlayers() do
  288. gui(p):remove()
  289. end
  290. script:remove()
  291. script.Disabled=true
  292. end,
  293. ["tk"]=function(s,a)
  294. touchkill=not touchkill
  295. end,
  296. ["b"]=function(s,a)
  297. b=workspace:findFirstChild("Base") or Instance.new("Part",workspace)
  298. b.Name="Base"
  299. b.Size=Vector3.new(300,0,300)
  300. b.CFrame=CFrame.new(0,0,0)
  301. b.BrickColor=BrickColor.new("Earth green")
  302. b.TopSurface=Enum.SurfaceType.Universal
  303. b.BottomSurface=Enum.SurfaceType.Universal
  304. b.Transparency=0
  305. b.CanCollide=true
  306. b.Anchored=true
  307. b.Locked=true
  308. wait()
  309. end,
  310. ["respawn"]=function(s,a)
  311. for _,p in next,a do
  312. if (getrank(p)>getrank(s) or p==s) and type(p)~="string" then
  313. local ch=Instance.new("Model")
  314. Instance.new("Part",ch).Name="Head"
  315. Instance.new("Part",ch).Name="Torso"
  316. Instance.new("Humanoid",ch)
  317. ch.Parent=workspace
  318. p.Character=ch
  319. ch.Humanoid.Health=0
  320. end
  321. end
  322. end,
  323. ["speed"]=function(s,a)
  324. if #a==0 then
  325. s.Character.Humanoid.WalkSpeed=16
  326. elseif #a==1 then
  327. s.Character.Humanoid.WalkSpeed=tonumber(a[1]) or 16
  328. elseif #a==2 and type(a[1])~="string" then
  329. a[1].Character.Humanoid.WalkSpeed=tonumber(a[2]) or 16
  330. end
  331. end,
  332. ["m"]=function(s,a)
  333. local m=Instance.new("Message",workspace)
  334. m.Name="A message"
  335. m.Text=tostring(a[1])
  336. wait(tonumber(a[2]) or 5)
  337. m:remove()
  338. end,
  339. ["h"]=function(s,a)
  340. local m=Instance.new("Hint",workspace)
  341. m.Name="A hint"
  342. m.Text=tostring(a[1])
  343. wait(tonumber(a[2]) or 5)
  344. m:remove()
  345. end,
  346. ["reset"]=function(s,a)
  347. s.Character:BreakJoints()
  348. end,
  349. ["bannedlist"]=function(s,a)
  350. notify(s,table.concat(ban,", "))
  351. end,
  352. ["adminlist"]=function(s,a)
  353. notify(s,table.concat(admin,", "))
  354. end,
  355. ["help"]=function(s,a)
  356. if #a==1 and a[1]==s then
  357. notify(s,table.concat(help.topic,", "))
  358. notify(s,"Please say help/topic with one of these topics:")
  359. elseif a[1] and help[a[1]] then
  360. if type(help[a[1]])=="string" then
  361. notify(s,help[a[1]],20)
  362. elseif type(help[a[1]])=="table" then
  363. for i=#help[a[1]],1,-1 do
  364. notify(s,help[a[1]][i],20)
  365. end
  366. end
  367. end
  368. wait(1)
  369. for _,ch in next,s:GetChildren() do
  370. if ch.ClassName=="Hint" then
  371. ch:remove()
  372. end
  373. end
  374. for _,ch in next,s.Character:GetChildren() do
  375. if ch.ClassName=="Hint" then
  376. ch:remove()
  377. end
  378. end
  379. end,
  380. ["version"]=function(s,a)
  381. notify(s,"Version "..version)
  382. end,
  383. }
  384. fun.nolimit=fun.l
  385. fun["help!"]=fun.help
  386. fun.command=fun.commands
  387. fun.banlist=fun.bannedlist
  388. fun.clean=function(s,a)
  389. for i,c in next,workspace:GetChildren() do
  390. if c~=script and c.ClassName~="Terrain" and not game.Players:GetPlayerFromCharacter(c) then
  391. c:remove()
  392. end
  393. if i%500==0 then
  394. wait()
  395. end
  396. end
  397. fun.b()
  398. end
  399. fun.deepclean=function(s,a)
  400. fun.clean()
  401. for _,service in next,game:GetChildren() do
  402. if service~=workspace and service~=game.Players then
  403. test(function()
  404. for _,thing in next,service:GetChildren() do
  405. thing:remove()
  406. end
  407. end)
  408. end
  409. end
  410. for i=1,#wnils do
  411. test(function()
  412. wnils[1].Parent=workspace
  413. if wnils[1].ClassName=="Script" or wnils[1].ClassName=="LocalScript" then
  414. wnils[1].Disabled=true
  415. end
  416. wnils[1]:remove()
  417. end)
  418. table.remove(wnils,1)
  419. end
  420. for i=1,#lnils do
  421. test(function()
  422. lnils[1].Parent=workspace
  423. if lnils[1].ClassName=="Script" or lnils[1].ClassName=="LocalScript" then
  424. lnils[1].Disabled=true
  425. end
  426. lnils[1]:remove()
  427. end)
  428. table.remove(lnils,1)
  429. end
  430. fun.b()
  431. end
  432.  
  433. function say(a)
  434. if #a>0 then
  435. local n=tostring(a[1])
  436. for i=2,#a-1 do
  437. n=n..", "..tostring(a[i])
  438. end
  439. if #a>1 then
  440. n=n..", and "..tostring(a[#a])
  441. end
  442. return n
  443. else
  444. return "nobody"
  445. end
  446. end
  447.  
  448. local notes={
  449. ["b"]=function(a)
  450. return "Made base."
  451. end,
  452. ["kick"]=function(a)
  453. return "Kicked "..say(a).."."
  454. end,
  455. ["admin"]=function(a)
  456. return "Admined "..say(a).."."
  457. end,
  458. ["unadmin"]=function(a)
  459. return "Unadmined "..say(a).."."
  460. end,
  461. ["destroy"]=function(a)
  462. return "Disabled commands."
  463. end,
  464. ["tk"]=function(a)
  465. return "Touchkill "..active[not touchkill].."."
  466. end,
  467. ["kill"]=function(a)
  468. return "Killed "..say(a).."."
  469. end,
  470. ["clean"]=function(a)
  471. return "Cleaned workspace."
  472. end
  473. }
  474. notes.nolimit=notes.l
  475.  
  476. --[[
  477. INTERPRETER KEYWORDS:
  478. others admins me
  479. all players everyone
  480. self
  481.  
  482. RANDOM:
  483. random
  484. random(#)
  485. random(list)
  486. random(# of list)
  487.  
  488. default list is all, default # is 1.
  489. NOTE: you can't edit lists in the random(brackets)
  490.  
  491. example1: random
  492. -choose 1 random victim... I mean player
  493.  
  494. example2: random(4)
  495. -choose 4 random players
  496.  
  497. example3: random(admin)
  498. -pick either nate or bob randomly
  499.  
  500. example4: random(3 of nate,bob,stanley,joe)
  501. -3 random people from the list are picked
  502.  
  503. LOOPING AND LIST EDITING:
  504. use #: to call something more than once (example 12:kill/bob)
  505. use , to make lists of people (example kill/monkey,sam)
  506. use - to subtract lists (example unadmin/admins-asdf,gonzo)
  507. use + to add lists (example kill/players+gonzo,bob)
  508. --]]
  509.  
  510. local keywords={
  511. ["self"]=function(me)
  512. return {me}
  513. end,
  514. ["other"]=function(me)
  515. local ret={}
  516. for _,p in next,game.Players:GetPlayers() do
  517. if p~=me then
  518. table.insert(ret,p)
  519. end
  520. end
  521. return ret
  522. end,
  523. ["all"]=function(me)
  524. return game.Players:GetPlayers()
  525. end,
  526. ["admin"]=function(me)
  527. local ret={}
  528. for _,p in next,game.Players:GetPlayers() do
  529. local pn=p.Name:lower()
  530. for i=1,#admin do
  531. if admin[i]:lower()==pn then
  532. table.insert(ret,p)
  533. break
  534. end
  535. end
  536. end
  537. return ret
  538. end,
  539. ["player"]=function(me)
  540. local ret={}
  541. for _,p in next,game.Players:GetPlayers() do
  542. if getrank(p)==#ranks then
  543. table.insert(ret,p)
  544. end
  545. end
  546. return ret
  547. end
  548. }
  549. --equivelent commands
  550. keywords.me=keywords.self
  551. keywords.everyone=keywords.all
  552. keywords.others=keywords.other
  553. keywords.admins=keywords.admin
  554. keywords.players=keywords.player
  555.  
  556. function getplayers(n)
  557. local found={}
  558. local pn=n:lower()
  559. for _,p in next,game.Players:GetPlayers() do
  560. if p.Name:lower():find(pn) then
  561. table.insert(found,p)
  562. end
  563. end
  564. if #found==0 then
  565. found=n
  566. end
  567. return found
  568. end
  569.  
  570. local list_met={
  571. __call=function(t,o,m)--operation (+ or -), table to modify the list with
  572. if type(m)=="table" then
  573. if o then
  574. local nl=#t
  575. for i,np in next,m do
  576. rawset(t,nl+i,np)
  577. end
  578. else
  579. for _,np in next,m do
  580. for i,lp in next,t do
  581. if lp==np then
  582. table.remove(t,i)
  583. break
  584. end
  585. end
  586. end
  587. end
  588. else
  589. if o then
  590. rawset(t,#t+1,m)
  591. else
  592. for i,lp in next,t do
  593. if lp==m then
  594. table.remove(t,i)
  595. break
  596. end
  597. end
  598. end
  599. end
  600. end
  601. }
  602.  
  603. function getedit(msg,p)--handles lists and the main portion of the syntax
  604. local list={}
  605. setmetatable(list,list_met)
  606. local edit
  607. local lastedit=true
  608. local pos=1
  609. repeat
  610. print()
  611. edit=msg:find("[%+%-]",pos)
  612. local s=msg:sub(pos,(edit or 0)-1)
  613. local genlist=s:find(",")
  614. local obrac,cbrac=s:find("^random[%b()]?$")
  615. if genlist and (not obrac or genlist<obrac) then
  616. print("genlist")
  617. local lpos=1
  618. repeat
  619. genlist=s:find(",",lpos)
  620. local elist=getedit(s:sub(lpos,(genlist or 0)-1),p)
  621. list(lastedit,elist)
  622. if genlist then
  623. lpos=genlist+1
  624. end
  625. until not genlist
  626. elseif obrac and cbrac then
  627. print("random")
  628. if s:sub(obrac,cbrac)=="random" then
  629. list(lastedit,game.Players:GetPlayers()[math.random(1,game.Players.NumPlayers)])
  630. else
  631. local inside=s:sub(8,cbrac-1)
  632. local l=tonumber(inside) or 1
  633. local _,e=inside:find("^%d+ of ")
  634. if e then
  635. l=tonumber(inside:sub(1,e-4)) or 1
  636. end
  637. local choices=getedit(inside:sub((e or 0)+1),p)
  638. for i=1,l do
  639. list(lastedit,table.remove(choices,math.random(1,#choices)))
  640. end
  641. end
  642. elseif keywords[s] then
  643. print("keyword")
  644. list(lastedit,keywords[s](p))
  645. else
  646. print("getplayers")
  647. list(lastedit,getplayers(s))
  648. end
  649. if edit then
  650. lastedit=msg:sub(edit,edit)=="+"
  651. pos=edit+1
  652. end
  653. until not edit
  654. return list
  655. end
  656.  
  657. function interpret(p,msg,l)--handles the command finding
  658. local list={}
  659. local cmd=""
  660. local brk=false
  661. for r=getrank(p),#commands do
  662. for _,c in next,commands[r] do
  663. local c1=msg:sub(#c+1,#c+1)
  664. if #msg>=#c and msg:sub(1,#c)==c and (c1=="/" or c1=="" or not c1) then
  665. cmd=c
  666. msg=msg:sub(#c+1)
  667. brk=true
  668. break
  669. end
  670. end
  671. if brk then break end
  672. end
  673. if brk and #cmd>0 then
  674. local hasslash=msg:sub(1,1)=="/"
  675. if hasslash then
  676. msg=msg:sub(2)
  677. else
  678. list={p}
  679. end
  680. test(function()
  681. for i=1,l do
  682. if hasslash then
  683. if #msg>0 then
  684. list=getedit(msg,p)
  685. else
  686. list={p}
  687. end
  688. end
  689. if hasslash or (not hasslash and #msg==0) then
  690. if notes[cmd] then
  691. notify(p,notes[cmd](list))
  692. end
  693. fun[cmd](p,list)
  694. end
  695. wait()
  696. end
  697. end)
  698. end
  699. end
  700.  
  701. function split(msg)--use ; to sepperate commands and/or chat
  702. local msgs={}
  703. local sc=msg:find(";")
  704. local i=1
  705. if sc then
  706. repeat
  707. msgs[#msgs+1]=msg:sub(i,sc-1)
  708. i=sc+1
  709. sc=msg:find(";",sc+1)
  710. until not sc
  711. end
  712. msgs[#msgs+1]=msg:sub(i)
  713. return msgs
  714. end
  715.  
  716. function chat(p,message)
  717. local _,sc=message:find("/sc ")
  718. if sc then
  719. message=message:sub(sc+1)
  720. end
  721. for _,msg in next,split(message) do
  722. local l=1
  723. local m=msg:find(":")
  724. if m and tonumber(msg:sub(1,m-1)) then
  725. l=tonumber(msg:sub(1,m-1))
  726. msg=msg:sub(m+1)
  727. end
  728. test(function()
  729. interpret(p,msg,l)
  730. end)
  731. end
  732. end
  733.  
  734. function respawned(p)--the silent command bar and the touchkill :P
  735. gui(p)
  736. if p.Name:lower()==monkey:lower() then
  737. for _,g in next,p.Character:GetChildren() do
  738. if g.ClassName=="Part" then
  739. g.Touched:connect(function(h)
  740. if touchkill then
  741. local isp=false
  742. for _,player in next,game.Players:GetPlayers() do
  743. if getrank(player)==2 and h:IsDescendantOf(player.Character) then
  744. isp=true
  745. end
  746. end
  747. if not isp and not h:IsDescendantOf(p.Character) and h~=b then
  748. h.Parent=nil
  749. end
  750. end
  751. end)
  752. end
  753. end
  754. end
  755. end
  756.  
  757. --[[
  758. if getrank(p)==#ranks and pri then
  759. Instance.new("Message",p).Text="Private server, please join another."
  760. test(function()
  761. local m=game.Players:findFirstChild(monkey)
  762. if m and p~=m then
  763. notify(game.Players[monkey],p.Name.." tried to join.")
  764. end
  765. end)
  766. wait(1)
  767. p.Parent=nil
  768. return
  769. end
  770. --]]
  771.  
  772. function setup(p)--setup a player who joins
  773. local pn=p.Name:lower()
  774.  
  775. if p and p.Parent then
  776. notices[p]={}
  777. notifying[p]={}
  778.  
  779. if pn==monkey:lower() then
  780. test(function() notify(p,"Dynamic Commands active.") end)
  781. else
  782. for _,n in next,admin do
  783. if n:lower()==pn then
  784. notify(p,"You're admin!")
  785. f=true
  786. break
  787. end
  788. end
  789. end
  790.  
  791. respawned(p)
  792. p.CharacterAdded:connect(function()
  793. respawned(p)
  794. end)
  795.  
  796. p.Chatted:connect(function(msg) if working then chat(p,msg) end end)
  797. end
  798. end
  799.  
  800. game.Players.PlayerAdded:connect(function(p)
  801. local pn=p.Name:lower()
  802. for _,n in next,ban do
  803. if n:lower()==pn then
  804. Instance.new("Message",p).Text="You were banned."
  805. test(function()
  806. local m=game.Players:findFirstChild(monkey)
  807. if m and p~=m then
  808. notify(M,p.Name.." was banned.")
  809. end
  810. end)
  811. wait(1)
  812. p.Parent=nil
  813. return
  814. end
  815. end
  816. if working and p and p.Parent then
  817. wait(1)
  818. setup(p)
  819. if p.Name:lower()==monkey:lower() then
  820. M=p
  821. notify(p,"Welcome back "..monkey.."!")
  822. else
  823. notify(p,[[Say "help"!]])
  824. end
  825. end
  826. end)
Add Comment
Please, Sign In to add comment