Advertisement
RarexDream

Follower by the flaming blaster

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