Advertisement
Gmodmoney2

Untitled

Aug 14th, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.84 KB | None | 0 0
  1. user = "GmodMoney"
  2. looklike = ""
  3. namez = "Dummy"
  4. speed = 20
  5. health = 100
  6. color1 = "Bright yellow"
  7. color2 = "Bright blue"
  8. color3 = "Bright green"
  9.  
  10. function Del(E)
  11. wait(3.5)
  12. E.Parent:remove()
  13. end
  14. function HumanDed(ob)
  15. ob.Died:connect(function()
  16. coroutine.resume(coroutine.create(Del), ob)
  17. end)
  18. end
  19.  
  20. function GenerateDummys(a)
  21. for i = 1, a do
  22. m = Instance.new("Model")
  23. m.Parent = Workspace
  24. m.Name = namez
  25.  
  26. t = Instance.new("Part")
  27. t.Name = "Torso"
  28. t.formFactor = "Symmetric"
  29. t.Size = Vector3.new(2,2,1)
  30. t.Position = Vector3.new(0,100,0)
  31. t.BrickColor = BrickColor.new(color2)
  32. t.TopSurface = 0
  33. t.BottomSurface = 0
  34. t.Locked = true
  35. t.Parent = m
  36.  
  37. h = t:Clone()
  38. h.Name = "Head"
  39. h.Size = Vector3.new(1,1,1)
  40. h.Position = t.Position
  41. h.BrickColor = BrickColor.new(color1)
  42. h.Parent = m
  43.  
  44. ra = t:Clone()
  45. ra.Name = "Right Arm"
  46. ra.Size = Vector3.new(1,2,1)
  47. ra.Position = t.Position
  48. ra.BrickColor = BrickColor.new(color1)
  49. ra.Parent = m
  50. la = t:Clone()
  51. la.Name = "Left Arm"
  52. la.Size = Vector3.new(1,2,1)
  53. la.Position = t.Position
  54. la.BrickColor = BrickColor.new(color1)
  55. la.Parent = m
  56.  
  57. rl = t:Clone()
  58. rl.Name = "Right Leg"
  59. rl.Size = Vector3.new(1,2,1)
  60. rl.Position = t.Position
  61. rl.BrickColor = BrickColor.new(color3)
  62. rl.Parent = m
  63. ll = t:Clone()
  64. ll.Name = "Left Leg"
  65. ll.Size = Vector3.new(1,2,1)
  66. ll.Position = t.Position
  67. ll.BrickColor = BrickColor.new(color3)
  68. ll.Parent = m
  69.  
  70. hu = Instance.new("Humanoid")
  71. hu.Parent = m
  72. hu.Name = "Humanoid"
  73. hu.MaxHealth = health
  74. hu.Health = health
  75. hu.WalkSpeed = speed
  76. coroutine.resume(coroutine.create(HumanDed), hu)
  77.  
  78. --------- WELDING ---------
  79.  
  80. w = Instance.new("Snap")
  81. w.Name = "Neck"
  82. w.Parent = t
  83. w.Part0 = t
  84. w.Part1 = h
  85. w.C0 = CFrame.new(0,1.5,0)
  86.  
  87. w = Instance.new("Motor")
  88. w.Name = "Right Shoulder"
  89. w.Parent = t
  90. w.Part0 = t
  91. w.Part1 = ra
  92. w.C0 = CFrame.new(0.75,0.5,0) * CFrame.Angles(0,math.pi/2,0)
  93. w.C1 = CFrame.new(-0.75,0.5,0) * CFrame.Angles(0,math.pi/2,0)
  94. w.MaxVelocity = 0.1
  95. w = Instance.new("Motor")
  96. w.Name = "Left Shoulder"
  97. w.Parent = t
  98. w.Part0 = t
  99. w.Part1 = la
  100. w.C0 = CFrame.new(-0.75,0.5,0) * CFrame.Angles(0,-math.pi/2,0)
  101. w.C1 = CFrame.new(0.75,0.5,0) * CFrame.Angles(0,-math.pi/2,0)
  102. w.MaxVelocity = 0.1
  103.  
  104. w = Instance.new("Motor")
  105. w.Name = "Right Hip"
  106. w.Parent = t
  107. w.Part0 = t
  108. w.Part1 = rl
  109. w.C0 = CFrame.new(0.25,-1,0) * CFrame.Angles(0,math.pi/2,0)
  110. w.C1 = CFrame.new(-0.25,1,0) * CFrame.Angles(0,math.pi/2,0)
  111. w.MaxVelocity = 0.1
  112. w = Instance.new("Motor")
  113. w.Name = "Left Hip"
  114. w.Parent = t
  115. w.Part0 = t
  116. w.Part1 = ll
  117. w.C0 = CFrame.new(-0.25,-1,0) * CFrame.Angles(0,-math.pi/2,0)
  118. w.C1 = CFrame.new(0.25,1,0) * CFrame.Angles(0,-math.pi/2,0)
  119. w.MaxVelocity = 0.1
  120.  
  121. n = Instance.new("NumberValue")
  122. n.Parent = m
  123. n.Name = "IsADummy"
  124.  
  125. wait()
  126.  
  127. if game.Players[user].Character:findFirstChild("Torso") ~= nil then
  128. m:moveTo(game.Players[user].Character.Torso.Position + Vector3.new(math.random(-15,15),0,math.random(-15,15)))
  129. end
  130. if game.Players[user].Character:findFirstChild("Torso") == nil then
  131. m:moveTo(game.Workspace.Base.Position + Vector3.new(math.random(-15,15),0,math.random(-15,15)))
  132. end
  133.  
  134. looklike2 = nil
  135. if string.lower(looklike) == "randomize" then
  136. playaz = game.Players:GetChildren()
  137. looklike2 = playaz[math.random(1, #playaz)].Name
  138. else
  139. looklike2 = looklike
  140. end
  141. if game.Players:findFirstChild(looklike2) ~= nil then
  142. if game.Players[looklike2].Character.Parent ~= nil then
  143. for i, v in pairs(game.Players[looklike2].Character:GetChildren()) do
  144. if v.className == "Shirt" or v.className == "Pants" or v.className == "BodyColors" or v.className == "CharacterMesh" or v.className == "ShirtGraphic" then
  145. v2 = v:Clone()
  146. v2.Parent = m
  147. end
  148. if v.className == "Hat" then
  149. v2 = v:Clone()
  150. v2.Handle.Locked = true
  151. v2.Parent = m
  152. end
  153. if v.Name == "Animate" then
  154. v2 = v:Clone()
  155. v2.Disabled = true
  156. v2.Parent = m
  157. end
  158. if v.Name == "Sound" then
  159. v2 = v:Clone()
  160. v2.Parent = m
  161. end
  162. if v.Name == "Head" then
  163. if v:findFirstChild("face") then
  164. v2 = v.face:Clone()
  165. v2.Parent = m.Head
  166. end
  167. if v:findFirstChild("Mesh") then
  168. v2 = v.Mesh:Clone()
  169. v2.Parent = m.Head
  170. end
  171. end
  172. if v.Name == "Torso" then
  173. if v:findFirstChild("roblox") then
  174. v2 = v.roblox:Clone()
  175. v2.Parent = m.Torso
  176. end
  177. end
  178. end
  179. end
  180. end
  181. wait(0.05)
  182. end
  183. end
  184.  
  185.  
  186. function Chat(msg)
  187.  
  188. if string.sub(msg, 1, 4) == "gen/" then
  189. num = tonumber(string.sub(msg, 5))
  190. coroutine.resume(coroutine.create(GenerateDummys), num)
  191. end
  192. if string.sub(msg, 1, 9) == "looklike/" then
  193. looklike = string.sub(msg, 10)
  194. end
  195. if string.sub(msg, 1, 5) == "col1/" then
  196. color1 = string.sub(msg, 6)
  197. end
  198. if string.sub(msg, 1, 5) == "col2/" then
  199. color2 = string.sub(msg, 6)
  200. end
  201. if string.sub(msg, 1, 5) == "col3/" then
  202. color3 = string.sub(msg, 6)
  203. end
  204. if string.sub(msg, 1, 6) == "dummy/" then
  205. pcall(function() game.Players[string.sub(msg, 7)].Character=m end)
  206. end
  207. if string.sub(msg, 1, 7) == "health/" then
  208. health = tonumber(string.sub(msg, 8))
  209. end
  210. if string.sub(msg, 1, 6) == "namez/" then
  211. namez = string.sub(msg, 7)
  212. end
  213. if msg == "clean dummys" then
  214. for _, vz in pairs(Workspace:GetChildren()) do
  215. if vz:findFirstChild("IsADummy") ~= nil then
  216. vz:remove()
  217. end
  218. if vz.className == "Hat" then
  219. vz:remove()
  220. end
  221. end
  222. end
  223. if msg == "kill dummys" then
  224. for _, vz in pairs(Workspace:GetChildren()) do
  225. if vz:findFirstChild("IsADummy") ~= nil then
  226. vz.Humanoid.Health = 0
  227. end
  228. end
  229. end
  230. if msg == "drop hats" then
  231. for _, vz in pairs(Workspace:GetChildren()) do
  232. if vz:findFirstChild("IsADummy") ~= nil then
  233. for _, vzz in pairs(vz:GetChildren()) do
  234. if vzz.className == "Hat" then
  235. vzz.Parent = Workspace
  236. end
  237. end
  238. end
  239. end
  240. end
  241. if msg == "remov skript" then
  242. script:remove()
  243. end
  244.  
  245. end
  246. game.Players[user].Chatted:connect(Chat)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement