Advertisement
Dark_EccentricYT

Untitled

Apr 21st, 2017
1,572
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.29 KB | None | 0 0
  1. --[[
  2. // Created by Peyton
  3. // Idk why I made this. I was bored and its pretty funny to watch people react.
  4. // And this thing is not as glitchy as it used to be.
  5. // Sorry the UI looks so bad. I'll fix it sometime.
  6. --]]
  7.  
  8. local LeaveCollar = true -- Leaves the collar on the people you capture after releasing them.
  9. -- I will add more functionality for this in the UI later.
  10.  
  11. -- Thats all the settings for now. --
  12.  
  13.  
  14. -- Don't touch anything below for the best experience. -- (plus im a sloppy c0der xd) --
  15.  
  16. local Captured = false
  17.  
  18. function leash(plr)
  19. if Captured then
  20. Release()
  21. end
  22. Char = game.Players[plr].Character
  23. Master = game.Players.LocalPlayer.Character
  24.  
  25. Neck = Instance.new("Part")
  26.  
  27. Pole = Instance.new("Part")
  28. Pole.Name = "Pole"
  29. Pole.Size = Vector3.new(0.1,0.1,0.1)
  30. Pole.Transparency = 1
  31.  
  32. Weld4 = Instance.new("Weld")
  33. Weld4.Parent = Pole
  34. Weld4.Part0 = Pole
  35. Weld4.Part1 = Master["Left Arm"]
  36. Weld4.C0 = CFrame.new(0,0.5,0)
  37.  
  38. Pole.Parent = Master["Left Arm"]
  39.  
  40. Attachment = Instance.new("Attachment", Neck)
  41. Attachment1 = Instance.new("Attachment", Pole)
  42.  
  43. Neck.Size = Vector3.new(0.1,0.1,0.1)
  44. Neck.CanCollide = false
  45. Neck.Transparency = 1
  46.  
  47. Weld3 = Instance.new("Weld")
  48. Weld3.Parent = Neck
  49. Weld3.Part0 = Neck
  50. Weld3.Part1 = Char.Head
  51. Weld3.C0 = CFrame.new(0,0.5,0.55)
  52.  
  53. Instance.new("BodyGyro", Char.Torso)
  54. Instance.new("BodyGyro", Master.Torso)
  55. Neck.Parent = Char.Head
  56.  
  57. Collar = Instance.new("Part")
  58. Collar.Size = Vector3.new(1,0.2,1)
  59. Collar.CanCollide = false
  60. Collar.Transparency = 0
  61. Collar.BrickColor = BrickColor.Black()
  62.  
  63. local CollarMesh = Instance.new("CylinderMesh", Collar)
  64. CollarMesh.Scale = Vector3.new(1.2,0.8,1.2)
  65.  
  66. local Weld6 = Instance.new("Weld")
  67. Weld6.Parent = Collar
  68. Weld6.Part0 = Collar
  69. Weld6.Part1 = Char.Head
  70. Weld6.C0 = CFrame.new(0,0.5,0)
  71.  
  72. Collar.Parent = Char.Head
  73.  
  74. Leash = Instance.new("RopeConstraint", Master["Left Arm"])
  75. Leash.Color = BrickColor.Black()
  76. Leash.Thickness = 0.1
  77. Leash.Visible = true
  78. Leash.Restitution = 1
  79. Leash.Length = 5
  80.  
  81. Leash.Attachment0 = Attachment
  82. Leash.Attachment1 = Master["Left Arm"].Pole.Attachment
  83.  
  84. Char.Humanoid.WalkSpeed = 0
  85. Char.Humanoid.PlatformStand = true
  86. Char.Humanoid.Sit = true
  87. Clone = Char.HumanoidRootPart:Clone()
  88. Char.HumanoidRootPart:Destroy()
  89.  
  90. Char.Humanoid.Died:connect(function()
  91. Release()
  92. end)
  93.  
  94. Master.Humanoid.Died:connect(function()
  95. Release()
  96. end)
  97. end
  98.  
  99. local selecteduser = nil
  100.  
  101. local NewGuiPart1 = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
  102.  
  103. local NewGuiPart2 = Instance.new("TextLabel")
  104. NewGuiPart2.Size = UDim2.new(0, 300, 0, 20)
  105. NewGuiPart2.Position = UDim2.new(0.5, -150, 0.4, -10)
  106. NewGuiPart2.Font = Enum.Font.Bodoni
  107. NewGuiPart2.FontSize = Enum.FontSize.Size14
  108. NewGuiPart2.Text = "Leash Gui"
  109. NewGuiPart2.TextScaled = true
  110. NewGuiPart2.TextWrapped = true
  111. NewGuiPart2.Draggable = true
  112. NewGuiPart2.Active = true
  113. NewGuiPart2.Parent = NewGuiPart1
  114.  
  115. local NewGuiPart3 = Instance.new("Frame")
  116. NewGuiPart3.Name = "Main"
  117. NewGuiPart3.Position = UDim2.new(0, 0, 1, 0)
  118. NewGuiPart3.Size = UDim2.new(1, 0, 0, 150)
  119. NewGuiPart3.Parent = NewGuiPart2
  120.  
  121. local NewGuiPart4 = Instance.new("TextButton")
  122. NewGuiPart4.Active = true
  123. NewGuiPart4.Name = "LeashEm"
  124. NewGuiPart4.Position = UDim2.new(0, 0, 1, -30)
  125. NewGuiPart4.Selectable = true
  126. NewGuiPart4.Size = UDim2.new(1, 0, 0, 30)
  127. NewGuiPart4.Style = Enum.ButtonStyle.Custom
  128. NewGuiPart4.Font = Enum.Font.Antique
  129. NewGuiPart4.FontSize = Enum.FontSize.Size14
  130. NewGuiPart4.Text = "Leash Em"
  131. NewGuiPart4.TextScaled = true
  132. NewGuiPart4.TextWrapped = true
  133. NewGuiPart4.Parent = NewGuiPart3
  134.  
  135. local NewGuiPart5 = Instance.new("ScrollingFrame")
  136. NewGuiPart5.Name = "Players"
  137. NewGuiPart5.Selectable = true
  138. NewGuiPart5.Size = UDim2.new(1, 0, 0, 100)
  139. NewGuiPart5.ClipsDescendants = true
  140. NewGuiPart5.Parent = NewGuiPart3
  141.  
  142. local ListUI = Instance.new("UIListLayout", NewGuiPart5)
  143.  
  144. local Selected = Instance.new("TextLabel", NewGuiPart4)
  145. Selected.Position = UDim2.new(0,0,0,-20)
  146. Selected.Size = UDim2.new(1,0,0,20)
  147. Selected.Text = "Selected: nil"
  148.  
  149. NewGuiPart4.MouseButton1Down:connect(function()
  150. if Captured then
  151. Release()
  152. else
  153. if selecteduser ~= nil then
  154. if game.Players:FindFirstChild(selecteduser) then
  155. leash(selecteduser)
  156. wait()
  157. Capture()
  158. end
  159. end
  160. end
  161. end)
  162.  
  163. function Capture()
  164. NewGuiPart4.Text = "Release"
  165. Captured = true
  166. NewGuiPart5.Visible = false
  167. NewGuiPart4.Position = UDim2.new(0, 0, 0, 20)
  168. NewGuiPart4.Size = UDim2.new(1, 0, 0, 130)
  169. TP()
  170. end
  171.  
  172. function TP()
  173. local prt = Instance.new("Part", game.Players.LocalPlayer.Character)
  174. prt.Transparency = 1
  175. prt.CanCollide = false
  176. prt.Anchored = true
  177. prt.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(Vector3.new(0, 5, -5))
  178. Char.Torso.CFrame = prt.CFrame * CFrame.new(0, 0, -4) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(180), math.rad(0))
  179. prt:Destroy()
  180. end
  181.  
  182. function Release()
  183. Neck:Destroy()
  184. Pole:Destroy()
  185. Weld4:Destroy()
  186. Attachment:Destroy()
  187. Attachment1:Destroy()
  188. Weld3:Destroy()
  189. Char.Torso.BodyGyro:Destroy()
  190. Master.Torso.BodyGyro:Destroy()
  191. Leash:Destroy()
  192. Clone.Parent = Char
  193. Char.Humanoid.WalkSpeed = 16
  194. Char.Humanoid.PlatformStand = false
  195. Char.Humanoid.Sit = false
  196. if not LeaveCollar then
  197. Collar:Destroy()
  198. end
  199. NewGuiPart4.Text = "Leash Em"
  200. NewGuiPart4.Position = UDim2.new(0, 0, 1, -30)
  201. NewGuiPart4.Size = UDim2.new(1, 0, 0, 30)
  202. NewGuiPart5.Visible = true
  203. Captured = false
  204. wait()
  205. TP()
  206. end
  207.  
  208. function playerbuttons(name)
  209. local button = Instance.new("TextButton", NewGuiPart5)
  210. button.Size = UDim2.new(1, 0, 0, 25)
  211. button.TextScaled = true
  212. button.Text = name
  213. button.Name = name
  214. button.MouseButton1Down:connect(function()
  215. Selected.Text = "Selected: "..name
  216. selecteduser = name
  217. end)
  218. NewGuiPart5.CanvasSize = UDim2.new(0,0,0, NewGuiPart5.CanvasSize.Y.Offset + 25)
  219. end
  220.  
  221. game.Players.ChildAdded:connect(function(thing)
  222. UpdateList()
  223. end)
  224.  
  225. game.Players.ChildRemoved:connect(function(thing)
  226. UpdateList()
  227. end)
  228.  
  229. function UpdateList()
  230. NewGuiPart5.CanvasSize = UDim2.new(0,0,0,0)
  231. for i,v in pairs(NewGuiPart5:GetChildren()) do
  232. if v.ClassName == "TextButton" then
  233. v:Destroy()
  234. end
  235. end
  236.  
  237. for i,v in pairs(game.Players:GetChildren()) do
  238. if v.Name ~= game.Players.LocalPlayer.Name then
  239. playerbuttons(v.Name)
  240. end
  241. end
  242. end
  243.  
  244. UpdateList()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement