Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local debris = game:GetService("Debris")
- local CS = game:GetService("Chat")
- local Conversating = false
- local ID = math.random(100000,300000000)
- local humanName = game.Players:GetNameFromUserIdAsync(ID)
- local follow = false
- local deathed = false
- local pathfindservice = game:GetService("PathfindingService")
- local path = pathfindservice:CreatePath()
- local last = ""
- local randomChats = {"What is this game","I need some admin or some scripts","Hey guys","Lets play lua wars instead its actually better than this game","anyone help me with something?","I dont know how to play","anybody knows how to play?","guys cart ride to super mario is fun","admin command pls","is flamingo in game?","script plz","free car insurance lol","this is goofy"}
- local conversationStart = {"hey bro","dude","can i have admin?","get back here!!!"}
- local con = {"wanna bee friends?","uh can you rank me on hd admin?","give admin now or ill follow more","im gonna get you!"}
- function findCharacter(part)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 60
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) and game.Players:GetPlayerFromCharacter(temp2) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - part).magnitude < dist then
- torso = temp
- dist = (temp.Position - part).magnitude
- end
- end
- end
- end
- return torso
- end
- function Humanoid(Name,FaceId)
- local Body = Instance.new("Model")
- Body.Name = Name
- Body.Parent = game.Workspace
- local human = Instance.new("Humanoid")
- human.Name = "Humanoid"
- human.Parent = Body
- local humanoidrootpart = Instance.new("Part")
- humanoidrootpart.Parent = Body
- humanoidrootpart.Name = "HumanoidRootPart"
- humanoidrootpart.Size = Vector3.new(2, 2, 1)
- humanoidrootpart.Transparency = 1
- local head = Instance.new("Part")
- head.Size = Vector3.new(2,1,1)
- head.Material = "Plastic"
- head.Parent = Body
- head.Name = "Head"
- local face = Instance.new("Decal")
- face.Texture = FaceId
- face.Face = "Front"
- face.Parent = head
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshType = "Head"
- mesh.Scale = Vector3.new(1.25,1.25,1.25)
- mesh.Parent = head
- local Torso = Instance.new("Part")
- Torso.Parent = Body
- Torso.Size = Vector3.new(2, 2, 1)
- Torso.Name = "Torso"
- local rootjoint = Instance.new("Motor6D")
- rootjoint.Parent = humanoidrootpart
- rootjoint.Part0 = humanoidrootpart
- rootjoint.Part1 = Torso
- rootjoint.C0 = CFrame.Angles(math.rad(-90),math.rad(180),0)*CFrame.new(0,0,0)
- rootjoint.C1 = CFrame.Angles(math.rad(-90),math.rad(180),0)*CFrame.new(0,0,0)
- rootjoint.Name = "RootJoint"
- local neck = Instance.new("Motor6D")
- neck.Part0 = Torso
- neck.Part1 = head
- neck.MaxVelocity = 0.1
- neck.C0 = CFrame.Angles(math.rad(90),math.rad(180),0)*CFrame.new(0,-0,1)
- neck.C1 = CFrame.Angles(math.rad(90),math.rad(180),0)*CFrame.new(0,0,-0.5)
- neck.Parent = Torso
- neck.Name = "Neck"
- local Rigtie = Instance.new("Part")
- Rigtie.Name = "Right Arm"
- Rigtie.Parent = Body
- Rigtie.Size = Vector3.new(1, 2, 1)
- local rightieshold = Instance.new("Motor6D")
- rightieshold.Parent = Torso
- rightieshold.Part0 = Torso
- rightieshold.Part1 = Rigtie
- rightieshold.C0 = CFrame.Angles(math.rad(0),math.rad(90),0)*CFrame.new(0, 0.5, -1)
- rightieshold.C1 = CFrame.Angles(math.rad(0),math.rad(90),0)*CFrame.new(0,0.5,-2.5)
- rightieshold.Name = "Right Shoulder"
- local left = Instance.new("Part")
- left.Name = "Left Arm"
- left.Parent = Body
- left.Size = Vector3.new(1,2,1)
- local motorleft = Instance.new("Motor6D")
- motorleft.Parent = Torso
- motorleft.Part0 = Torso
- motorleft.Part1 = left
- motorleft.C0 = CFrame.Angles(math.rad(0),math.rad(-90),0)*CFrame.new(0, 0.5, -1)
- motorleft.C1 = CFrame.Angles(math.rad(0),math.rad(-90),0)*CFrame.new(-0, 0.5, -2.5)
- motorleft.Name = "Left Shoulder"
- local lleg = Instance.new("Part")
- lleg.Name = "Left Leg"
- lleg.Parent = Body
- lleg.Size = Vector3.new(1,2,1)
- local motorlleg = Instance.new("Motor6D")
- motorlleg.Parent = Torso
- motorlleg.Part0 = Torso
- motorlleg.Part1 = lleg
- motorlleg.C0 = CFrame.Angles(math.rad(0),math.rad(-90),0)*CFrame.new(0, -1, -1)
- motorlleg.C1 = CFrame.Angles(math.rad(0),math.rad(-90),0)*CFrame.new(0, 1, -1.5)
- motorlleg.Name = "Left Hip"
- local rleg = Instance.new("Part")
- rleg.Name = "Right Leg"
- rleg.Parent = Body
- rleg.Size = Vector3.new(1,2,1)
- local motorrleg = Instance.new("Motor6D")
- motorrleg.Parent = Torso
- motorrleg.Part0 = Torso
- motorrleg.Part1 = rleg
- motorrleg.C0 = CFrame.Angles(math.rad(0),math.rad(90),0)*CFrame.new(-0, -1, -1)
- motorrleg.C1 = CFrame.Angles(math.rad(0),math.rad(90),0)*CFrame.new(-0, 1, -1.5)
- motorrleg.Name = "Right Hip"
- local ff = Instance.new("ForceField")
- ff.Parent = Body
- debris:AddItem(ff,5)
- end
- Humanoid(humanName,"rbxasset://textures/face.png")
- local Rig = game.Workspace:FindFirstChild(humanName)
- Rig:WaitForChild("HumanoidRootPart").CFrame *= CFrame.new(0,5,0)
- Rig.Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(ID))
- function chatRandom()
- local r = randomChats[math.random(1, #randomChats)]
- if not(r == last) and not deathed and not Conversating then
- delay(math.random(15,25), function() -- 1 second delay
- CS:Chat(Rig.Head, r, Enum.ChatColor.White)
- last = r
- chatRandom()
- end)
- end
- end
- chatRandom()
- local walking = false
- local walkD = false
- local walkanimid = "http://www.roblox.com/asset/?id=180426354"
- local jumpanimid = "http://www.roblox.com/asset/?id=125750702"
- local animationwalk = Instance.new("Animation")
- local animationJump = Instance.new("Animation")
- if not script:FindFirstChild("walkAnim") then
- animationwalk.AnimationId = walkanimid
- animationwalk.Parent = script
- animationwalk.Name = "walkAnim"
- animationJump.AnimationId = jumpanimid
- animationJump.Parent = script
- animationJump.Name = "jumpAnim"
- end
- Rig.Humanoid.Running:Connect(function(s)
- if s > 0.01 then
- walking = true
- else
- walking = false
- end
- end)
- local walkanimP = Rig.Humanoid:LoadAnimation(script.walkAnim)
- game:GetService("RunService").Heartbeat:Connect(function()
- if walking and not walkD then
- walkanimP:Play()
- walkD = true
- else
- if not walking then
- walkanimP:Stop()
- walkD = false
- end
- end
- end)
- Rig.Humanoid.Died:Connect(function()
- deathed = true
- wait(3)
- Rig:Destroy()
- local clone = script:Clone()
- clone.Parent = workspace
- script:Destroy()
- end)
- Rig.Humanoid.Jumping:Connect(function()
- Rig.Humanoid:LoadAnimation(animationJump):Play()
- end)
- function askSomeone()
- Conversating = true
- follow = true
- local r = conversationStart[math.random(1, #conversationStart)]
- CS:Chat(Rig.Head, r, Enum.ChatColor.White)
- last = r
- local target = findCharacter(Rig.Head.Position)
- Rig.Humanoid.Jump = true
- if target then
- local Indicator = findCharacter(Rig.HumanoidRootPart.Position)
- wait()
- target = findCharacter(Rig.HumanoidRootPart.Position)
- local hr = Rig:FindFirstChild("Humanoid")
- while wait() do
- if target ~= nil and (Rig.HumanoidRootPart.Position-target.Position).Magnitude > 10 then
- path:ComputeAsync(Rig.HumanoidRootPart.Position, target.Position)
- for _, waypoint in pairs(path:GetWaypoints()) do
- hr:MoveTo(waypoint.Position)
- print("walking to target: ".. (Indicator.Position - Rig.Head.Position).Magnitude)
- hr.MoveToFinished:Wait()
- end
- else
- print("Broke: ".. (Indicator.Position - Rig.Head.Position).Magnitude)
- break
- end
- end
- wait(0.1)
- Rig.Humanoid.WalkSpeed = 0
- print("Near")
- Rig.Humanoid.Jump = true
- end
- if r == conversationStart[1] then
- CS:Chat(Rig.Head, con[1], Enum.ChatColor.White)
- end
- if r == conversationStart[2] then
- CS:Chat(Rig.Head, con[2], Enum.ChatColor.White)
- end
- if r == conversationStart[3] then
- CS:Chat(Rig.Head, con[3], Enum.ChatColor.White)
- end
- if r == conversationStart[4] then
- CS:Chat(Rig.Head, con[4], Enum.ChatColor.White)
- end
- wait(6)
- Rig.Humanoid:MoveTo(Rig.Torso.Position)
- Rig.Humanoid.WalkSpeed = 16
- Conversating = false
- follow = false
- end
- while wait() do
- local pos = Rig.HumanoidRootPart.Position
- wait(10)
- for i=1, math.random(2,5) do
- Rig.Humanoid:MoveTo(Vector3.new(math.random(pos.X - 10,pos.X + 10),0,math.random(pos.Z - 10,pos.Z + 10)))
- wait(math.random(10,18))
- end
- wait(1)
- askSomeone()
- end
Advertisement
Add Comment
Please, Sign In to add comment