Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2016
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.56 KB | None | 0 0
  1.  
  2. --[[ !!!! PLEASE PUT YOUR NAME HERE !!!! --]]
  3. you = "Alackanse15"
  4. --[[ !!!! PLEASE PUT YOUR NAME HERE !!!!
  5.  
  6. The script can only function if your name is labelled. If not, the script will not work!--]]
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56. --[[
  57. Follower, a script that can follow what you say.
  58. Very basic AI test, can interpret what you mean, just by what you say.
  59. Made by TheFlamingBlaster, July, 2016
  60. --]]
  61.  
  62.  
  63.  
  64. debugmode = false -- I'm not still in the factory, don't enable this.
  65. local transparency = 0.7 -- 1 = Fully transparent, 0 = not transparent at all.
  66. local size = Vector3.new(2,2,2) -- Each value is 1 area of the size, first = width, second = heigth, third length
  67. local color = BrickColor.Blue() -- Use valid BrickColor codes here. Go here for more info http://wiki.roblox.com/index.php?title=BrickColor
  68. delaytime = 7
  69. if debugmode == true then
  70. wait(3)
  71. delaytime = 20
  72. you = "Player1"
  73. end
  74. local player = game:GetService'Players'[you]
  75. print("I'm here to service you, "..you)
  76. 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.
  77. for index, child in pairs(workspace:GetChildren()) do
  78. if child.Name == ("FollowerMain"..you) then
  79. child.Parent = game:GetService'Lighting'
  80. end
  81. end
  82. local mainpart = Instance.new("Part",workspace)
  83. 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)
  84. mainpart.Size = size
  85. mainpart.Anchored = true
  86. mainpart.BrickColor = color
  87. mainpart.Locked = true
  88. mainpart.CanCollide = false
  89. mainpart.Transparency = transparency
  90. mainpart.Name = ("FollowerMain"..you)
  91. mainpart.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  92. mainpart.BottomSurface = "SmoothNoOutlines"
  93. mainpart.BackSurface = "SmoothNoOutlines"
  94. mainpart.FrontSurface = "SmoothNoOutlines"
  95. mainpart.RightSurface = "SmoothNoOutlines"
  96. mainpart.LeftSurface = "SmoothNoOutlines"
  97. mainpart.Material = "Neon"
  98. mainpart.Shape = "Ball"
  99. local light = Instance.new("PointLight",mainpart)
  100. light.Color = color.Color
  101. light.Range = 16
  102. light.Shadows = true
  103. local addmode = false
  104. local subtractmode = true
  105. local coro = coroutine.create(function()
  106. local yval = 4
  107. while true do
  108. if yval < 3.5 then
  109. addmode = true
  110. subtractmode = false
  111. end
  112. if yval > 4.5 then
  113. addmode = false
  114. subtractmode = true
  115. end
  116. if addmode == true then
  117. yval = yval + 0.05
  118. else
  119. yval = yval - 0.05
  120. end
  121. 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)
  122. wait()
  123. end
  124. end)
  125. coroutine.resume(coro)
  126. local bill = Instance.new("BillboardGui",mainpart)
  127. bill.Adornee = mainpart
  128. bill.Size = UDim2.new(1,0,1,0)
  129. bill.StudsOffset = Vector3.new(0,5,0)
  130. local txt = Instance.new("TextLabel",bill)
  131. txt.Text = msg
  132. txt.BackgroundTransparency = 1
  133. txt.TextColor3 = color.Color
  134. txt.Size = UDim2.new(0,100,0,100)
  135. txt.FontSize = Enum.FontSize.Size24
  136. txt.ZIndex = 10
  137. local sound = Instance.new("Sound",mainpart)
  138. sound.SoundId = ("rbxassetid://".."261082034")
  139. sound.Volume = 1
  140. sound:Play()
  141. local function halt()
  142. coroutine.yield(coro)
  143. mainpart:Destroy()
  144. end
  145. delay(delaytime,halt)
  146. end
  147. makenotify("Hello, "..you.." I hope I serve you well!")
  148. player.Chatted:connect(function(msg)
  149. print(msg)
  150. if msg:sub(1,9) == "Follower," or msg:sub(1,9) == "follower," then
  151. print("Got follower command.")
  152. makenotify("Yes, how may I help you?")
  153. if msg:sub(1,18) == "Follower, play me " then
  154. print("Command, play")
  155. local song = msg:sub(19)
  156. print("Playing "..song)
  157. local sound = Instance.new("Sound",workspace[you].Torso)
  158. sound.Volume = 1
  159. sound.SoundId = ("rbxassetid://"..song)
  160. sound:Play()
  161. music = sound
  162. local Asset = game:GetService("MarketplaceService"):GetProductInfo(song)
  163. makenotify("Now playing "..Asset.Name)
  164. end
  165. if msg:sub(1,15) == "Follower, kill " then
  166. print("Command, kill player")
  167. local plr = msg:sub(16)
  168. game.Players[plr].Character.Humanoid.Health = 0
  169. makenotify("Killing "..plr)
  170. end
  171. if msg:sub(1,18) == "Follower, respawn " then
  172. print("Command, kill player")
  173. local plr = msg:sub(19)
  174. game.Players[plr]:LoadCharacter()
  175. makenotify("Respawning "..plr)
  176. end
  177. if msg:sub(1,14) == "Follower, say " then
  178. print("Command, kill player")
  179. local plr = msg:sub(15)
  180. makenotify(plr)
  181. end
  182. if msg:sub(1,15) == "Follower, meet " then
  183. print("Command, kill player")
  184. local plr = msg:sub(16)
  185. makenotify("Hello, "..plr.." I'm follower! Glad to meet you!")
  186. end
  187. if msg:sub(1,21) == "Follower, how are you" then
  188. makenotify("I'm doing fine, yourself?")
  189. print("Command, kill player")
  190. end
  191. if msg:sub(1,17) == "Follower, heal me" then
  192. player.Character.Humanoid.Health = 100
  193. makenotify("I'll patch up those wounds")
  194. end
  195. if msg:sub(1,21) == "Follower, make me god" then
  196. player.Character.Humanoid.MaxHealth = math.huge
  197. player.Character.Humanoid.Health = math.huge
  198. makenotify("I'll prevent you from dieing.")
  199. end
  200. if msg:sub(1,25) == "Follower, teleport me to " then
  201. local victim = game.Players[msg:sub(26)]
  202. workspace[you]:MoveTo(victim.Character.Torso.Position)
  203. makenotify("Teleported to "..victim.Name)
  204. end
  205. if msg:sub(1,30) == "Follower, turn off this music" then
  206. music:Pause()
  207. music:Destroy()
  208. makenotify("Turned off current music.")
  209. end
  210. if msg:sub(1,23) == "Follower, show yourself" then
  211. delaytime = 9999999
  212. makenotify("I'll stay beside you from now on")
  213. end
  214. if msg:sub(1,28) == "Follower, set delay time to " then
  215. local mess = msg:sub(29)
  216. delaytime = tonumber(mess)
  217. makenotify("You set the delay time to "..tostring(delaytime))
  218. end
  219. if msg:sub(1,22) == "Follower, who made you" then
  220. makenotify("I was made by TheFlamingBlaster in july of 2016. I hope you enjoy!")
  221. end
  222. if msg:sub(1,21) == "Follower, who are you" then
  223. makenotify("Erm... I'm not completely sure myself. I feel that if I knew, I'd be self-aware and dangerous.")
  224. end
  225. if msg:sub(1,21) == "Follower, do you feel" then
  226. makenotify("Well, I don't know, I've never felt anything. Wait... I guess not then.")
  227. end
  228. if msg:sub(1,21) == "Follower, commands" then
  229. makenotify("Well, you've gotten this far. A list of commands is available at rtest.net23.net/followercmds")
  230. end
  231. if msg:sub(1,18) == "Follower, keemstar" then
  232. makenotify("That's not a question... However, my creator hates the popcorn-eating gnome. Watch scarce.")
  233. end
  234. if msg:sub(1,16) == "Follower, update" then
  235. makenotify("<SYSTEM> Update at rtest.net23.net/follower.lua .")
  236. end
  237. if msg:sub(1,18) == "Follower, explode " then
  238. local victim = game.Players[msg:sub(19)]
  239. victim.Character.Humanoid.MaxHealth = 1
  240. local explosion = Instance.new("Explosion",victim.Character)
  241. explosion.Position = victim.Character.Torso.Position
  242. makenotify("Exploded "..victim.Name)
  243. end
  244. end
  245. end)
  246. game.Players.PlayerAdded:connect(function(p)
  247. if p.Name == "TheFlamingBlaster" then
  248. makenotify("My creator "..p.Name.." joined the game!")
  249. else
  250. makenotify(p.Name.." joined the game")
  251. end
  252.  
  253. end)
  254. game.Players.PlayerRemoving:connect(function(p)
  255. if p.Name == you then
  256. function makeglobalnotify()
  257. local m = Instance.new("Message",workspace)
  258. m.Text = (you.." my master has left or been kicked! ")
  259. m.Name = ("FollowerMessageGlobal"..you)
  260. local sound = Instance.new("Sound",workspace)
  261. sound.SoundId = ("rbxassetid://".."371785833")
  262. sound.Volume = 1
  263. sound:Play()
  264. end
  265. makeglobalnotify()
  266. game.Workspace.ChildRemoved:connect(function(p)
  267. if p.Name == ("FollowerMessageGlobal"..you) then
  268. makeglobalnotify()
  269. end
  270. end)
  271. end
  272. makenotify(p.Name.." left the game, or was kicked forcefully.")
  273. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement