Advertisement
Boss-1

Untitled

Nov 3rd, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.31 KB | None | 0 0
  1. _G["Master"]="semity" --master admin; access too all commands! its _G for easy access
  2.  
  3. local admin={}--add people who you want to be admins
  4.  
  5. local ban={}--add people you want to be banned
  6.  
  7. local speed=4.5 --speed before ANY message made by this script is removed(can be changed by the speed/ command)
  8.  
  9. local ScriptName=_G.Master.."'s Commands" --the scripts name(sets it this before its main starts)
  10.  
  11. local recentchat={}--DO Not Touch For People To Look At The Latest 25 Chats! :D Good Feature dont screw it up and disable it
  12.  
  13. local connects={}--DO NOT TOUCH!!! for fixing script
  14.  
  15. local rain=false--if true makes rain
  16.  
  17. local disco=false--if true makes disco
  18.  
  19. local messages={"Welcome to Jojoshshuaua's Command Script","The sound/volume/ Command goes on a scale of 0-10(0muted,1lowest volume,10max volume)","Ban,adminize,and kick commands are example of Master Admin Only Commands","Please Give Credit To Jojoshshuaua(http://www.roblox.com/User.aspx?ID=46651) For These Commands!"}--[[please keep; for new people with this script; gonna add
  20. commands later]]--
  21.  
  22. function Add1()
  23. table.insert(admin,1,_G.Master)
  24. end
  25.  
  26. Add1()
  27.  
  28. print(table.concat(admin))
  29.  
  30. function Check(Name,Model,Thing)
  31. if Name~=nil and Model~=nil and Thing==nil then
  32. if Model:FindFirstChild(Name)~=nil then
  33. return true
  34. end
  35. end
  36. if Thing~=nil then
  37. return true
  38. end
  39. return false
  40. end
  41.  
  42. function C(BOA,player)
  43. if BOA=="admin" then
  44. for i,v in pairs(admin) do
  45. if string.lower(player.Name)==string.lower(v) then
  46. return true
  47. end end end
  48. if BOA=="banned" then
  49. for i,v in pairs(ban) do
  50. if string.lower(player.Name)==string.lower(v) then
  51. return true
  52. end end end
  53. return false
  54. end
  55.  
  56. function GoTo(Pos,Force,Obj)
  57. local A = Instance.new("BodyPosition")
  58. A.maxForce = Force
  59. A.position = Pos
  60. A.Name="Float"
  61. A.Parent = Obj
  62. end
  63.  
  64. function Msg(type,where,text)
  65. if type=="h" then
  66. t="Hint"
  67. else
  68. t="Message"
  69. end
  70. local m=Instance.new(t)
  71. m.Text=text
  72. m.Parent=where
  73. wait(speed)
  74. m.Parent=nil
  75. end
  76.  
  77. Msg("m",game.Workspace,"Jojoshshuaua's Commands Loaded; Command Admin Currently: ".._G.Master..".")
  78.  
  79. function Message()
  80. if Check(_G.Master,game.Players) then
  81. for i,v in pairs(messages) do
  82. Msg("m",game.Players[_G.Master],v)
  83. end end end
  84.  
  85. function findplayer(name,speaker)
  86. if string.lower(name) == "all" then
  87. local chars = { }
  88. local c = game.Players:GetChildren()
  89. for i =1,#c do
  90. if c[i].ClassName == "Player" then
  91. table.insert(chars,c[i])
  92. end end
  93. return chars
  94. elseif string.sub(string.lower(name),1,9) == "nonadmins" then
  95. local nnum = 0
  96. local chars = { }
  97. local c = game.Players:GetChildren()
  98. for i=1,#c do
  99. local isadmin = false
  100. for i2 =1,#namelist do
  101. if namelist[i2] == c[i].Name then
  102. isadmin = true
  103. end end
  104. if isadmin == false then
  105. nnum = nnum + 1
  106. table.insert(chars,c[i])
  107. end end
  108. if nnum == 0 then
  109. return nil
  110. else
  111. return chars
  112. end
  113. elseif string.sub(string.lower(name),1,6) == "admins" then
  114. local anum = 0
  115. local chars = { }
  116. local c = game.Players:GetChildren()
  117. for i=1,#c do
  118. for i2 =1,#namelist do
  119. if namelist[i2] == c[i].Name then
  120. anum = anum + 1
  121. table.insert(chars,c[i])
  122. end end end
  123. if anum == 0 then
  124. return nil
  125. else
  126. return chars
  127. end
  128. elseif string.sub(string.lower(name),1,6) == "random" then
  129. while true do
  130. local c = game.Players:GetChildren()
  131. local r = math.random(1,#c)
  132. if c[r].ClassName == "Player" then
  133. return { c[r] }
  134. end end
  135. elseif string.sub(string.lower(name),1,6) == "guests" then
  136. local gnum = 0
  137. local chars = { }
  138. local c = game.Players:GetChildren()
  139. for i=1,#c do
  140. if string.sub(c[i].Name,1,5) == "Guest" then
  141. gnum = gnum + 1
  142. table.insert(chars,c[i])
  143. end end
  144. if gnum == 0 then
  145. return nil
  146. else
  147. return chars
  148. end
  149. elseif string.sub(string.lower(name),1,5) == "team " then
  150. local theteam = nil
  151. local tnum = 0
  152. if game.Teams ~= nil then
  153. local c = game.Teams:GetChildren()
  154. for i =1,#c do
  155. if c[i].ClassName == "Team" then
  156. if string.find(string.lower(c[i].Name),string.sub(string.lower(name),6)) == 1 then
  157. theteam = c[i]
  158. tnum = tnum + 1
  159. end end end
  160. if tnum == 1 then
  161. local chars = { }
  162. local c = game.Players:GetChildren()
  163. for i =1,#c do
  164. if c[i].ClassName == "Player" then
  165. if c[i].TeamColor == theteam.TeamColor then
  166. table.insert(chars,c[i])
  167. end end end
  168. return chars
  169. end end
  170. return nil
  171. elseif string.lower(name) == "me" then
  172. local person299 = { speaker }
  173. return person299
  174. elseif string.lower(name) == "others" then
  175. local chars = { }
  176. local c = game.Players:GetChildren()
  177. for i =1,#c do
  178. if c[i].ClassName == "Player" then
  179. if c[i] ~= speaker then
  180. table.insert(chars,c[i])
  181. end end end
  182. return chars
  183. else
  184. local chars = { }
  185. local commalist = { }
  186. local ssn = 0
  187. local lownum = 1
  188. local highestnum = 1
  189. local foundone = false
  190. while true do
  191. ssn = ssn + 1
  192. if string.sub(name,ssn,ssn) == "" then
  193. table.insert(commalist,lownum)
  194. table.insert(commalist,ssn - 1)
  195. highestnum = ssn - 1
  196. break
  197. end
  198. if string.sub(name,ssn,ssn) == "," then
  199. foundone = true
  200. table.insert(commalist,lownum)
  201. table.insert(commalist,ssn)
  202. lownum = ssn + 1
  203. end end
  204. if foundone == true then
  205. for ack=1,#commalist,2 do
  206. local cnum = 0
  207. local char = nil
  208. local c = game.Players:GetChildren()
  209. for i =1,#c do
  210. if c[i].ClassName == "Player" then
  211. if string.find(string.lower(c[i].Name),string.sub(string.lower(name),commalist[ack],commalist[ack + 1] - 1)) == 1 then
  212. char = c[i]
  213. cnum = cnum + 1
  214. end end end
  215. if cnum == 1 then
  216. table.insert(chars,char)
  217. end end
  218. if #chars ~= 0 then
  219. return chars
  220. else
  221. return nil
  222. end
  223. else
  224. local cnum = 0
  225. local char = nil
  226. local c = game.Players:GetChildren()
  227. for i =1,#c do
  228. if c[i].ClassName == "Player" then
  229. if string.find(string.lower(c[i].Name),string.lower(name)) == 1 then
  230. char = {c[i]}
  231. cnum = cnum + 1
  232. end end end
  233. if cnum == 1 then
  234. return char
  235. elseif cnum == 0 then
  236. local m=Instance.new("Message")
  237. m.Text="That name is not found."
  238. m.Parent=speaker
  239. wait(1)
  240. m.Parent=nil
  241. return nil
  242. elseif cnum > 1 then
  243. local m=Instance.new("Message")
  244. m.Text="That name is ambiguous."
  245. m.Parent=speaker
  246. wait(1)
  247. m.Parent=nil
  248. return nil
  249. end end end end
  250.  
  251. function FixChat(msg,me)
  252. table.insert(recentchat,me.name..": "..msg,1)
  253. if #recentchat==26 then
  254. table.remove(recentchat,26)
  255. end
  256. if string.match(msg, "fix") then
  257. for i,v in pairs(connects) do
  258. v:disconnect()
  259. end
  260. if Check(_G.Master,game.Players) then
  261. local c=game.Players[_G.Master]:connect(function (msg) Chat(msg, game.Players[_G.Master]) end )
  262. table.insert(connects,c)
  263. c:connect()
  264. end
  265. for i,v in pairs(game.Players:children()) do
  266. if C("admin",v) then
  267. local cc=v.Chatted:connect(function (msg) Chat(msg, v) end )
  268. table.insert(connects,cc)
  269. cc:connect()
  270. end end end end
  271.  
  272. function Chat(msg, me)
  273. local speaker=me
  274. local sname=string.lower(speaker.Name)
  275.  
  276. if string.match(msg, "m/") then
  277. local text=string.sub(msg, string.find(msg, "m/")+2)
  278. local m=Instance.new("Message")
  279. m.Text=text
  280. m.Parent=game.Workspace
  281. wait(speed)
  282. m.Parent=nil
  283. end
  284.  
  285. if string.match(msg, "disco") and not string.match("stop") then
  286. disco=true
  287. end
  288.  
  289. if string.match(msg, "disco") and string.match(msg, "stop") then
  290. disco=false
  291. end
  292.  
  293. if string.match(msg, "rain") and not string.match(msg, "stop") then
  294. rain=true
  295. end
  296.  
  297. if string.match(msg, "rain") and not string.match(msg, "stop") then
  298. rain=false
  299. end
  300.  
  301. if string.match(msg, "h/") then
  302. local text=string.sub(msg,string.find(msg, "h/")+2)
  303. local m=Instance.new("Hint")
  304. m.Text="text"
  305. m.Parent=game.Workspace
  306. wait(speed)
  307. m.Parent=nil
  308. end
  309.  
  310. if string.match(msg, "speed/") then
  311. local speed1=string.sub(msg, string.find(msg, "speed/")+string.len("speed/"))
  312. if type(string.byte(speed))=="number" then
  313. speed=speed1
  314. end end
  315.  
  316. if string.match(msg, "freeze/") then
  317. local text=string.sub(msg, string.find(msg, "freeze/")+string.len("freeze/"))
  318. local player=findplayer(text, me)
  319. if Check(nil,nil,player) then
  320. if Check("Character",player) then
  321. local f=player.Character:children()
  322. for i,v in pairs(f) do
  323. if v.ClassName=="Part" then
  324. v.Reflectance=1
  325. v.Anchored=true
  326. end end end end end
  327.  
  328. if string.match(msg, "thaw/") then
  329. local text=string.sub(msg, string.find(msg, "thaw/")+string.len("thaw/"))
  330. local player=findplayer(text, me)
  331. if Check(nil,nil,player) then
  332. if Check("Character",player) then
  333. local f=player.Character:children()
  334. for i,v in pairs(f) do
  335. if v.ClassName=="Part" then
  336. v.Reflectance=0
  337. v.Anchored=false
  338. end end end end end
  339.  
  340. if string.match(msg, "float/") then
  341. local text=string.sub(msg, string.find(msg "float/")+string.len("float/"))
  342. local player=findplayer(text,me)
  343. if Check(nil,nil,player) then
  344. if Check("Character",player) then
  345. if Check("Torso",player.Character) then
  346. GoTo(vector3.new(0,150,0),vector3.new(0,math.high,0),player.Character.Torso)
  347. end end end end
  348.  
  349. if string.match(msg, "defloat/") then
  350. local text=string.sub(msg, string.find(msg "defloat/")+string.len("defloat/"))
  351. local player=findplayer(text,me)
  352. if Check(nil,nil,player) then
  353. if Check("Character",player) then
  354. if Check("Torso",player.Character) then
  355. if Check("Float",player.Character.Torso) then-- ZZZZzzzzz.......
  356. player.Character.Torso.Float.Parent=nil--getting bored :<(
  357. end end end end end -- ZZZZzzzzz.......
  358.  
  359.  
  360. if string.match(msg, "clear/") then
  361. for i=1, #admin do
  362. table.remove(admin,i)
  363. end
  364. Add1()
  365. end
  366.  
  367. if string.match(msg, "sound") then
  368. if string.match(msg, "fjords") then
  369. s = Instance.new("Sound")
  370. s.Name = "Wind Of Fjords"
  371. s.SoundId = "http://www.roblosx.com/Asset/?id=1015394"
  372. s.Volume = 1
  373. if string.match(msg, "loop") then
  374. s.Looped = true
  375. else
  376. s.Looped = false
  377. end
  378. s.Parent = game.Workspace
  379. s:play()
  380. end
  381. if string.match(msg, "hippo") then
  382. s = Instance.new("Sound")
  383. s.Name = "I Want A Hippo For Christmas"
  384. s.SoundId = "C:/Documents and Settings/mark/Desktop/i-want-a-hippopotamus-for-christmas.mp3"
  385. s.Volume = 1
  386. if string.match(msg, "loop") then
  387. s.Looped = true
  388. else
  389. s.Looped = false
  390. end
  391. s.Parent = game.Workspace
  392. s:play()
  393. end
  394. if string.match(msg, "blues") then
  395. s = Instance.new("Sound")
  396. s.Name = "Highway Blues"
  397. s.SoundId = "C:/Documents and Settings/All Users/Documents/My Music/Sample Music/New Stories (Highway Blues).wma"
  398. s.Volume = 1
  399. if string.match(msg, "loop") then
  400. s.Looped = true
  401. else
  402. s.Looped = false
  403. end
  404. s.Parent = game.Workspace
  405. s:play()
  406. end
  407. if string.match(msg, "beet") then
  408. s = Instance.new("Sound")
  409. s.Name = "Symphony No. 9"
  410. s.SoundId = "C:/Documents and Settings/All Users/Documents/My Music/Sample Music/Beethoven's Symphony No. 9 (Scherzo).wma"
  411. s.Volume = 1
  412. if string.match(msg, "loop") then
  413. s.Looped = true
  414. else
  415. s.Looped = false
  416. end
  417. s.Parent = game.Workspace
  418. s:play()
  419. end
  420. if string.match(msg, "town") then
  421. s = Instance.new("Sound")
  422. s.Name = "Town"
  423. s.SoundId = "C:/WINDOWS/Media/town.mid"
  424. s.Volume = 0.75
  425. if string.match(msg, "loop") then
  426. s.Looped = true
  427. else
  428. s.Looped = false
  429. end
  430. s.Parent = game.Workspace
  431. s:play()
  432. end
  433. if string.match(msg, "one") and string.match(msg, "stop") then
  434. s = Instance.new("Sound")
  435. s.Name = "One Stop"
  436. s.SoundId = "C:\\WINDOWS\\Media\\onestop.mid"
  437. s.Volume = 1
  438. if string.match(msg, "loop") then
  439. s.Looped = true
  440. else
  441. s.Looped = false
  442. end
  443. s.Parent = game.Workspace
  444. s:play()
  445. end
  446. if string.match(msg, "flourish") then
  447. s = Instance.new("Sound")
  448. s.Name = "Flourish"
  449. s.SoundId = "C:/WINDOWS/Media/flourish.mid"
  450. s.Volume = 0.75
  451. if string.match(msg, "loop") then
  452. s.Looped = true
  453. else
  454. s.Looped = false
  455. end
  456. s.Parent = game.Workspace
  457. s:play()
  458. end
  459. if string.match(msg, "ding") then
  460. s = Instance.new("Sound")
  461. s.Name = "Ding"
  462. s.SoundId = "C:/WINDOWS/Media/ding.wav"
  463. s.Volume = 1
  464. if string.match(msg, "loop") then
  465. s.Looped = true
  466. else
  467. s.Looped = false
  468. end
  469. s.Parent = game.Workspace
  470. s:play()
  471. end
  472. if string.match(msg, "chimes") then
  473. s = Instance.new("Sound")
  474. s.Name = "Chimes"
  475. s.SoundId = "C:/WINDOWS/Media/chimes.wav"
  476. s.Volume = 1
  477. if string.match(msg, "loop") then
  478. s.Looped = true
  479. else
  480. s.Looped = false
  481. end
  482. s.Parent = game.Workspace
  483. s:play()
  484. end
  485. if string.match(msg, "title") then
  486. s = Instance.new("Sound")
  487. s.Name = "Title"
  488. s.SoundId = "C:/WINDOWS/system32/oobe/images/title.wma"
  489. s.Volume = 1
  490. if string.match(msg, "loop") then
  491. s.Looped = true
  492. else
  493. s.Looped = false
  494. end
  495. s.Parent = game.Workspace
  496. s:play()
  497. end
  498. if string.match(msg, "tada") then
  499. s = Instance.new("Sound")
  500. s.Name = "Ta-da!"
  501. s.SoundId = "C:/WINDOWS/Media/tada.wav"
  502. s.Volume = 1
  503. if string.match(msg, "loop") then
  504. s.Looped = true
  505. else
  506. s.Looped = false
  507. end
  508. s.Parent = game.Workspace
  509. s:play()
  510. end
  511. if string.match(msg, "click 1") then
  512. s = Instance.new("Sound")
  513. s.Name = "click"
  514. s.SoundId = "C:/WINDOWS/Media/start.wav"
  515. s.Volume = 1
  516. if string.match(msg, "loop") then
  517. s.Looped = true
  518. else
  519. s.Looped = false
  520. end
  521. s.Parent = game.Workspace
  522. s:play()
  523. end
  524. if string.match(msg, "click 2") then
  525. s = Instance.new("Sound")
  526. s.Name = "click"
  527. s.SoundId = "C:/WINDOWS/system32/oobe/images/clickerx.wav"
  528. s.Volume = 1
  529. if string.match(msg, "loop") then
  530. s.Looped = true
  531. else
  532. s.Looped = false
  533. end
  534. s.Parent = game.Workspace
  535. s:play()
  536. end
  537. if string.match(msg, "ring 1") then
  538. s = Instance.new("Sound")
  539. s.Name = "Ring"
  540. s.SoundId = "C:/WINDOWS/Media/ringin.wav"
  541. s.Volume = 1
  542. if string.match(msg, "loop") then
  543. s.Looped = true
  544. else
  545. s.Looped = false
  546. end
  547. s.Parent = game.Workspace
  548. s:play()
  549. end
  550. if string.match(msg, "ring 2") then
  551. s = Instance.new("Sound")
  552. s.Name = "Ring"
  553. s.SoundId = "C:/WINDOWS/Media/ringout.wav"
  554. s.Volume = 1
  555. if string.match(msg, "loop") then
  556. s.Looped = true
  557. else
  558. s.Looped = false
  559. end
  560. s.Parent = game.Workspace
  561. s:play()
  562. end
  563. if string.match(msg, "fire") and string.match(msg, "emblem")then
  564. s = Instance.new("Sound")
  565. s.Name = "Fire Emblem Theme"
  566. s.SoundId = "http://www.roblox.com/Asset/?id=1372259"
  567. s.Volume = 1
  568. if string.match(msg, "loop") then
  569. s.Looped = true
  570. else
  571. s.Looped = false
  572. end
  573. s.Parent = game.Workspace
  574. s:play()
  575. end
  576. if string.match(msg, "halo") then
  577. s = Instance.new("Sound")
  578. s.Name = "Halo Theme"
  579. s.SoundId = "http://www.roblox.com/Asset/?id=1034065"
  580. s.Volume = 1
  581. if string.match(msg, "loop") then
  582. s.Looped = true
  583. else
  584. s.Looped = false
  585. end
  586. s.Parent = game.Workspace
  587. s:play()
  588. end
  589. if string.match(msg, "angel") then
  590. s = Instance.new("Sound")
  591. s.Name = "One Winged Angel"
  592. s.SoundId = "http://www.roblox.com/Asset/?id=1372260"
  593. s.Volume = 1
  594. if string.match(msg, "loop") then
  595. s.Looped = true
  596. else
  597. s.Looped = false
  598. end
  599. s.Parent = game.Workspace
  600. s:play()
  601. end
  602. if string.match(msg, "pokemon") then
  603. s = Instance.new("Sound")
  604. s.Name = "Pokemon Theme"
  605. s.SoundId = "http://www.roblox.com/Asset/?id=1372261"
  606. s.Volume = 1
  607. if string.match(msg, "loop") then
  608. s.Looped = true
  609. else
  610. s.Looped = false
  611. end
  612. s.Parent = game.Workspace
  613. s:play()
  614. end
  615. if string.match(msg, "mario") then
  616. s = Instance.new("Sound")
  617. s.Name = "Super Mario 64 Theme"
  618. s.SoundId = "http://www.roblox.com/Asset/?id=1280470"
  619. s.Volume = 1
  620. if string.match(msg, "loop") then
  621. s.Looped = true
  622. else
  623. s.Looped = false
  624. end
  625. s.Parent = game.Workspace
  626. s:play()
  627. end
  628. if string.match(msg, "star") and string.match(msg, "fox") then
  629. s = Instance.new("Sound")
  630. s.Name = "Star Fox Theme"
  631. s.SoundId = "http://www.roblox.com/Asset/?id=1372262"
  632. s.Volume = 1
  633. if string.match(msg, "loop") then
  634. s.Looped = true
  635. else
  636. s.Looped = false
  637. end
  638. s.Parent = game.Workspace
  639. s:play()
  640. end
  641. --[[
  642. if string.match(msg, "") then
  643. s = Instance.new("Sound")
  644. s.Name = ""
  645. s.SoundId = ""
  646. s.Volume = 1
  647. if string.match(msg, "loop") then
  648. s.Looped = true
  649. else
  650. s.Looped = false
  651. end
  652. s.Parent = game.Workspace
  653. s:play()
  654. end
  655. ]]
  656. if string.sub(msg, 1,string.len("sound/volume/"))=="sound/volume/" then
  657. local p=game.Workspace:children()
  658. for i,v in pairs(p) do
  659. if v.ClassName=="Sound" then
  660. v.Volume=string.sub(msg, string.len("sound/volume/")+1)/10
  661. end end end
  662. if string.sub(msg, 1, 10) == "sound/new/" then
  663. s = Instance.new("Sound")
  664. s.Name = "Windows Welcome Music"
  665. s.SoundId = string.sub(msg, 11)
  666. s.Volume = 1
  667. s.Looped = true
  668. s.Parent = game.Workspace
  669. s:play()
  670. end
  671. if string.match(msg, "stop") then
  672. part = game.Workspace:GetChildren()
  673. for i = 1, #part do
  674. if part[i].ClassName == "Sound" then
  675. part[i]:stop()
  676. wait(0.1)
  677. remove(part[i])
  678. wait(0.01)
  679. end
  680. end
  681. end
  682. end
  683.  
  684. if string.match(msg, "recent") and string.match(msg, "chat") then
  685. for i,v in pairs(recentchat) do
  686. Msg("h",me,recentchat)
  687. end end
  688.  
  689. if me.Name==_G.Master then
  690.  
  691. if string.match(msg, "admin/") then
  692. local text=string.sub(msg, string.find(msg, "admin/")+string.len("admin/"))
  693. local player=findplayer(text,me)
  694. if Check(nil,nil,player) then
  695. if not C("admin",player) then
  696. table.insert(admin,player.name)
  697. end end end
  698.  
  699. if string.match(msg, "deadmin/") then
  700. local text=string.sub(msg, string.find(msg, "deadmin/")+string.len("deadmin/"))
  701. local m=Instance.new("Model")
  702. m.Name=text
  703. if C("admin",m) then
  704. for i,v in pairs(admin) do
  705. if string.lower(text)==string.lower(v) then
  706. table.remove(admin,i)
  707. end
  708. for i,v in pairs(connectors) do
  709. if string.match(string.lower(v),string.lower(text)) then
  710. v:disconnect()
  711. table.remove(connectors,i)
  712. end end end end end
  713.  
  714. if string.match(msg, "listadmin") then
  715. for i,v in pairs(admin) do
  716. Msg("m",me,v.." #"..i.." In The List.")
  717. end end
  718.  
  719. if string.match(msg, "listbanned") then
  720. for i,v in pairs(ban) do
  721. Msg("m",me,v.." #"..i.." In The List.")
  722. end end
  723.  
  724. if string.match(msg, "ban/") then
  725. local text=string.sub(msg, string.find(msg, "ban/")+string.len("ban/"))
  726. local player=findplayer(text,me)
  727. if Check(nil,nil,player) then
  728. if not C("admin",player) then
  729. table.insert(ban,player.Name)
  730. player.Parent=nil
  731. end end end
  732.  
  733. if string.match(msg, "kick/") then
  734. local text=string.sub(msg, string.find(msg, "kick/")+string.len("kick/"))
  735. local player=findplayer(text,me)
  736. if Check(nil,nil,player) then
  737. if player~=me then
  738. if not C("admin",player) then
  739. player.Parent=nil
  740. end end end end
  741.  
  742. if string.match(msg, "changema/") then
  743. local text=string.sub(msg, string.find(msg, "changema/")+string.len("changema/"))
  744. local p=findplayer(text,me)
  745. if Check(nil,nil,p) then
  746. _G.Master=p.Name
  747. Msg("h",me,"You Have Been Demoted To Admin.")
  748. Msg("h",p,"You Have Been Promoted To Master Admin")
  749. if not C("admin",p) then
  750. table.insert(admin,p.Name)
  751. local con=p.Chatted:connect(function (msg) Chat(msg, p) end )
  752. table.insert(connectors,con)
  753. con:connect()
  754. end end end
  755.  
  756. if string.match(msg, "unban/") then
  757. local text=string.sub(msg, string.find(msg, "unban/")+string.len("unban/"))
  758. local m=Instance.new("Model")
  759. m.Name=text
  760. if C("banned",m) then
  761. for i,v in pairs(ban) do
  762. if string.lower(text)==string.lower(v) then
  763. table.remove(ban,i)
  764. end end end end
  765.  
  766. end --for masteradmin check
  767.  
  768. end --for Chat function
  769.  
  770. function Add(Person)
  771. local msgs=false
  772. if Check(_G.Master,game.Players) then
  773. msgs=true
  774. end
  775. if C("admin",Person) then
  776. if msgs==true then
  777. Msg("h",game.Players[_G.Master],Person.Name.."(Admin) Has Entered")
  778. end
  779. local conn=Person.Chatted:connect(function (msg) Chat(msg,Person) end )
  780. table.insert(connects,conn)
  781. conn:connect()
  782. Person.Chatted:connect(function (msg) FixChat(msg, Person) end)
  783. Msg("m",Person,"Admin Connected")
  784. Msg("m",Person,"Speak Commands")
  785. return
  786. end
  787. if C("banned",Person) then
  788. if msgs==true then
  789. Msg("h",game.Players[_G.Master],Person.Name.." Has Been Banned")
  790. end
  791. Msg("m",Person,"Banned!")
  792. Person.Parent=nil
  793. return
  794. end
  795. if msgs==true then
  796. Msg("h",game.Players[_G.Master],Person.Name.." Has Entered")
  797. end
  798. Person.Chatted:connect(function (msg) FixChat(msg, Person) end )
  799. Msg("m",Person,"\"Fix\" Loaded")
  800. end
  801.  
  802. function Remove(Person)
  803. if Check(_G.Master,game.Players) then
  804. Msg("h",game.Players[_G.Master],Person.Name.." Has Left")
  805. end end
  806.  
  807. game.Players.PlayerRemoving:connect(Remove)
  808.  
  809. game.Players.PlayerAdded:connect(Add)
  810.  
  811. while true do--rain and disco check
  812. if disco==true then
  813. local d,dd,ddd,n=math.random(1,255),math.random(1,255),math.rondom(1,255),d+dd+ddd/3
  814. if n>211 then
  815. n=211
  816. end
  817. game.Lighting.Ambient=vector3.new(d,dd,ddd)
  818. if Check("Base",game.Workspace) then
  819. if game.Workspace.Base.ClassName=="Part" then
  820. game.Workspace.Base.BrickColor=BrickColor.new(n)
  821. end end end
  822. if rain==true then
  823. local p,po,pos,color=math.random(1,100),math.random(1,100),math.random(1,100),math.random(211,211)
  824. local p=Instance.new("Part")
  825. p.Size=Vector3.new(2.5,2.5,2.5)
  826. p:MoveTo(vector3.new(p,po,pos))
  827. p.Parent=game.Workspace
  828. p.BrickColor=BrickColor.new(color)
  829. p.FormFactor="Symmetric"
  830. p.Shape="Ball"
  831. p.Friction=0
  832. p.Elasticity=.75
  833. p.CanCollide=true
  834. p.Locked=true
  835. p.Anchored=false
  836. p.archivable=true
  837. p.BottomSurface="Smooth"
  838. p.TopSurface="Smooth"
  839. p.Refelctance=.359
  840. p.Transparency=.183
  841. p.Velocity=vector3.new(100,0,0)
  842. p.RotVelocity=vector3.new(0,0,100)
  843. end
  844. wait()
  845. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement