Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ !!!! PLEASE PUT YOUR NAME HERE IF YOU PLAN ON USING OUTSIDE OF SB !!!! --]]
- you = "Imtannerbanner56"
- --[[ !!!! PLEASE PUT YOUR NAME HERE IF YOU PLAN ON USING OUTSIDE OF SB !!!! --]]
- if game.PlaceId == 20279777 or game.PlaceId == 20132544 or game.PlaceId == 54194680 then
- you = tostring(getfenv().owner)
- print("This script has been ran by "..you)
- end
- wait(0.1)
- --[[ The script can only function if your name is labelled. If not, the script will not work!--]]
- --[[
- Follower, a script that can follow what you say.
- Very basic AI test, can interpret what you mean, just by what you say.
- Made by TheFlamingBlaster, July, 2016
- --]]
- debugmode = false -- I'm not still in the factory, don't enable this.
- local transparency = 0.7 -- 1 = Fully transparent, 0 = not transparent at all.
- local size = Vector3.new(2,2,2) -- Each value is 1 area of the size, first = width, second = heigth, third length
- local color = BrickColor.Blue() -- Use valid BrickColor codes here. Go here for more info http://wiki.roblox.com/index.php?title=BrickColor
- delaytime = 7
- if debugmode == true then
- wait(3)
- delaytime = 20
- you = "Player1"
- end
- local player = game:GetService'Players'[you]
- print("I'm here to service you, "..you)
- 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.
- for index, child in pairs(workspace:GetChildren()) do
- if child.Name == ("FollowerMain"..you) then
- child.Parent = game:GetService'Lighting'
- end
- end
- local mainpart = Instance.new("Part",workspace)
- 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)
- mainpart.Size = size
- mainpart.Anchored = true
- mainpart.BrickColor = color
- mainpart.Locked = true
- mainpart.CanCollide = false
- mainpart.Transparency = transparency
- mainpart.Name = ("FollowerMain"..you)
- mainpart.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- mainpart.BottomSurface = "SmoothNoOutlines"
- mainpart.BackSurface = "SmoothNoOutlines"
- mainpart.FrontSurface = "SmoothNoOutlines"
- mainpart.RightSurface = "SmoothNoOutlines"
- mainpart.LeftSurface = "SmoothNoOutlines"
- mainpart.Material = "Neon"
- mainpart.Shape = "Ball"
- local light = Instance.new("PointLight",mainpart)
- light.Color = color.Color
- light.Range = 16
- light.Shadows = true
- local addmode = false
- local subtractmode = true
- local coro = coroutine.create(function()
- local yval = 4
- while true do
- if yval < 3.5 then
- addmode = true
- subtractmode = false
- end
- if yval > 4.5 then
- addmode = false
- subtractmode = true
- end
- if addmode == true then
- yval = yval + 0.05
- else
- yval = yval - 0.05
- end
- 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)
- wait()
- end
- end)
- coroutine.resume(coro)
- local bill = Instance.new("BillboardGui",mainpart)
- bill.Adornee = mainpart
- bill.Size = UDim2.new(1,0,1,0)
- bill.StudsOffset = Vector3.new(0,5,0)
- local txt = Instance.new("TextLabel",bill)
- txt.Text = msg
- txt.BackgroundTransparency = 1
- txt.TextColor3 = color.Color
- txt.Size = UDim2.new(0,100,0,100)
- txt.FontSize = Enum.FontSize.Size24
- txt.ZIndex = 10
- local sound = Instance.new("Sound",mainpart)
- sound.SoundId = ("rbxassetid://".."261082034")
- sound.Volume = 1
- sound:Play()
- local function halt()
- coroutine.yield(coro)
- mainpart:Destroy()
- end
- delay(delaytime,halt)
- end
- makenotify("Hello, "..you.." I hope I serve you well!")
- player.Chatted:connect(function(msg)
- print(msg)
- if msg:sub(1,9) == "Follower," or msg:sub(1,9) == "follower," then
- print("Got follower command.")
- makenotify("Yes, how may I help you?")
- if msg:sub(1,18) == "Follower, play me " then
- print("Command, play")
- local song = msg:sub(19)
- print("Playing "..song)
- local sound = Instance.new("Sound",workspace[you].Torso)
- sound.Volume = 1
- sound.SoundId = ("rbxassetid://"..song)
- sound:Play()
- music = sound
- local Asset = game:GetService("MarketplaceService"):GetProductInfo(song)
- makenotify("Now playing "..Asset.Name)
- end
- if msg:sub(1,15) == "Follower, kill " then
- print("Command, kill player")
- local plr = msg:sub(16)
- game.Players[plr].Character.Humanoid.Health = 0
- makenotify("Killing "..plr)
- end
- if msg:sub(1,18) == "Follower, respawn " then
- print("Command, kill player")
- local plr = msg:sub(19)
- game.Players[plr]:LoadCharacter()
- makenotify("Respawning "..plr)
- end
- if msg:sub(1,14) == "Follower, say " then
- print("Command, kill player")
- local plr = msg:sub(15)
- makenotify(plr)
- end
- if msg:sub(1,15) == "Follower, meet " then
- print("Command, kill player")
- local plr = msg:sub(16)
- makenotify("Hello, "..plr.." I'm follower! Glad to meet you!")
- end
- if msg:sub(1,21) == "Follower, how are you" then
- makenotify("I'm doing fine, yourself?")
- print("Command, kill player")
- end
- if msg:sub(1,17) == "Follower, heal me" then
- player.Character.Humanoid.Health = 100
- makenotify("I'll patch up those wounds")
- end
- if msg:sub(1,21) == "Follower, make me god" then
- player.Character.Humanoid.MaxHealth = math.huge
- player.Character.Humanoid.Health = math.huge
- makenotify("I'll prevent you from dieing.")
- end
- if msg:sub(1,25) == "Follower, teleport me to " then
- local victim = game.Players[msg:sub(26)]
- workspace[you]:MoveTo(victim.Character.Torso.Position)
- makenotify("Teleported to "..victim.Name)
- end
- if msg:sub(1,30) == "Follower, turn off this music" then
- music:Pause()
- music:Destroy()
- makenotify("Turned off current music.")
- end
- if msg:sub(1,23) == "Follower, show yourself" then
- delaytime = 9999999
- makenotify("I'll stay beside you from now on")
- end
- if msg:sub(1,28) == "Follower, set delay time to " then
- local mess = msg:sub(29)
- delaytime = tonumber(mess)
- makenotify("You set the delay time to "..tostring(delaytime))
- end
- if msg:sub(1,22) == "Follower, who made you" then
- makenotify("I was made by TheFlamingBlaster in july of 2016. I hope you enjoy!")
- end
- if msg:sub(1,21) == "Follower, who are you" then
- makenotify("Erm... I'm not completely sure myself. I feel that if I knew, I'd be self-aware and dangerous.")
- end
- if msg:sub(1,21) == "Follower, do you feel" then
- makenotify("Well, I don't know, I've never felt anything. Wait... I guess not then.")
- end
- if msg:sub(1,21) == "Follower, commands" then
- makenotify("Well, you've gotten this far. A list of commands is available at rtest.net23.net/followercmds")
- end
- if msg:sub(1,18) == "Follower, keemstar" then
- makenotify("That's not a question... However, my creator hates the popcorn-eating gnome. Watch scarce.")
- end
- if msg:sub(1,16) == "Follower, update" then
- makenotify("<SYSTEM> Update at rtest.net23.net/follower.lua .")
- end
- if msg:sub(1,18) == "Follower, explode " then
- local victim = game.Players[msg:sub(19)]
- victim.Character.Humanoid.MaxHealth = 1
- local explosion = Instance.new("Explosion",victim.Character)
- explosion.Position = victim.Character.Torso.Position
- makenotify("Exploded "..victim.Name)
- end
- end
- end)
- game.Players.PlayerAdded:connect(function(p)
- if p.Name == "TheFlamingBlaster" then
- makenotify("My creator "..p.Name.." joined the game!")
- else
- makenotify(p.Name.." joined the game")
- end
- end)
- game.Players.PlayerRemoving:connect(function(p)
- if p.Name == you then
- function makeglobalnotify()
- local m = Instance.new("Message",workspace)
- m.Text = (you.." my master has left or been kicked! ")
- m.Name = ("FollowerMessageGlobal"..you)
- for index, child in pairs(workspace:GetChildren()) do
- local sound = Instance.new("Sound",child)
- sound.SoundId = ("rbxassetid://".."371785833")
- sound.Volume = 1
- sound:Play()
- end
- end
- makeglobalnotify()
- game.Workspace.ChildRemoved:connect(function(p)
- if p.Name == ("FollowerMessageGlobal"..you) then
- makeglobalnotify()
- end
- end)
- end
- makenotify(p.Name.." left the game, or was kicked forcefully.")
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement