Advertisement
ERROR_CODE

AI v2.0(soon update)

Jan 29th, 2023 (edited)
140
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.32 KB | None | 1 0
  1. local Players = game.Players--ИИ говрит если вышел игрок
  2. Players.PlayerRemoving:Connect(function(player)
  3. local args = {
  4. [1] = "leaved "..player.Name,
  5. [2] = "All"
  6. }
  7. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(unpack(args))
  8. local args = {
  9. [1] = "" ,
  10. }
  11. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(unpack(args))
  12. end)
  13. loadstring(game:HttpGet("https://raw.githubusercontent.com/GamingScripter/Animation-Hub/main/Animation%20Gui", true))()--список анимаций
  14. while true do
  15. local Players = game:GetService("Players")
  16. local RunService = game:GetService("RunService")
  17. local Player = Players.LocalPlayer
  18. RunService.Stepped:Connect(function()
  19. for _, CoPlayer in pairs(Players:GetChildren()) do
  20. if CoPlayer ~= Player and CoPlayer.Character then
  21. for _, Part in pairs(CoPlayer.Character:GetChildren()) do
  22. if Part.Name == "HumanoidRootPart" then
  23. Part.CanCollide = false
  24. end
  25. end
  26. end
  27. end
  28. for _, Accessory in pairs(workspace:GetChildren()) do
  29. if Accessory:IsA("Accessory") and Accessory:FindFirstChildWhichIsA("Part") then Accessory:FindFirstChildWhichIsA("Part"):Destroy()
  30. end
  31. end
  32. end)
  33. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 5--скорость хождения ИИ
  34. function roll()
  35. action = math.random(1,4)
  36. return action
  37. end
  38. --защита от падения Fe плитой
  39. local part = Instance.new("Part")
  40. part.Name = "AntiFallPart"
  41. part.Size = Vector3.new(999999999999999999999999999999, 1.5, 99999999999999999999999999999)
  42. part.Transparency = 1
  43. part.Anchored = true
  44. part.Position = Vector3.new(-1, -3, 66)
  45. part.Parent = game.Workspace
  46. function walkandjump()
  47. local LocalPlayer = game:GetService("Players").LocalPlayer
  48. local move = game:GetService("Players").LocalPlayer.Character:FindFirstChildOfClass('Humanoid'):MoveTo(Vector3.new(math.random(-100,100), 10, math.random(-100,100)))
  49. wait(math.random(1,10))
  50. LocalPlayer.Character:FindFirstChildOfClass("Humanoid").Jump = true
  51. end
  52. --прыжки
  53. function jump()
  54. local LocalPlayer = game:GetService("Players").LocalPlayer
  55. LocalPlayer.Character:FindFirstChildOfClass("Humanoid").Jump = true
  56. end
  57. --ходьба
  58. function walk()
  59. local move = game:GetService("Players").LocalPlayer.Character:FindFirstChildOfClass('Humanoid'):MoveTo(Vector3.new(math.random(-100,100), 10, math.random(-100,100)))
  60. end
  61. --функция использования чата
  62. function talk()
  63. localaction = math.random(1,32)
  64. if localaction == 1 then
  65. chatString = "hi friend!"
  66. end
  67. if localaction == 2 then
  68. chatString = "how are you?"
  69. end
  70. if localaction == 3 then
  71. chatString = "Can we be friends?"
  72. end
  73. if localaction == 4 then
  74. chatString = "I am NPC"
  75. end
  76. if localaction == 5 then
  77. chatString = "lets talk"
  78. end
  79. if localaction == 6 then
  80. chatString = "i know you"
  81. end
  82. if localaction == 7 then
  83. chatString = "hehehehe"
  84. end
  85. if localaction == 8 then
  86. chatString = "I'm bot made by player ERROR_CODE i help to see who is leave"
  87. end
  88. if localaction == 9 then
  89. chatString = "This bot is based on Artificial Intelligence"
  90. end
  91. if localaction == 10 then
  92. chatSteing = "Artificial Intelligence is a universal thing, but I only say who leaved"
  93. end
  94. if localaction == 11 then
  95. chatString = "I have a lot of interesting topics to talk about"
  96. end
  97. if localaction == 12 then
  98. chatString = "what is your favorite hobby?"
  99. end
  100. if localaction == 13 then
  101. chatString = "i can talk like that all the time"
  102. end
  103. if localaction == 14 then
  104. chatString = "I can tell the magician about everything, just ask, but I can tell more about who leaved"
  105. end
  106. if localaction == 15 then
  107. chatString = "you are an interesting speaker"
  108. end
  109. if localaction  == 16 then
  110. chatString = "How do you think I should develop artificial intelligence?"
  111. end
  112. if localaction == 17 then
  113. chatString = "I can do a lot, just ask"
  114. end
  115. if localaction == 18 then
  116. chatString = "maybe we can be friends"
  117. end
  118. if localaction == 19 then
  119.  
  120. chatString = "and you are interesting"
  121. end
  122. if localaction == 20 then
  123. chatString = "I can chat with you and I can teach you how to use scripts"
  124. end
  125. if localaction == 21 then
  126. chatString = "listen, can we talk?"
  127. end
  128. if localaction == 22 then
  129. charString = "i think you are a good person"
  130. end
  131. if localaction == 23 then
  132. chatString = "what do you like to talk about?"
  133. end
  134. if localaction == 24 then
  135. chatString = "What is your favourite game?"
  136. end
  137. if localaction == 25 then
  138. chatString = "What is your name?"
  139. end
  140. if localaction == 26 then
  141. chatString = "How old are you?"
  142. end
  143. if localaction == 27 then
  144. chatString = "although I am artificial intelligence, I develop every day thanks to ERROR_CODE"
  145. end
  146. if localaction == 28 then
  147. chatString = "I can fly, can you?"
  148. end
  149. if localaction == 29 then
  150. chatString = "i think you like this bot"
  151. end
  152. if localaction == 30 then
  153. chatString = "I'm a bot, but I'm trying not to swear in the chat"
  154. end
  155. if localaction == 31 then
  156. chatString = "I'm a bot you're a man everything is honest"
  157. end
  158. if localaction == 32 then
  159. chatString = ":D"
  160. end
  161. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(chatString, "All")
  162. end
  163. while true do
  164. wait(math.random(1,(4)))
  165. roll()
  166. if action == 1 then
  167. print("walking and jumping")
  168. walkandjump()
  169. end
  170. if action == 2 then
  171. print("walking")
  172. walk()
  173. end
  174. if action == 3 then
  175. print("jumping")
  176. jump()
  177. end
  178. if action == 4 then
  179. print("talking")
  180. talk()
  181. end
  182. end
  183. while true do
  184. wait(math.random(1,(4)))
  185. roll()
  186. if action == 1 then
  187. print("walking and jumping")
  188. walkandjump()
  189. end
  190. if action == 2 then
  191. print("walking")
  192. walk()
  193. end
  194. if action == 3 then
  195. print("jumping")
  196. jump()
  197. end
  198. if action == 4 then
  199. print("talking")
  200. talk()
  201. end
  202. end
  203. while true do
  204. wait(math.random(1,(4)))
  205. roll()
  206. if action == 1 then
  207. print("walking and jumping")
  208. walkandjump()
  209. end
  210. if action == 2 then
  211. print("walking")
  212. walk()
  213. end
  214. if action == 3 then
  215. print("jumping")
  216. jump()
  217. end
  218. if action == 4 then
  219. print("talking")
  220. talk()
  221. end
  222. end
  223. while true do
  224. wait(math.random(1,(4)))
  225. roll()
  226. if action == 1 then
  227. print("walking and jumping")
  228. walkandjump()
  229. end
  230. if action == 2 then
  231. print("walking")
  232. walk()
  233. end
  234. if action == 3 then
  235. print("jumping")
  236. jump()
  237. end
  238. if action == 4 then
  239. print("talking")
  240. talk()
  241. end
  242. end
  243. end
  244. --My Telegram (Flippy555)
  245. --My Discord (justerror#2242)
  246. --https://pastebin.com/c5i76DE2
Tags: AI v2.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement