Advertisement
Liampdoherty

Untitled

Aug 22nd, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Owner = "liampdoherty"
  2. Player = game.Players:findFirstChild(Owner).PlayerGui
  3. Pet = game.Workspace:FindFirstChild(Owner .."'s Pet")
  4.  
  5. Gui = Instance.new("ScreenGui")
  6. Gui.Parent = Player
  7. Gui.Name = "PetGUI"
  8.  
  9. R = Instance.new("TextButton")
  10. R.Parent = Gui
  11. R.Name = "MakePet"
  12. R.Text = "Make A Pet"
  13. R.Size = UDim2.new(0, 75, 0, 25)
  14. R.Position = UDim2.new(0, 0, 0, 175)
  15. R.TextColor3 = Color3.new(154, 1, 1)
  16. R.BorderColor3 = Color3.new(43, 0, 1)
  17. R.BackgroundColor3 = Color3.new(0, 0, 0)
  18.  
  19. D = Instance.new("TextButton")
  20. D.Parent = Gui
  21. D.Name = "RemovePet"
  22. D.Text = "Delete Pet"
  23. D.Size = UDim2.new(0, 75, 0, 25)
  24. D.Position = UDim2.new(0, 0, 0, 200)
  25. D.TextColor3 = Color3.new(154, 1, 1)
  26. D.BorderColor3 = Color3.new(43, 0, 1)
  27. D.BackgroundColor3 = Color3.new(0, 0, 0)
  28.  
  29. S = Instance.new("TextButton")
  30. S.Parent = Gui
  31. S.Name = "Cookie"
  32. S.Text = "Give A Cookie"
  33. S.Size = UDim2.new(0, 75, 0, 25)
  34. S.Position = UDim2.new(0, 0, 0, 225)
  35. S.TextColor3 = Color3.new(154, 1, 1)
  36. S.BorderColor3 = Color3.new(43, 0, 1)
  37. S.BackgroundColor3 = Color3.new(0, 0, 0)
  38.  
  39. function onButtonClicked1()
  40.  
  41. if game.Workspace:FindFirstChild(Owner .."'s Pet") ~= nil then
  42. game.Workspace:FindFirstChild(Owner .."'s Pet"):remove()
  43. else
  44. print("You Don't Have A Pet!")
  45. end
  46. end
  47.  
  48. function onButtonClicked2()
  49.  
  50. if game.Workspace:FindFirstChild(Owner .."'s Pet") ~= nil then
  51. print("You Already Have A Pet!")
  52. else
  53. m = Instance.new("Model")
  54. m.Name = Owner.."'s Pet"
  55. m.Parent = game.Workspace
  56.  
  57. h = Instance.new("Humanoid")
  58. h.MaxHealth = "0"
  59. h.Parent = m
  60.  
  61. o = Instance.new("Part")
  62. o.Parent = m
  63. o.Position = Vector3.new(0,50,0)
  64. o.CanCollide = true
  65. o.Anchored = false
  66. o.Locked = true
  67. o.Name = "Head"
  68. o.BrickColor = BrickColor.new("Magenta")
  69. o.Transparency = "0.5"
  70. o.Reflectance = "1"
  71. o.Size = Vector3.new(1,1,1)
  72.  
  73. bp = Instance.new("BodyPosition")
  74. bp.Parent = o
  75.  
  76. while true do
  77. wait()
  78. bp.position = game.Workspace[Owner].Torso.Position + Vector3.new(2,0,2)
  79. end
  80. end
  81. end
  82.  
  83. function onButtonClicked3()
  84.  
  85. if game.Workspace:FindFirstChild(Owner .."'s Pet") ~= nil then
  86. p = Instance.new("Part")
  87. p.Name = "cookie"
  88. p.Size = Vector3.new(1,1,1)
  89. p.Shape = 2
  90. p.Position = game.Workspace:FindFirstChild(Owner .."'s Pet").Head.Position + Vector3.new(0,5,0)
  91. p.Anchored = true
  92. p.Locked = true
  93. p.CanCollide = false
  94. p.BrickColor = BrickColor.new("Bright yellow")
  95. p.Parent = game.Workspace
  96.  
  97. game.Workspace:FindFirstChild(Owner .."'s Pet").Name = Owner .."'s Pet : Yummy A Cookie!"
  98. wait(2)
  99. game.Workspace:FindFirstChild(Owner .."'s Pet : Yummy A Cookie!").Name = Owner .."'s Pet"
  100. p:remove()
  101.  
  102. while true do
  103. wait()
  104. game.Workspace:FindFirstChild(Owner .."'s Pet").Head.BodyPosition.position = game.Workspace[Owner].Torso.Position + Vector3.new(2,0,2)
  105. end
  106. else
  107. print("Why Would U Give A Cookie If You Don't Have A Pet!")
  108. end
  109. end
  110.  
  111. D.MouseButton1Click:connect(onButtonClicked1)
  112. R.MouseButton1Click:connect(onButtonClicked2)
  113. S.MouseButton1Click:connect(onButtonClicked3)
  114.  
  115. --Mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement