Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- 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
- --]]
- you = "tokyoghoultest" -- Place your name here, master. I can only serve you properly if you place in your name.
- 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)
- 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,18) == "Follower, what is love?" then
- makenotify("Baby don't hurt me.")
- end
- if msg:sub(1,16) == "Follower, update" then
- makenotify("<SYSTEM> Update at rtest.net23.net/follower.lua .")
- end
- end
- end)
- game.Players.PlayerAdded:connect(function(p)
- makenotify(p.Name.." joined the game")
- end)
- game.Players.PlayerRemoving:connect(function(p)
- makenotify(p.Name.." left the game, or was kicked forcefully.")
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement