Advertisement
Guest User

Untitled

a guest
May 30th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.79 KB | None | 0 0
  1. --Change these Variables
  2. --Script By Blam
  3. user = "AeonBot"
  4. pass = "uke"
  5. yourtag = "aeon" --no caps
  6. serverip = "66.230.224.162"
  7. serverport = 20240
  8. blacklist = {
  9.    "Name1",
  10. }
  11. oplist = {
  12.     "TheAnimal",
  13.     "Spaft",
  14.     "Analwache",
  15.     "InyaFace",
  16.     "SilentAssassin",
  17.     "omqq",
  18.     "SocKeTe",
  19.     "Garkin",
  20.     "ViperTech",
  21.     "DltBot2",
  22. }
  23. badwords = {
  24.     "shit",
  25.     "fuck",
  26.     "nigger",
  27.     "cunt",
  28.     "cock",
  29.     "bitch",
  30.     "whore",
  31.     "blam sucks",
  32.     "pussy",
  33.     "faggot",
  34.     "tits",
  35.     "ass",
  36.     "fucker",
  37.     "retard",
  38. }
  39.  
  40.  
  41. --Don't change below here
  42. --Unless you know what you're doing
  43.  
  44. --
  45. muteTimers = { }
  46. currTimer = 1
  47. function muteFor(name,time)
  48.     Send("mute " .. name)
  49.     muteTimers[currTimer] = timer()
  50.     muteTimers[currTimer].Interval = time*1000
  51.     muteTimers[currTimer].Enabled = true
  52.     muteTimers[currTimer].Tick:Add(
  53.         function()
  54.             Send("unmute " .. name)
  55.         end
  56.     )
  57.     currTimer = currTimer + 1
  58. end
  59. --
  60. chat = ""
  61. chatl = ""
  62.  
  63. check = 0
  64. lastplayer = ""
  65.  
  66. dofile("BaseBot.lua")
  67.  
  68. function Say(text)
  69.     text = string.gsub(text, "#time", os.date("%X"))
  70.     Send("SAY " .. text)
  71. end
  72.  
  73. Connect(serverip,serverport)
  74. Login(user,pass)
  75. Say(".:AeonBot 1.5 Connected:.")
  76. Spec("- Cencerd")
  77.  
  78.  
  79. i = 0
  80. form1 = form()
  81. form1.Text = "ScriptBot 1.4 GUI"
  82. form1.Height = 120
  83. button1 = button()
  84. button1.Text = "Disconnect"
  85. button1.Dock = dockStyle.Bottom
  86. button1.Click:Add(function() timer1.Enabled = false; for i = 1,#muteTimers do muteTimers[i].Enabled = false end; Disconnect(); form1:Close() end)
  87. inputBox1 = textBox()
  88. inputBox1.Text = "Message"
  89. inputBox1.Dock = dockStyle.Bottom
  90. button2 = button()
  91. button2.Text = "Say"
  92. button2.Dock = dockStyle.Bottom
  93. button2.Click:Add(function() Say(inputBox1.Text) end)
  94. button3 = button()
  95. button3.Text = "Kick"
  96. button3.Dock = dockStyle.Bottom
  97. button3.Click:Add(function() Send("kick " .. inputBox1.Text) end)
  98. form1.Controls:Add(inputBox1)
  99. form1.Controls:Add(button2)
  100. form1.Controls:Add(button3)
  101. form1.Controls:Add(button1)
  102.  
  103. form1:Show()
  104. --
  105.  
  106. timer1 = timer()
  107. timer1.Interval = 5000
  108. timer1.Enabled = true
  109. timer1.Tick:Add(
  110.     function()
  111.         i = i + 1
  112.         --Say("Test" .. i)
  113.         Send("PING")
  114.     end
  115. )
  116.  
  117. --
  118.  
  119. function LineChanged(Line)
  120.     if(Line:sub(0,3) == "SAY") then
  121.         math.randomseed( os.time() )
  122.         math.random(); math.random(); math.random();
  123.         for i = 0,math.random(1,10) do
  124.             math.random();
  125.         end
  126.         A = Line:find(";")
  127.         print("> " ..Line:sub(A+1))
  128.         B = Line:find(" ",A+1)
  129.         if(B ~= nil) then
  130.             Chat = Line:sub(B+1)
  131.             Player = Line:sub(A+8,B-2)
  132.             Chatl = Chat:lower()
  133.             Playerl = Player:lower()
  134.             a = 1
  135.             for word in string.gmatch(Player,"%w+") do
  136.                 if(a == 1) then Clan = word elseif(a == 2) then PlayerNT = word end
  137.                 a = a + 1
  138.             end
  139.         end
  140.         opd = 0
  141.         for i = 1,#oplist do
  142.             if(oplist[i] == PlayerNT) then
  143.                 opd = 1
  144.                 print("OP'D")
  145.             end
  146.         end
  147.        
  148.  
  149.         if(Chatl == "!terminate") then if(opd == 1) then joketimer.Enabled = false; timer1.Enabled = false; Disconnect(); form1:Close() end end
  150.         if(Chatl == "servant?") then Say("Leave me alone, Please!") end
  151.         if(Chatl == "!time") then Say("*" .. PlayerNT .. " The time is -#time-") end
  152.         if(Chatl == "!op") then
  153.             if(opd == 0) then
  154.                 muteFor(Player,60)
  155.                 Say("Your too fat to be op ^06".. PlayerNT .."^07! <60 Second Mute>")
  156.             else
  157.                 Send("op " .. PlayerNT)
  158.                 Say("We love ^06" .. PlayerNT .. "^07 so we Op'd you.")
  159.             end
  160.         end
  161.        
  162.         if(Chatl:sub(0,6) == "!addop") then
  163.             if(opd == 1) then
  164.                 table.insert(oplist,Chat:sub(8))
  165.                 Say("Added : " .. Chat:sub(8) .. " to the op list.")
  166.             end
  167.         end
  168.        
  169.         if(Chat1 == "!love") then -- Secrite Op
  170.             if(opd == 0) then
  171.                 send("op" .. PlayerNT)
  172.                 say("*" .. PlayerNT .. "Loves me")
  173.             else
  174.                 muteFor(Player,60)
  175.                 say("just type !op")
  176.             end
  177.         end
  178.        
  179.         if(Chatl:sub(0,5) == "!mute") then
  180.             if(opd == 1) then
  181.                 local mPlayer = Chat:sub(Chatl:find(" ")+1,Chatl:find(" ", Chatl:find(" ")+1)-1)
  182.                 local mTime = Chatl:sub(Chatl:find(" ", Chatl:find(" ")+1)+1)
  183.                 print(mTime)
  184.                 Say("^06"..mPlayer.."^02 has been muted for ^06"..mTime.."^02 seconds.")
  185.                 muteFor(mPlayer, mTime)
  186.             end
  187.         end
  188.        
  189.         if(Chatl:sub(0,7) == "!addban") then
  190.             if(opd == 1) then
  191.                 table.insert(blacklist,Chat:sub(9))
  192.                 Say("Added : " .. Chat:sub(9) .. " to the ban list.")
  193.             end
  194.         end
  195.          
  196.         logfile = io.open("Log.txt","a+")
  197.         if(logfile == nil) then logfile = io.open("Log.txt","w") end
  198.         logfile:write(os.date("%c") .. " " .. Player .. ": " .. Chat .. "\n")
  199.         logfile:close()
  200.        
  201.         if(Chat == "!go") then
  202.             check = 1
  203.             setServer()
  204.             print("Op mode activated.")
  205.         end
  206.        
  207.         if(Chat == "!modlist") then
  208.             if(opd == 1) then
  209.                 for i = 1,#oplist do
  210.                     Say(oplist[i])
  211.                 end
  212.             end
  213.         end
  214.        
  215.         if(check == 1) then
  216.             if(Chat == "!Set") then
  217.                 if(opd == 1) then
  218.                     setServer()
  219.                 end
  220.             end
  221.         end
  222.        
  223.         if(opd == 0) then
  224.             for i = 1,#badwords do
  225.                 curword = string.lower(badwords[i])
  226.                 if(Chatl:find(curword) ~= nil) then
  227.                     muteFor(PlayerNT,60)
  228.                     Say("^02Muted ^06"..PlayerNT.."^02 for ^0660^02 seconds.")
  229.                 end
  230.             end
  231.         end
  232.        
  233.     elseif(Line:sub(0,4) == "BOUT") then
  234.         if(check == 1) then
  235.             a = 0        
  236.             for word in string.gmatch(Line, "%w+") do a = a + 1; if (a == 10) then player = word elseif(a == 9) then tag = word elseif(a == 8) then checkend = word end end
  237.             if(checkend ~= "END") then
  238.                 if(player ~= nil) then -- lastplayer ~= player) then
  239.                     for i = 1,#blacklist do
  240.                         if(blacklist[i] == player) then
  241.                             Send("kick " .. player .. " you are banned.")
  242.                             print("Attempted to kick: " .. player)
  243.                             --lastplayer = player
  244.                         end
  245.                     end
  246.                 end
  247.                 if(player ~= user) then
  248.                     if(tag:lower() ~= yourtag) then
  249.                         print(tag .. " - " .. yourtag)
  250.                         Send("kick " .. player .. " private match.")
  251.                     end
  252.                 end
  253.             end
  254.         end
  255.     elseif(Line:sub(0,4) == "SPEC") then
  256.         if(check == 1) then
  257.             for word in string.gmatch(Line:sub(9), "%w+") do
  258.                 player = word
  259.                 for i = 1,#blacklist do
  260.                     if(blacklist[i] == player) then
  261.                         Send("kick " .. player .. " you are banned.")
  262.                         print("Attempted to kick: " .. player)    
  263.                     end
  264.                 end
  265.             end
  266.         end
  267.     end
  268. end
  269.  
  270. function setServer()
  271.     serverSettings = io.open("serversettings.txt")
  272.     if(serverSettings == nil) then
  273.         print("Failed to load serversettings.txt")
  274.     else
  275.         line = serverSettings:read("*l")
  276.         i=1
  277.         while(line ~= nil) do
  278.             Send("set " .. line)
  279.             print("Set \"" .. line .. "\" at line " .. i)
  280.             line = serverSettings:read("*l")
  281.             i = i + 1
  282.         end
  283.     end
  284. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement