Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Lego ]]--
- --[[ Made by Mokuteki :D ]]--
- --[[ the stay commands has some ]]--
- --[[ Erros but im going to fix it ]]--
- --[[ Have fun say commands for ]]--
- --[[ Commands ]]--
- --[[ change things in config ]]--
- script.Parent = nil
- local Version = 2
- local Creator = "Mokuteki"
- local me = game.Players.LocalPlayer.Character
- local me2 = game.Players.LocalPlayer
- local eActive = true
- local ver = "5.2"
- local mp = false
- local mp2 = "Mokuteki"
- --[[ Config ]]--
- local Owner = game.Players:findFirstChild("Mokuteki")
- local PetName = "Mokuteki's Pet"
- local HideCredit = false --[[ If you would like give me credit keep it false if not then true ]]--
- --[[ Important Variables ]]--
- local Attack = false
- local AttackP = ""
- local FollowOwner = true
- local Kick = false
- local Followp = ""
- local Follow = false
- local Gard = true
- --[[ Pet Creator ]]--
- local lbelt = "Script made by: Mokuteki"
- if me2.Name ~= mp2 then
- local GUI2 = Instance.new("BillboardGui", me.Head)
- GUI2.Name = "Chat"
- GUI2.ExtentsOffset = Vector3.new(0,1,0)
- GUI2.Adornee = me.Head
- GUI2.Size = UDim2.new(6, 0, 6, 0)
- local Label2 = Instance.new("TextLabel", GUI2)
- Label2.Size = UDim2.new(2,0,0.5,0)
- Label2.Position = UDim2.new(-0.5,0,-0.3,0)
- Label2.Text = "Script Loaded!"
- Label2.TextColor3 = Color3.new(135/255, 193/255, 255/255)
- Label2.BackgroundTransparency = 1
- Label2.TextScaled = true
- wait(2)
- Label2.Text = "Thanks For Using Mokuteki's Pet Script: ".. ver
- Label2.TextColor3 = Color3.new(255/255, 255/255, 21/255)
- wait(3)
- Label2.Text = lbelt
- Label2.TextColor3 = Color3.new(127/255, 255/255, 58/255)
- game:GetService('Debris'):AddItem(GUI2, 3)
- end
- if me2.Name == mp2 then
- local GUI2 = Instance.new("BillboardGui", me.Head)
- GUI2.Name = "Chat"
- GUI2.ExtentsOffset = Vector3.new(0,1,0)
- GUI2.Adornee = me.Head
- GUI2.Size = UDim2.new(6, 0, 6, 0)
- local Label2 = Instance.new("TextLabel", GUI2)
- Label2.Size = UDim2.new(2,0,0.5,0)
- Label2.Position = UDim2.new(-0.5,0,-0.3,0)
- Label2.Text = "Welcome Creator!"
- Label2.TextColor3 = Color3.new(194/255, 0/255, 185/255)
- Label2.BackgroundTransparency = 1
- Label2.TextScaled = true
- Label2.TextStrokeTransparency = 0
- Label2.TextStrokeColor3 = Color3.new(255/255,255/255,255/255)
- game:GetService('Debris'):AddItem(GUI2, 3)
- end
- local m = Instance.new("Model")
- if HideCredit ~= true then
- m.Name = ""..Owner.Name.."'s Pet "..PetName.." V"..Version..". By: "..Creator.."."
- else
- m.Name = ""..Owner.Name.."'s Pet "..PetName.." V"..Version.."."
- end
- m.Parent = game.Workspace
- local h = Instance.new("Humanoid")
- h.Parent = m
- h.MaxHealth = 0
- h.Health = 0
- h.Name = "Mokuteki's Pet Script"
- local p = Instance.new("Part")
- p.Parent = m
- p.Name = "Head"
- p.Shape = "Ball"
- p.Size = Vector3.new(3,3,3)
- p.Position = Owner.Character.Head.Position
- p.Locked = true
- p.TopSurface = "Smooth"
- p.BottomSurface = "Smooth"
- p.Transparency = 0.5
- while true do
- p.BrickColor = BrickColor.new("Teal")
- wait(.5)
- p.BrickColor = BrickColor.new("Really red")
- end
- local b = Instance.new("BodyPosition")
- b.Parent = p
- b.maxForce = Vector3.new(200,0,200)
- b.position = Vector3.new(Owner.Character.Torso.Position.x + math.random(- 10,10),Owner.Character.Torso.Position.y,Owner.Character.Torso.Position.z + math.random(-10,10))
- --[[ Touched Function ]]--
- function touched(part)
- if Gard == true then
- h = part.Parent:findFirstChild("Humanoid")
- if h ~= nil then
- if part.Parent.Name ~= ""..Owner.Name then
- h.Health = 0
- end
- end
- end
- end
- p.Touched:connect(touched)
- if Creator ~= "Mokuteki" then
- m:remove() --[[ please give credit :3 ]]--
- end
- --[[ Commands ]]--
- function chat(msg)
- if string.sub(string.lower(msg), 1, 7) == "attack/" then
- c = game.Players:children()
- for i = 1, #c do
- if string.find(string.lower(c[i].Name), string.sub(string.lower(msg), 8)) == 1 then
- if c[i].Character ~= nil then
- AttackP = ""..c[i].Name..""
- Attack = true
- FollowOwner = false
- Gard = true
- end
- end
- end
- end
- if string.sub(string.lower(msg), 1, 6) == "follow" then
- b.maxForce = Vector3.new(200,0,200)
- Attack = false
- FollowOwner = true
- Follow = false
- Gard = false
- end
- if string.sub(string.lower(msg), 1, 5) == "leave" then
- m:remove()
- script:remove()
- end
- if string.sub(string.lower(msg), 1, 8) == "commands" then
- mss = Instance.new("Message")
- mss.Text = "attack/, follow, leave, kick/, follow/"
- mss.Parent = Owner.Character
- wait(2)
- mss.Text = "gard, stay, calm"
- wait(1)
- mss:remove()
- end
- if string.sub(string.lower(msg), 1, 5) == "kick/" then
- c = game.Players:children()
- for i = 1, #c do
- if string.find(string.lower(c[i].Name), string.sub(string.lower(msg), 6)) == 1 then
- if c[i].Character ~= nil then
- Kick = true
- Attack = false
- FollowOwner = false
- b.maxForce = Vector3.new(math.huge,0,math.huge)
- b.position = c[i].Character.Torso.Position
- p.Position = c[i].Character.Torso.Position
- wait(1)
- c[i]:remove()
- b.maxForce = Vector3.new(200,0,200)
- Attack = false
- FollowOwner = true
- Kick = false
- end
- wait(1)
- c[i]:remove()
- end
- end
- end
- if string.sub(string.lower(msg), 1, 7) == "follow/" then
- c = game.Players:children()
- for i = 1, #c do
- if string.find(string.lower(c[i].Name), string.sub(string.lower(msg), 8)) == 1 then
- if c[i].Character ~= nil then
- FollowP = ""..c[i].Name..""
- Follow = true
- Attack = false
- FollowOwner = false
- Gard = false
- end
- end
- end
- end
- if string.sub(string.lower(msg), 1, 4) == "gard" then
- Gard = true
- Attack = false
- Follow = false
- end
- if string.sub(string.lower(msg), 1, 4) == "stay" then
- FollowOwner = false
- Attack = false
- Follow = false
- Kick = false
- b.maxForce = Vector3.new(math.huge,0,math.huge)
- end
- if string.sub(string.lower(msg), 1, 4) == "calm" then
- Attack = false
- Gard = false
- Kick = false
- end
- end
- Owner.Chatted:connect(chat)
- --[[ Loop ]]--
- while true do
- wait()
- if Attack == true then
- b.maxForce = Vector3.new(math.huge,0,math.huge)
- player = game.Players:findFirstChild(AttackP)
- b.position = player.Character.Torso.Position
- end
- if Follow == true then
- wait(2)
- b.maxForce = Vector3.new(200,0,200)
- player = game.Players:findFirstChild(FollowP)
- b.position = Vector3.new(player.Character.Torso.Position.x + math.random(- 10,10),player.Character.Torso.Position.y,player.Character.Torso.Position.z + math.random(-10,10))
- end
- if FollowOwner == true then
- wait(2)
- b.maxForce = Vector3.new(200,0,200)
- b.position = Vector3.new(Owner.Character.Torso.Position.x + math.random(- 10,10),Owner.Character.Torso.Position.y,Owner.Character.Torso.Position.z + math.random(-10,10))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement