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