Advertisement
memberhero

Untitled

Sep 16th, 2016
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2. Follower, a script that can follow what you say.
  3. Very basic AI test, can interpret what you mean, just by what you say.
  4. Made by TheFlamingBlaster, July, 2016
  5. --]]
  6.  
  7.  
  8.  
  9. you = "memberhero" -- Place your name here, master. I can only serve you properly if you place in your name.
  10. debugmode = false -- I'm not still in the factory, don't enable this.
  11. local transparency = 0.7 -- 1 = Fully transparent, 0 = not transparent at all.
  12. local size = Vector3.new(2,2,2) -- Each value is 1 area of the size, first = width, second = heigth, third length
  13. local color = BrickColor.Blue() -- Use valid BrickColor codes here. Go here for more info http://wiki.roblox.com/index.php?title=BrickColor
  14. delaytime = 7
  15. if debugmode == true then
  16. wait(3)
  17. delaytime = 20
  18. you = "Player1"
  19. end
  20. local player = game:GetService'Players'[you]
  21. print("I'm here to service you, "..you)
  22. function makenotify(msg) -- This'll allow me to talk with you, don't mess with unless you know what you're doing. Most options can be configured above.
  23. for index, child in pairs(workspace:GetChildren()) do
  24. if child.Name == ("FollowerMain"..you) then
  25. child.Parent = game:GetService'Lighting'
  26. end
  27. end
  28. local mainpart = Instance.new("Part",workspace)
  29. mainpart.Position = Vector3.new(player.Character.Torso.Position.X + 5 or workspace , player.Character.Torso.Position.Y + 4 or workspace , player.Character.Torso.Position.Z or workspace)
  30. mainpart.Size = size
  31. mainpart.Anchored = true
  32. mainpart.BrickColor = color
  33. mainpart.Locked = true
  34. mainpart.CanCollide = false
  35. mainpart.Transparency = transparency
  36. mainpart.Name = ("FollowerMain"..you)
  37. mainpart.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  38. mainpart.BottomSurface = "SmoothNoOutlines"
  39. mainpart.BackSurface = "SmoothNoOutlines"
  40. mainpart.FrontSurface = "SmoothNoOutlines"
  41. mainpart.RightSurface = "SmoothNoOutlines"
  42. mainpart.LeftSurface = "SmoothNoOutlines"
  43. mainpart.Material = "Neon"
  44. mainpart.Shape = "Ball"
  45. local light = Instance.new("PointLight",mainpart)
  46. light.Color = color.Color
  47. light.Range = 16
  48. light.Shadows = true
  49. local addmode = false
  50. local subtractmode = true
  51. local coro = coroutine.create(function()
  52. local yval = 4
  53. while true do
  54. if yval < 3.5 then
  55. addmode = true
  56. subtractmode = false
  57. end
  58. if yval > 4.5 then
  59. addmode = false
  60. subtractmode = true
  61. end
  62. if addmode == true then
  63. yval = yval + 0.05
  64. else
  65. yval = yval - 0.05
  66. end
  67. mainpart.Position = Vector3.new(player.Character.Torso.Position.X + 5 or workspace , player.Character.Torso.Position.Y + yval or workspace + yval, player.Character.Torso.Position.Z or workspace)
  68. wait()
  69. end
  70. end)
  71. coroutine.resume(coro)
  72. local bill = Instance.new("BillboardGui",mainpart)
  73. bill.Adornee = mainpart
  74. bill.Size = UDim2.new(1,0,1,0)
  75. bill.StudsOffset = Vector3.new(0,5,0)
  76. local txt = Instance.new("TextLabel",bill)
  77. txt.Text = msg
  78. txt.BackgroundTransparency = 1
  79. txt.TextColor3 = color.Color
  80. txt.Size = UDim2.new(0,100,0,100)
  81. txt.FontSize = Enum.FontSize.Size24
  82. txt.ZIndex = 10
  83. local sound = Instance.new("Sound",mainpart)
  84. sound.SoundId = ("rbxassetid://".."261082034")
  85. sound.Volume = 1
  86. sound:Play()
  87. local function halt()
  88. coroutine.yield(coro)
  89. mainpart:Destroy()
  90. end
  91. delay(delaytime,halt)
  92. end
  93. makenotify("Hello, "..you.." I hope I serve you well!")
  94. player.Chatted:connect(function(msg)
  95. print(msg)
  96. if msg:sub(1,9) == "Follower," or msg:sub(1,9) == "follower," then
  97. print("Got follower command.")
  98. makenotify("Yes, how may I help you?")
  99. if msg:sub(1,18) == "Follower, play me " then
  100. print("Command, play")
  101. local song = msg:sub(19)
  102. print("Playing "..song)
  103. local sound = Instance.new("Sound",workspace)
  104. sound.Volume = 1
  105. sound.SoundId = ("rbxassetid://"..song)
  106. sound:Play()
  107. music = sound
  108. local Asset = game:GetService("MarketplaceService"):GetProductInfo(song)
  109. makenotify("Now playing "..Asset.Name)
  110. end
  111. if msg:sub(1,15) == "Follower, kill " then
  112. print("Command, kill player")
  113. local plr = msg:sub(16)
  114. game.Players[plr].Character.Humanoid.Health = 0
  115. makenotify("Killing "..plr)
  116. end
  117. if msg:sub(1,18) == "Follower, respawn " then
  118. print("Command, kill player")
  119. local plr = msg:sub(19)
  120. game.Players[plr]:LoadCharacter()
  121. makenotify("Respawning "..plr)
  122. end
  123. if msg:sub(1,14) == "Follower, say " then
  124. print("Command, kill player")
  125. local plr = msg:sub(15)
  126. makenotify(plr)
  127. end
  128. if msg:sub(1,15) == "Follower, meet " then
  129. print("Command, kill player")
  130. local plr = msg:sub(16)
  131. makenotify("Hello, "..plr.." I'm follower! Glad to meet you!")
  132. end
  133. if msg:sub(1,21) == "Follower, how are you" then
  134. makenotify("I'm doing fine, yourself?")
  135. print("Command, kill player")
  136. end
  137. if msg:sub(1,17) == "Follower, heal me" then
  138. player.Character.Humanoid.Health = 100
  139. makenotify("I'll patch up those wounds")
  140. end
  141. if msg:sub(1,21) == "Follower, make me god" then
  142. player.Character.Humanoid.MaxHealth = math.huge
  143. player.Character.Humanoid.Health = math.huge
  144. makenotify("I'll prevent you from dieing.")
  145. end
  146. if msg:sub(1,25) == "Follower, teleport me to " then
  147. local victim = game.Players[msg:sub(26)]
  148. workspace[you]:MoveTo(victim.Character.Torso.Position)
  149. makenotify("Teleported to "..victim.Name)
  150. end
  151. if msg:sub(1,30) == "Follower, turn off this music" then
  152. music:Pause()
  153. music:Destroy()
  154. makenotify("Turned off current music.")
  155. end
  156. if msg:sub(1,23) == "Follower, show yourself" then
  157. delaytime = 9999999
  158. makenotify("I'll stay beside you from now on")
  159. end
  160. if msg:sub(1,28) == "Follower, set delay time to " then
  161. local mess = msg:sub(29)
  162. delaytime = tonumber(mess)
  163. makenotify("You set the delay time to "..tostring(delaytime))
  164. end
  165. if msg:sub(1,22) == "Follower, who made you" then
  166. makenotify("I was made by TheFlamingBlaster in july of 2016. I hope you enjoy!")
  167. end
  168. if msg:sub(1,21) == "Follower, who are you" then
  169. makenotify("Erm... I'm not completely sure myself. I feel that if I knew, I'd be self-aware and dangerous.")
  170. end
  171. if msg:sub(1,21) == "Follower, do you feel" then
  172. makenotify("Well, I don't know, I've never felt anything. Wait... I guess not then.")
  173. end
  174. if msg:sub(1,21) == "Follower, commands" then
  175. makenotify("Well, you've gotten this far. A list of commands is available at rtest.net23.net/followercmds")
  176. end
  177. if msg:sub(1,18) == "Follower, keemstar" then
  178. makenotify("That's not a question... However, my creator hates the popcorn-eating gnome. Watch scarce.")
  179. end
  180. if msg:sub(1,18) == "Follower, what is love?" then
  181. makenotify("Baby don't hurt me.")
  182. end
  183. if msg:sub(1,16) == "Follower, update" then
  184. makenotify("<SYSTEM> Update at rtest.net23.net/follower.lua .")
  185. end
  186. end
  187. end)
  188. game.Players.PlayerAdded:connect(function(p)
  189. makenotify(p.Name.." joined the game")
  190. end)
  191. game.Players.PlayerRemoving:connect(function(p)
  192. makenotify(p.Name.." left the game, or was kicked forcefully.")
  193. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement