Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = owner
- local char = plr.Character
- char.Archivable = true
- local bot = char:Clone()
- bot.Parent = owner.Character
- bot.Name = "Hi! I am your AI, I obey you. Command me to do a thing and I will do it!"
- local moving = true
- local attackingwho = ""
- local spot = Instance.new("Part", owner.Character)
- spot.Anchored = true
- spot.CanCollide = false
- spot.Transparency = 1
- spot.CFrame = char.HumanoidRootPart.CFrame *CFrame.new(5, 0, 0)
- local punch = Instance.new("Sound", bot.HumanoidRootPart)
- punch.SoundId = "rbxassetid://1089136667"
- punch.Volume = 2
- move = coroutine.wrap(function()
- while game:GetService("RunService").Stepped:wait() do
- if moving == true then
- bot:FindFirstChildOfClass("Humanoid"):MoveTo(spot.Position)
- if char:FindFirstChildOfClass("Humanoid").Jump == true then
- bot:FindFirstChildOfClass("Humanoid").Jump = true
- end
- end
- if moving == false then
- if attackingwho ~= "" then
- if workspace[attackingwho]:FindFirstChild("Torso") then
- bot:FindFirstChildOfClass("Humanoid"):MoveTo(workspace[attackingwho]:FindFirstChild("Torso").Position)
- if workspace[attackingwho]:FindFirstChildOfClass("Humanoid").Jump == true then
- bot:FindFirstChildOfClass("Humanoid").Jump = true
- end
- end
- if workspace[attackingwho]:FindFirstChild("UpperTorso") then
- bot:FindFirstChildOfClass("Humanoid"):MoveTo(workspace[attackingwho]:FindFirstChild("UpperTorso").Position)
- if workspace[attackingwho]:FindFirstChildOfClass("Humanoid").Jump == true then
- bot:FindFirstChildOfClass("Humanoid").Jump = true
- end
- end
- end
- end
- end
- end)move()
- move2 = coroutine.wrap(function()
- while game:GetService("RunService").Stepped:wait() do
- spot.CFrame = char.HumanoidRootPart.CFrame *CFrame.new(5, 0, 0)
- end
- end)move2()
- funct1 = coroutine.wrap(function()
- while game:GetService("RunService").Stepped:wait() do
- if attackingwho ~= "" then
- if workspace[attackingwho]:FindFirstChildOfClass("Humanoid").Health == 0 then
- bot.Name = "Task done, master."
- moving = true
- attacking = ""
- end
- end
- end
- end)funct1()
- plr.Chatted:connect(function(msg)
- if msg:sub(1,6) == "Attack" then
- if workspace:FindFirstChild(msg:sub(8)) then
- if workspace[msg:sub(8)].Name ~= owner.Name then
- bot:FindFirstChildOfClass("Humanoid").Sit = false
- bot.Name = "Got it, attacking "..msg:sub(8).." master!"
- attackingwho= msg:sub(8)
- moving = false
- end
- if workspace[msg:sub(8)].Name == owner.Name then
- bot.Name = "I'm sorry but I don't attack you master."
- end
- end
- end
- if msg:sub(1,3) == "Say" then
- bot.Name = msg:sub(5)
- end
- if msg == "Sit" then
- bot:FindFirstChildOfClass("Humanoid").Sit = true
- end
- if msg == "Get up" then
- bot:FindFirstChildOfClass("Humanoid").Sit = false
- bot:FindFirstChildOfClass("Humanoid").PlatformStand = false
- end
- if msg == "Clone" then
- local C = owner.Character:Clone()
- C.Parent = workspace
- C.Name = "Clone"
- C[bot.Name]:Destroy()
- end
- if msg == "DeSpAcItO" then
- bot.Name = [[
- Despacito
- Quiero respirar tu cuello despacito
- Deja que te diga cosas al oído
- Para que te acuerdes si no estás conmigo
- ]]
- end
- if msg == "GoT dAt?" then
- bot.Name = [[
- I like you 'cause you got that somethin'
- That I need in my life so give it to me
- 'Cause you got that
- (Who?) Like you 'cause you got that somethin'
- That I need in my life, that I need, so
- 'Cause you got that
- I like you 'cause you got that somethin'
- That I need in my life so give it to me
- 'Cause you got that
- (Who?) Like you 'cause you got that somethin'
- That I need in my life, that I need, so (so, so, so)
- 'Cause you got that
- ]]
- end
- if msg == "Play dead" then
- bot:FindFirstChildOfClass("Humanoid").PlatformStand = true
- if bot:FindFirstChild("Torso") then
- Instance.new("BodyForce", bot.Torso).Force = Vector3.new(0, 0, 15)
- end
- if bot:FindFirstChild("UpperTorso") then
- Instance.new("BodyForce", bot.Torso).Force = Vector3.new(0, 0, 15)
- end
- end
- end)
- bot.HumanoidRootPart.Touched:connect(function(p)
- if p.Parent.Name == attackingwho then
- p.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(5)
- bot.HumanoidRootPart.Anchored = true
- punch:Play()
- for i = 1,5 do
- wait()
- bot.HumanoidRootPart.CFrame = bot.HumanoidRootPart.CFrame *CFrame.Angles(0, 0.9, 0)
- end
- for i = 1,5 do
- wait()
- bot.HumanoidRootPart.CFrame = bot.HumanoidRootPart.CFrame *CFrame.Angles(0, -0.9, 0)
- end
- bot.HumanoidRootPart.Anchored = false
- end
- end)
- bot:FindFirstChildOfClass("Humanoid").Died:connect(function()
- bot.Name = "Agh!"
- end)
Add Comment
Please, Sign In to add comment