Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.08 KB | None | 0 0
  1. --Change these Variables
  2. --Script By Tryton
  3. user = "UniteamBOT"
  4. pass = "Uniteambottest"
  5. yourtag = "aeon"
  6. serverip = "66.230.224.162"
  7. serverport = 20223
  8. blacklist = {
  9. "Name1",
  10. }
  11. oplist = {
  12. "Tryton",
  13. "Ishi",
  14. "Hampa",
  15. "Enzu",
  16. }
  17. badwords = {
  18. "shit",
  19. "fuck",
  20. "nigger",
  21. "cunt",
  22. "cock",
  23. "bitch",
  24. "whore",
  25. "fezch sucks",
  26. "pussy",
  27. "faggot",
  28. "tits",
  29. "ass",
  30. "fucker",
  31. "retard",
  32. }
  33.  
  34. --
  35. muteTimers = { }
  36. currTimer = 1
  37. function muteFor(name,time)
  38. Send("/mute " .. name)
  39. muteTimers[currTimer] = timer()
  40. muteTimers[currTimer].Interval = time*1000
  41. muteTimers[currTimer].Enabled = true
  42. muteTimers[currTimer].Tick:Add(
  43. function()
  44. Send("/unmute " .. name)
  45. end
  46. )
  47. currTimer = currTimer + 1
  48. end
  49. --
  50.  
  51. check = 0
  52. lastplayer = ""
  53.  
  54. dofile("Scripts/BaseBot.lua")
  55.  
  56. function Say(text)
  57. text = string.gsub(text, "#time", os.date("%X"))
  58. Send("SAY " .. text)
  59. end
  60.  
  61. Connect(serverip,serverport)
  62. Login(user,pass)
  63. Say(".:UniteamBot Connected:.")
  64. Spec("- Spectator")
  65.  
  66.  
  67. i = 0
  68. form1 = form()
  69. form1.Text = "ScriptBot 1.3 GUI"
  70. form1.Height = 120
  71. button1 = button()
  72. button1.Text = "Disconnect"
  73. button1.Dock = dockStyle.Bottom
  74. button1.Click:Add(function() timer1.Enabled = false; for i = 1,#muteTimers do muteTimers[i].Enabled = false end; Disconnect(); form1:Close() end)
  75. inputBox1 = textBox()
  76. inputBox1.Text = "Message"
  77. inputBox1.Dock = dockStyle.Bottom
  78. button2 = button()
  79. button2.Text = "Say"
  80. button2.Dock = dockStyle.Bottom
  81. button2.Click:Add(function() Say(inputBox1.Text) end)
  82. button3 = button()
  83. button3.Text = "Kick"
  84. button3.Dock = dockStyle.Bottom
  85. button3.Click:Add(function() Send("kick " .. inputBox1.Text) end)
  86. form1.Controls:Add(inputBox1)
  87. form1.Controls:Add(button2)
  88. form1.Controls:Add(button3)
  89. form1.Controls:Add(button1)
  90.  
  91. form1:Show()
  92. --
  93.  
  94. timer1 = timer()
  95. timer1.Interval = 5000
  96. timer1.Enabled = true
  97. timer1.Tick:Add(
  98. function()
  99. i = i + 1
  100. --Say("Test" .. i)
  101. Send("PING")
  102. end
  103. )
  104.  
  105. --
  106.  
  107. function LineChanged(Line)
  108. if(Line:sub(0,3) == "SAY") then
  109. math.randomseed( os.time() )
  110. math.random(); math.random(); math.random();
  111. for i = 0,math.random(1,10) do
  112. math.random();
  113. end
  114. A = Line:find(";")
  115. print("> " ..Line:sub(A+1))
  116. B = Line:find(" ",A+1)
  117. if(B ~= nil) then
  118. Chat = Line:sub(B+1)
  119. Player = Line:sub(A+1,B-2)
  120. Chatl = Chat:lower()
  121. Playerl = Player:lower()
  122. a = 1
  123. for word in string.gmatch(Player,"%w+") do
  124. if(a == 1) then Clan = word
  125. elseif(a == 2)then PlayerNT = word end
  126. a = a + 1
  127. end
  128. opd = 0
  129. for i = 1,#oplist do
  130. if(oplist[i] == PlayerNT) then
  131. opd = 1
  132. print("OP'D")
  133. end
  134. end
  135. if(Chatl == "!terminate") then if(opd == 1) then joketimer.Enabled = false; timer1.Enabled = false; Disconnect(); form1:Close() end end
  136. if(Chatl == "Servant?") then Say("Hello?") end
  137. if(Chatl == "!time") then Say("Fezch's Time: #time") end
  138. if(Chatl == "!op") then
  139. if(opd == 0) then
  140. muteFor(Player,60)
  141. Say("You dont deserve the op! <60 Second Mute>")
  142. else
  143. Send("op " .. Player)
  144. Say("*Shoots " .. Player .. " with his oplazor*")
  145. end
  146. end
  147. if(Chatl:sub(0,6) == "!addop") then
  148. if(opd == 1) then
  149. table.insert(oplist,Chat:sub(8))
  150. Say("Added : " .. Chat:sub(8) .. " to the op list.")
  151. end
  152. end
  153.  
  154. if(Chatl:sub(0,7) == "!addban") then
  155. if(opd == 1) then
  156. table.insert(blacklist,Chat:sub(9))
  157. Say("Added : " .. Chat:sub(9) .. " to the ban list.")
  158. end
  159. end
  160. logfile = io.open("Log.txt","a+")
  161. if(logfile == nil) then logfile = io.open("Log.txt","w") end
  162. logfile:write(os.date("%c") .. " " .. Player .. ": " .. Chat .. "\n")
  163. logfile:close()
  164. if(Chat == "!go") then
  165. check = 1
  166. setServer()
  167. print("Op mode activated.")
  168. end
  169. if(Chat == "!modlist") then
  170. if(opd == 1) then
  171. for i = 1,#oplist do
  172. Say(oplist[i])
  173. end
  174. end
  175. if(check == 1) then
  176. if(Chat == "!Set") then
  177. if(opd == 1) then
  178. setServer()
  179. end
  180. end
  181. end
  182. end
  183. if(opd == 0) then
  184. for i = 1,#badwords do
  185. curword = string.lower(badwords[i])
  186. if(Chatl:find(curword) ~= nil) then
  187. muteFor(Player,60)
  188. Say("No Swearing! <60 Second Mute>")
  189. end
  190. end
  191. end
  192. end
  193. elseif(Line:sub(0,4) == "BOUT") then
  194. if(check == 1) then
  195. a = 0
  196. 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
  197. if(checkend ~= "END") then
  198. if(player ~= nil) then -- lastplayer ~= player) then
  199. for i = 1,#blacklist do
  200. if(blacklist[i] == player) then
  201. Send("kick " .. player .. " you are banned.")
  202. print("Attempted to kick: " .. player)
  203. --lastplayer = player
  204. end
  205. end
  206. end
  207. if(player ~= user) then
  208. if(tag:lower() ~= yourtag) then
  209. print(tag .. " - " .. yourtag)
  210. Send("kick " .. player .. " private match.")
  211. end
  212. end
  213. end
  214. end
  215. elseif(Line:sub(0,4) == "SPEC") then
  216. if(check == 1) then
  217. for word in string.gmatch(Line:sub(9), "%w+") do
  218. player = word
  219. for i = 1,#blacklist do
  220. if(blacklist[i] == player) then
  221. Send("kick " .. player .. " you are banned.")
  222. print("Attempted to kick: " .. player)
  223. end
  224. end
  225. end
  226. end
  227. end
  228. end
  229.  
  230. function setServer()
  231. serverSettings = io.open("Scripts/serversettings.txt")
  232. if(serverSettings == nil) then
  233. print("Failed to load serversettings.txt")
  234. else
  235. line = serverSettings:read("*l")
  236. i=1
  237. while(line ~= nil) do
  238. Send("set " .. line)
  239. print("Set \"" .. line .. "\" at line " .. i)
  240. line = serverSettings:read("*l")
  241. i = i + 1
  242. end
  243. end
  244. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement