Advertisement
lafur

Untitled

Oct 21st, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.83 KB | None | 0 0
  1. --Created by PenguinAnonymous (ttyyuu12345) Editied by Dittoide
  2. --What's Added To M2S with Dittoide's Edit?
  3. --/ Better dummy script function to improve compatibility (makes it like you are running the code inside the script.)
  4. --/ Removed Gui In Bottom-Left for when you are making guis.
  5. --/ Removed "Inserting Map Please Wait" gui when selected Workspace as Place to export.
  6. --Credit: PenguinAnonymous for making original script, i just wanted to iron it out to my liking.
  7. --Errors: Camera,Terrain
  8. local runDummyScript = function(f,scri)
  9. if (not scri:IsA('Script')) or (not scri:IsA('LocalScript')) then return false; end;
  10. local Dummy_CoRoutine = coroutine.create(function()
  11. getfenv().script = scri
  12. ypcall(function() f() end)
  13. end)
  14. table.insert(cors,Dummy_CoRoutine);
  15. coroutine.resume(Dummy_CoRoutine);
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. mas.Name = "M2S_Model"
  20. o3 = Instance.new("Model")
  21. o4 = Instance.new("Part")
  22. o5 = Instance.new("Sound")
  23. o6 = Instance.new("Sound")
  24. o7 = Instance.new("SpecialMesh")
  25. o8 = Instance.new("Decal")
  26. o9 = Instance.new("Part")
  27. o10 = Instance.new("Motor")
  28. o11 = Instance.new("Snap")
  29. o12 = Instance.new("Motor")
  30. o13 = Instance.new("Motor")
  31. o14 = Instance.new("Motor")
  32. o15 = Instance.new("Part")
  33. o16 = Instance.new("Part")
  34. o17 = Instance.new("BodyColors")
  35. o18 = Instance.new("Part")
  36. o19 = Instance.new("Part")
  37. o20 = Instance.new("Humanoid")
  38. o21 = Instance.new("Script")
  39. o22 = Instance.new("Script")
  40. o23 = Instance.new("Script")
  41. o24 = Instance.new("Script")
  42. o25 = Instance.new("Script")
  43. o26 = Instance.new("IntValue")
  44. o27 = Instance.new("Script")
  45. o28 = Instance.new("Script")
  46. o29 = Instance.new("IntValue")
  47. o30 = Instance.new("IntValue")
  48. o31 = Instance.new("Part")
  49. o32 = Instance.new("Sound")
  50. o33 = Instance.new("Sound")
  51. o34 = Instance.new("Sound")
  52. o35 = Instance.new("Sound")
  53. o36 = Instance.new("Sound")
  54. o37 = Instance.new("Sound")
  55. o38 = Instance.new("SpecialMesh")
  56. o3.Name = "Attacker"
  57. o3.Parent = mas
  58. o3.PrimaryPart = o9
  59. o4.Name = "Head"
  60. o4.Parent = o3
  61. o4.BrickColor = BrickColor.new("Bright yellow")
  62. o4.Position = Vector3.new(-140.001602, 174.795563, -157.424377)
  63. o4.Rotation = Vector3.new(-0.0700000003, -0.00999999978, 0.0399999991)
  64. o4.Velocity = Vector3.new(0, -1, 0)
  65. o4.CanCollide = false
  66. o4.FormFactor = Enum.FormFactor.Symmetric
  67. o4.Size = Vector3.new(2, 1, 1)
  68. o4.CFrame = CFrame.new(-140.001602, 174.795563, -157.424377, 0.999999583, -0.000769921287, -0.000255786668, 0.00077025115, 0.999998868, 0.00129179726, 0.000254791812, -0.00129199401, 0.999999046)
  69. o4.TopSurface = Enum.SurfaceType.Smooth
  70. o4.Color = Color3.new(0.960784, 0.803922, 0.188235)
  71. o4.Position = Vector3.new(-140.001602, 174.795563, -157.424377)
  72. o5.Parent = o4
  73. o5.SoundId = "rbxasset://sounds/bfsl-minifigfoots1.mp3"
  74. o5.Looped = true
  75. o6.Parent = o4
  76. o6.SoundId = "rbxasset://sounds/swoosh.wav"
  77. o7.Parent = o4
  78. o7.Scale = Vector3.new(1.25, 1.25, 1.25)
  79. o8.Name = "roblox"
  80. o8.Parent = o4
  81. o8.Texture = "rbxasset://textures/face.png"
  82. o9.Name = "Torso"
  83. o9.Parent = o3
  84. o9.BrickColor = BrickColor.new("Bright blue")
  85. o9.Position = Vector3.new(-140.000427, 173.295563, -157.42244)
  86. o9.Rotation = Vector3.new(-0.0700000003, -0.00999999978, 0.0399999991)
  87. o9.CanCollide = false
  88. o9.FormFactor = Enum.FormFactor.Symmetric
  89. o9.Size = Vector3.new(2, 2, 1)
  90. o9.CFrame = CFrame.new(-140.000427, 173.295563, -157.42244, 0.999999642, -0.000769921346, -0.000255786697, 0.00077025115, 0.999998868, 0.00129179738, 0.000254791841, -0.00129199401, 0.999999106)
  91. o9.Color = Color3.new(0.0509804, 0.411765, 0.67451)
  92. o9.Position = Vector3.new(-140.000427, 173.295563, -157.42244)
  93. o9.velocity = Vector3.new(0, -1, 0)
  94. o10.Name = "Left Hip"
  95. o10.Parent = o9
  96. o10.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  97. o10.C1 = CFrame.new(-0.5, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  98. o10.Part0 = o9
  99. o10.Part1 = o15
  100. o10.CurrentAngle = 0.079927355051041
  101. o10.DesiredAngle = 0.079927355051041
  102. o10.MaxVelocity = 0.10000000149012
  103. o11.Name = "Neck"
  104. o11.Parent = o9
  105. o11.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  106. o11.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  107. o12.Name = "Right Hip"
  108. o12.Parent = o9
  109. o12.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  110. o12.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  111. o12.Part0 = o9
  112. o12.Part1 = o16
  113. o12.CurrentAngle = 0.079927355051041
  114. o12.DesiredAngle = 0.079927355051041
  115. o12.MaxVelocity = 0.10000000149012
  116. o13.Name = "Right Shoulder"
  117. o13.Parent = o9
  118. o13.C0 = CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  119. o13.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  120. o13.Part0 = o18
  121. o13.Part1 = o9
  122. o13.CurrentAngle = 0.079927355051041
  123. o13.DesiredAngle = 0.079927355051041
  124. o13.MaxVelocity = 0.15000000596046
  125. o14.Name = "Left Shoulder"
  126. o14.Parent = o9
  127. o14.C0 = CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  128. o14.C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  129. o14.Part0 = o19
  130. o14.Part1 = o9
  131. o14.CurrentAngle = -0.079927355051041
  132. o14.DesiredAngle = -0.079927355051041
  133. o14.MaxVelocity = 0.15000000596046
  134. o15.Name = "Left Leg"
  135. o15.Parent = o3
  136. o15.BrickColor = BrickColor.new("Dark green")
  137. o15.Position = Vector3.new(-140.498917, 171.298477, -157.340149)
  138. o15.Rotation = Vector3.new(-4.6500001, -0.0199999996, 0.0399999991)
  139. o15.Velocity = Vector3.new(0, -1, 0)
  140. o15.CanCollide = false
  141. o15.FormFactor = Enum.FormFactor.Symmetric
  142. o15.Size = Vector3.new(1, 2, 1)
  143. o15.CFrame = CFrame.new(-140.498917, 171.298477, -157.340149, 0.999999642, -0.000747040845, -0.000316442398, 0.00077025115, 0.996703267, 0.0811298713, 0.000254791841, -0.0811300799, 0.996703446)
  144. o15.BottomSurface = Enum.SurfaceType.Smooth
  145. o15.Color = Color3.new(0.156863, 0.498039, 0.278431)
  146. o15.Position = Vector3.new(-140.498917, 171.298477, -157.340149)
  147. o15.velocity = Vector3.new(0, -1, 0)
  148. o16.Name = "Right Leg"
  149. o16.Parent = o3
  150. o16.BrickColor = BrickColor.new("Dark green")
  151. o16.Position = Vector3.new(-139.498871, 171.299042, -157.499573)
  152. o16.Rotation = Vector3.new(4.50999975, -0.00999999978, 0.049999997)
  153. o16.Velocity = Vector3.new(0, -1, 0)
  154. o16.CanCollide = false
  155. o16.FormFactor = Enum.FormFactor.Symmetric
  156. o16.Size = Vector3.new(1, 2, 1)
  157. o16.CFrame = CFrame.new(-139.498871, 171.299042, -157.499573, 0.999999642, -0.000787885976, -0.000193497821, 0.00077025115, 0.996909499, -0.0785545185, 0.000254791841, 0.0785543397, 0.996909797)
  158. o16.BottomSurface = Enum.SurfaceType.Smooth
  159. o16.Color = Color3.new(0.156863, 0.498039, 0.278431)
  160. o16.Position = Vector3.new(-139.498871, 171.299042, -157.499573)
  161. o16.velocity = Vector3.new(0, -1, 0)
  162. o17.Parent = o3
  163. o17.HeadColor = BrickColor.new("Bright yellow")
  164. o17.LeftArmColor = BrickColor.new("Medium stone grey")
  165. o17.LeftLegColor = BrickColor.new("Brick yellow")
  166. o17.RightArmColor = BrickColor.new("Medium stone grey")
  167. o17.RightLegColor = BrickColor.new("Brick yellow")
  168. o17.TorsoColor = BrickColor.new("Bright red")
  169. o18.Name = "Right Arm"
  170. o18.Parent = o3
  171. o18.BrickColor = BrickColor.new("Bright yellow")
  172. o18.Position = Vector3.new(-138.500412, 173.298264, -157.461975)
  173. o18.Rotation = Vector3.new(4.50999975, -0.00999999978, 0.049999997)
  174. o18.Velocity = Vector3.new(0, -1, 0)
  175. o18.CanCollide = false
  176. o18.FormFactor = Enum.FormFactor.Symmetric
  177. o18.Size = Vector3.new(1, 2, 1)
  178. o18.CFrame = CFrame.new(-138.500412, 173.298264, -157.461975, 0.999999642, -0.000787885976, -0.000193497821, 0.00077025115, 0.996909499, -0.0785545185, 0.000254791841, 0.0785543397, 0.996909797)
  179. o18.Color = Color3.new(0.960784, 0.803922, 0.188235)
  180. o18.Position = Vector3.new(-138.500412, 173.298264, -157.461975)
  181. o18.velocity = Vector3.new(0, -1, 0)
  182. o19.Name = "Left Arm"
  183. o19.Parent = o3
  184. o19.BrickColor = BrickColor.new("Bright yellow")
  185. o19.Position = Vector3.new(-141.500412, 173.295959, -157.462738)
  186. o19.Rotation = Vector3.new(4.50999975, -0.00999999978, 0.049999997)
  187. o19.Velocity = Vector3.new(0, -1, 0)
  188. o19.CanCollide = false
  189. o19.FormFactor = Enum.FormFactor.Symmetric
  190. o19.Size = Vector3.new(1, 2, 1)
  191. o19.CFrame = CFrame.new(-141.500412, 173.295959, -157.462738, 0.999999642, -0.000787885976, -0.000193497821, 0.00077025115, 0.996909499, -0.0785545185, 0.000254791841, 0.0785543397, 0.996909797)
  192. o19.Color = Color3.new(0.960784, 0.803922, 0.188235)
  193. o19.Position = Vector3.new(-141.500412, 173.295959, -157.462738)
  194. o19.velocity = Vector3.new(0, -1, 0)
  195. o20.Name = "Zombie"
  196. o20.Parent = o3
  197. o20.RightLeg = o16
  198. o20.LeftLeg = o15
  199. o20.Torso = o9
  200. o21.Parent = o3
  201.  
  202. runDummyScript(function()
  203. local larm = script.Parent:FindFirstChild("Left Arm")
  204. local rarm = script.Parent:FindFirstChild("Right Arm")
  205.  
  206. function findNearestTorso(pos)
  207. local list = game.Workspace:children()
  208. local torso = nil
  209. local dist = 1000
  210. local temp = nil
  211. local human = nil
  212. local temp2 = nil
  213. for x = 1, #list do
  214. temp2 = list[x]
  215. if (temp2.className == "Model") and (temp2 ~= script.Parent) then
  216. temp = temp2:findFirstChild("Torso")
  217. human = temp2:findFirstChild("Zombie")
  218. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  219. if (temp.Position - pos).magnitude < dist then
  220. torso = temp
  221. dist = (temp.Position - pos).magnitude
  222. end
  223. end
  224. end
  225. end
  226. return torso
  227. end
  228.  
  229. function Hit(hit)
  230. local human = hit.Parent:FindFirstChild("Zombie")
  231. if human ~= nil then
  232. human.Health = human.Health -8
  233. end
  234. end
  235.  
  236. larm.Touched:connect(Hit)
  237. rarm.Touched:connect(Hit)
  238.  
  239. while true do
  240. wait(0.1)
  241. local target = findNearestTorso(script.Parent.Torso.Position)
  242. if target ~= nil then
  243. script.Parent.Zombie:MoveTo(target.Position, target)
  244. end
  245. end
  246.  
  247. end,o21)
  248.  
  249. o22.Name = "Robot"
  250. o22.Parent = o3
  251.  
  252. runDummyScript(function()
  253. model = script.Parent
  254. backup = model:Clone()
  255. regentime = 1 --5 minutes
  256.  
  257. ------------------
  258. --SPAWNING--
  259. ------------------
  260.  
  261. miked=script.Parent
  262.  
  263. itlh=miked.Torso:findFirstChild("Left Hip")
  264. itlh.Part0=miked.Torso
  265. itlh.Part1=miked:findFirstChild("Left Leg")
  266. itlh.C0=CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  267.  
  268. itrh=miked.Torso:findFirstChild("Right Hip")
  269. itrh.Part0=miked.Torso
  270. itrh.Part1=miked:findFirstChild("Right Leg")
  271. itrh.C0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  272.  
  273. itls=miked.Torso:findFirstChild("Left Shoulder")
  274. itls.Part1=miked.Torso
  275. itls.C0=CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  276. itls.Part0=miked:findFirstChild("Left Arm")
  277.  
  278. itrs=miked.Torso:findFirstChild("Right Shoulder")
  279. itrs.Part1=miked.Torso
  280. itrs.C0=CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  281. itrs.Part0=miked:findFirstChild("Right Arm")
  282.  
  283. miked.Head:makeJoints()
  284. ------------------
  285. ------------------
  286.  
  287.  
  288. function waitForChild(parent, childName)
  289. while true do
  290. local child = parent:findFirstChild(childName)
  291. if child then
  292. return child
  293. end
  294. parent.ChildAdded:wait()
  295. end
  296. end
  297.  
  298. local Figure = script.Parent
  299. local Torso = waitForChild(Figure, "Torso")
  300. local RightShoulder = waitForChild(Torso, "Right Shoulder")
  301. local LeftShoulder = waitForChild(Torso, "Left Shoulder")
  302. local RightHip = waitForChild(Torso, "Right Hip")
  303. local LeftHip = waitForChild(Torso, "Left Hip")
  304. local Neck = waitForChild(Torso, "Neck")
  305. local Humanoid = waitForChild(Figure, "Zombie")
  306. local pose = "Standing"
  307.  
  308. local toolAnim = "None"
  309. local toolAnimTime = 0
  310.  
  311. local isSeated = false
  312.  
  313.  
  314. function onRunning(speed)
  315. if isSeated then return end
  316.  
  317. if speed>0 then
  318. pose = "Running"
  319. else
  320. pose = "Standing"
  321. end
  322. end
  323.  
  324. function onDied()
  325. pose = "Dead"
  326. wait(regentime)
  327. wait(1)
  328. model:remove()
  329. model = backup:Clone()
  330. wait(3)
  331. model.Parent = game.Workspace
  332. model:MakeJoints()
  333. end
  334.  
  335. function onJumping()
  336. isSeated = false
  337. pose = "Jumping"
  338. end
  339.  
  340. function onClimbing()
  341. pose = "Climbing"
  342. end
  343.  
  344. function onGettingUp()
  345. pose = "GettingUp"
  346. end
  347.  
  348. function onFreeFall()
  349. pose = "FreeFall"
  350. end
  351.  
  352. function onDancing()
  353. pose = "Dancing"
  354. end
  355.  
  356. function onFallingDown()
  357. pose = "FallingDown"
  358. end
  359.  
  360. function onSeated()
  361. isSeated = true
  362. pose = "Seated"
  363. end
  364.  
  365.  
  366.  
  367. function moveJump()
  368. RightShoulder.MaxVelocity = 1
  369. LeftShoulder.MaxVelocity = 1
  370. RightShoulder.DesiredAngle = -3.14
  371. LeftShoulder.DesiredAngle = -3.14
  372. RightHip.DesiredAngle = 0
  373. LeftHip.DesiredAngle = 0
  374. end
  375.  
  376. function moveFreeFall()
  377. RightShoulder.MaxVelocity = 0.5
  378. LeftShoulder.MaxVelocity = 0.5
  379. RightShoulder.DesiredAngle = -1
  380. LeftShoulder.DesiredAngle = -1
  381. RightHip.DesiredAngle = 0
  382. LeftHip.DesiredAngle = 0
  383. end
  384.  
  385. function moveFloat()
  386. RightShoulder.MaxVelocity = 0.5
  387. LeftShoulder.MaxVelocity = 0.5
  388. RightShoulder.DesiredAngle = -1.57
  389. LeftShoulder.DesiredAngle = 1.57
  390. RightHip.DesiredAngle = 1.57
  391. LeftHip.DesiredAngle = -1.57
  392. end
  393.  
  394. function moveBoogy()
  395. while pose=="Boogy" do
  396. wait(.5)
  397. RightShoulder.MaxVelocity = 1
  398. LeftShoulder.MaxVelocity = 1
  399. RightShoulder.DesiredAngle = -3.14
  400. LeftShoulder.DesiredAngle = 0
  401. RightHip.DesiredAngle = 1.57
  402. LeftHip.DesiredAngle = 0
  403. wait(.5)
  404. RightShoulder.MaxVelocity = 1
  405. LeftShoulder.MaxVelocity = 1
  406. RightShoulder.DesiredAngle = 0
  407. LeftShoulder.DesiredAngle = -3.14
  408. RightHip.DesiredAngle = 0
  409. LeftHip.DesiredAngle = 1.57
  410. end
  411. end
  412.  
  413. function moveZombie()
  414. RightShoulder.MaxVelocity = 0.5
  415. LeftShoulder.MaxVelocity = 0.5
  416. RightShoulder.DesiredAngle = -1.57
  417. LeftShoulder.DesiredAngle = 1.57
  418. RightHip.DesiredAngle = 0
  419. LeftHip.DesiredAngle = 0
  420. end
  421.  
  422. function movePunch()
  423. script.Parent.Torso.Anchored=true
  424. RightShoulder.MaxVelocity = 60
  425. LeftShoulder.MaxVelocity = 0.5
  426. RightShoulder.DesiredAngle = -1.57
  427. LeftShoulder.DesiredAngle = 0
  428. RightHip.DesiredAngle = 0
  429. LeftHip.DesiredAngle = 0
  430. wait(1)
  431. script.Parent.Torso.Anchored=false
  432. pose="Standing"
  433.  
  434. end
  435.  
  436. function moveKick()
  437. RightShoulder.MaxVelocity = 0.5
  438. LeftShoulder.MaxVelocity = 0.5
  439. RightShoulder.DesiredAngle = 0
  440. LeftShoulder.DesiredAngle = 0
  441. RightHip.MaxVelocity = 40
  442. RightHip.DesiredAngle = 1.57
  443. LeftHip.DesiredAngle = 0
  444. wait(1)
  445. pose="Standing"
  446.  
  447. end
  448.  
  449. function moveFly()
  450. RightShoulder.MaxVelocity = 0.5
  451. LeftShoulder.MaxVelocity = 0.5
  452. RightShoulder.DesiredAngle = 0
  453. LeftShoulder.DesiredAngle = 0
  454. RightHip.MaxVelocity = 40
  455. RightHip.DesiredAngle = 1.57
  456. LeftHip.DesiredAngle = 0
  457. wait(1)
  458. pose="Standing"
  459.  
  460. end
  461.  
  462.  
  463. function moveClimb()
  464. RightShoulder.MaxVelocity = 0.5
  465. LeftShoulder.MaxVelocity = 0.5
  466. RightShoulder.DesiredAngle = -3.14
  467. LeftShoulder.DesiredAngle = 3.14
  468. RightHip.DesiredAngle = 0
  469. LeftHip.DesiredAngle = 0
  470. end
  471.  
  472. function moveSit()
  473. RightShoulder.MaxVelocity = 0.15
  474. LeftShoulder.MaxVelocity = 0.15
  475. RightShoulder.DesiredAngle = -3.14 /2
  476. LeftShoulder.DesiredAngle = -3.14 /2
  477. RightHip.DesiredAngle = 3.14 /2
  478. LeftHip.DesiredAngle = -3.14 /2
  479. end
  480.  
  481. function getTool()
  482.  
  483. kidTable = Figure:children()
  484. if (kidTable ~= nil) then
  485. numKids = #kidTable
  486. for i=1,numKids do
  487. if (kidTable[i].className == "Tool") then return kidTable[i] end
  488. end
  489. end
  490.  
  491. return nil
  492. end
  493.  
  494. function getToolAnim(tool)
  495.  
  496. c = tool:children()
  497. for i=1,#c do
  498. if (c[i].Name == "toolanim" and c[i].className == "StringValue") then
  499. return c[i]
  500. end
  501. end
  502. return nil
  503. end
  504.  
  505. function animateTool()
  506.  
  507. if (toolAnim == "None") then
  508. RightShoulder.DesiredAngle = -1.57
  509. return
  510. end
  511.  
  512. if (toolAnim == "Slash") then
  513. RightShoulder.MaxVelocity = 0.5
  514. RightShoulder.DesiredAngle = 0
  515. return
  516. end
  517.  
  518. if (toolAnim == "Lunge") then
  519. RightShoulder.MaxVelocity = 0.5
  520. LeftShoulder.MaxVelocity = 0.5
  521. RightHip.MaxVelocity = 0.5
  522. LeftHip.MaxVelocity = 0.5
  523. RightShoulder.DesiredAngle = -1.57
  524. LeftShoulder.DesiredAngle = 1.0
  525. RightHip.DesiredAngle = 1.57
  526. LeftHip.DesiredAngle = 1.0
  527. return
  528. end
  529. end
  530.  
  531. function move(time)
  532. local amplitude
  533. local frequency
  534.  
  535. if (pose == "Jumping") then
  536. moveJump()
  537. return
  538. end
  539.  
  540. if (pose == "Zombie") then
  541. moveZombie()
  542. return
  543. end
  544.  
  545. if (pose == "Boogy") then
  546. moveBoogy()
  547. return
  548. end
  549.  
  550. if (pose == "Float") then
  551. moveFloat()
  552. return
  553. end
  554.  
  555. if (pose == "Punch") then
  556. movePunch()
  557. return
  558. end
  559.  
  560. if (pose == "Kick") then
  561. moveKick()
  562. return
  563. end
  564.  
  565. if (pose == "Fly") then
  566. moveFly()
  567. return
  568. end
  569.  
  570. if (pose == "FreeFall") then
  571. moveFreeFall()
  572. return
  573. end
  574.  
  575. if (pose == "Climbing") then
  576. moveClimb()
  577. return
  578. end
  579.  
  580. if (pose == "Seated") then
  581. moveSit()
  582. return
  583. end
  584.  
  585. amplitude = 0.1
  586. frequency = 1
  587.  
  588. RightShoulder.MaxVelocity = 0.15
  589. LeftShoulder.MaxVelocity = 0.15
  590. if (pose == "Running") then
  591. amplitude = 1
  592. frequency = 9
  593. elseif (pose == "Dancing") then
  594. amplitude = 2
  595. frequency = 16
  596. end
  597.  
  598.  
  599. desiredAngle = amplitude * math.sin(time*frequency)
  600. if pose~="Dancing" then
  601. RightShoulder.DesiredAngle = -desiredAngle
  602. LeftShoulder.DesiredAngle = desiredAngle
  603. RightHip.DesiredAngle = -desiredAngle
  604. LeftHip.DesiredAngle = -desiredAngle
  605. else
  606. RightShoulder.DesiredAngle = desiredAngle
  607. LeftShoulder.DesiredAngle = desiredAngle
  608. RightHip.DesiredAngle = -desiredAngle
  609. LeftHip.DesiredAngle = -desiredAngle
  610. end
  611.  
  612.  
  613.  
  614. local tool = getTool()
  615.  
  616. if tool ~= nil then
  617.  
  618. animStringValueObject = getToolAnim(tool)
  619.  
  620. if animStringValueObject ~= nil then
  621. toolAnim = animStringValueObject.Value
  622. -- message recieved, delete StringValue
  623. animStringValueObject.Parent = nil
  624. toolAnimTime = time + .3
  625. end
  626.  
  627. if time > toolAnimTime then
  628. toolAnimTime = 0
  629. toolAnim = "None"
  630. end
  631.  
  632. animateTool()
  633.  
  634.  
  635. else
  636. toolAnim = "None"
  637. toolAnimTime = 0
  638. end
  639. end
  640.  
  641.  
  642. -- connect events
  643. -----------------------------------------------------------------------------------------------------------------------
  644.  
  645. function unequip()
  646. local items=script.Parent:children()
  647. for i=1, #items do
  648. if items[i].className=="Tool" then items[i]:remove() end
  649. end
  650. end
  651.  
  652. function onChatted(msg, recipient)
  653. msg = string.lower(msg)
  654.  
  655. if string.match(msg, string.lower(script.Parent.Name))~=nil or string.match(msg, "everyone") then
  656. if string.match(msg, "equip") then
  657. if game.Workspace:findFirstChild("Hub") then
  658. if string.match(msg, "rocket") then unequip()
  659. game.Workspace.Hub.Rocket:clone().Parent=script.Parent
  660. elseif string.match(msg, "slingshot") then unequip()
  661. game.Workspace.Hub.Slingshot:clone().Parent=script.Parent
  662. elseif string.match(msg, "sword") then unequip()
  663. game.Workspace.Hub.Sword:clone().Parent=script.Parent
  664. elseif string.match(msg, "pbg") then unequip()
  665. game.Workspace.Hub.PBG:clone().Parent=script.Parent
  666. elseif string.match(msg, "superball") then unequip()
  667. game.Workspace.Hub.Superball:clone().Parent=script.Parent
  668. elseif string.match(msg, "trowel") then unequip()
  669. game.Workspace.Hub.Trowel:clone().Parent=script.Parent
  670. elseif string.match(msg, "bomb") then unequip()
  671. game.Workspace.Hub.Bomb:clone().Parent=script.Parent
  672. end
  673. end
  674. end
  675. if string.match(msg, "unequip") then unequip() end
  676. if string.match(msg, "run") then onRunning(1) end
  677. if string.match(msg, "climb") then onClimbing() end
  678. if string.match(msg, "jump") then onJumping() end
  679. if string.match(msg, "zombie") then pose="Zombie" end
  680. if string.match(msg, "disco") then pose="Boogy" end
  681. if string.match(msg, "float") then pose="Float" end
  682. if string.match(msg, "punch") then pose="Punch" end
  683. if string.match(msg, "kick") then pose="Kick" end
  684. if string.match(msg, "fly") then pose="Fly" end
  685. if string.match(msg, "heal") then script.Parent.Humanoid.Health=script.Parent.Humanoid.MaxHealth end
  686. if string.match(msg, "defend") then defence() end
  687. if string.match(msg, "stop") then pose="Standing"; proxkill=false; following=false; stopmoving() end
  688. if string.match(msg, "go home") then following=false; gohome() end
  689. if string.match(msg, "follow") then
  690. if string.match(msg, "all") then
  691. followany()
  692. else
  693. local egg=game.Players:children()
  694. for i=1, #egg do
  695. if string.match(msg, string.lower(egg[i].Name)) then
  696. follow(egg[i].Name)
  697. return
  698. end
  699. end
  700. end
  701. end
  702. if string.match(msg, "kill") then
  703. if string.match(msg, "all") then
  704. attackany()
  705. else
  706. local egg=game.Players:children()
  707. for i=1, #egg do
  708. if string.match(msg, string.lower(egg[i].Name)) then
  709. attack(egg[i].Name)
  710. return
  711. end
  712. end
  713. end
  714. end
  715.  
  716. end
  717. end
  718.  
  719. if game.Players.NumPlayers>1 then
  720. x=game.Players:children()
  721.  
  722. for i=1, #x do
  723. if script.Parent:findFirstChild("Commander")~=nil then
  724. if script.Parent.Commander:children()~=nil or script.Parent.Commander:children()>0 then
  725. local ch=script.Parent.Commander:children()
  726. for i=1, #ch do
  727. if string.lower(ch[i].Name)==string.lower(x[i].Name) then
  728. x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
  729. end
  730. end
  731. elseif string.lower(script.Parent.Commander.Value)==string.lower(x[i].Name) then
  732. x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
  733. end
  734. else
  735. x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
  736. end
  737. end
  738. end
  739.  
  740.  
  741. function onPlayerEntered(Player)
  742. while Player.Name==nil do
  743. wait(2)
  744. end
  745. if script.Parent:findFirstChild("Commander")~=nil then
  746. if script.Parent.Commander:children()~=nil or script.Parent.Commander:children()>0 then
  747. local ch=script.Parent.Commander:children()
  748. for i=1, #ch do
  749. if string.lower(ch[i].Name)==string.lower(Player.Name) then
  750. Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
  751. end
  752. end
  753. elseif string.lower(script.Parent.Commander.Value)==string.lower(Player.Name) then
  754. Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
  755. end
  756. else
  757. Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
  758. end
  759. end
  760.  
  761. game.Players.ChildAdded:connect(onPlayerEntered)
  762.  
  763.  
  764.  
  765. -----------------------------------------------------------------------------------------------------------------------
  766. -----------------------------------------------------------------------------------------------------------------------
  767. -----------------------------------------------------------------------------------------------------------------------
  768. -----------------------------------------------------------------------------------------------------------------------
  769. -----------------------------------------------------------------------------------------------------------------------
  770. -----------------------------------------------------------------------------------------------------------------------
  771. -----------------------------------------------------------------------------------------------------------------------
  772. -----------------------------------------------------------------------------------------------------------------------
  773. -----------------------------------------------------------------------------------------------------------------------
  774. -----------------------------------------------------------------------------------------------------------------------
  775. -----------------------------------------------------------------------------------------------------------------------
  776. -----------------------------------------------------------------------------------------------------------------------
  777. dist=20
  778.  
  779. function followany()
  780. following=true
  781. while following==true do
  782.  
  783. local ch=game.Players:children()
  784. for i=1, #ch do
  785. local l=game.Workspace:findFirstChild(ch[i].Name)
  786. if l~=nil then
  787. local s=l.Torso
  788. local p=l.Torso.Position
  789. local q=script.Parent.Torso.Position
  790. local d=math.sqrt( ((p.x-q.x)^2)+((p.y-q.y)^2)+((p.z-q.z)^2) )
  791. if smallest==nil then
  792. smallest=d
  793. target=s
  794. elseif d<smallest then
  795. smallest=d
  796. target=s
  797. end
  798. end
  799. end
  800.  
  801. if smallest==nil then stopmoving() return end
  802.  
  803. if smallest>6*dist then return end
  804.  
  805. script.Parent.Humanoid:MoveTo(target.Position, target)
  806.  
  807. wait(0.5)
  808. for i=1, 6 do
  809. if target.Parent.Humanoid.Health<1 then stopmoving() else wait(0.5) end
  810. end
  811. end
  812. end
  813.  
  814.  
  815.  
  816. function gohome()
  817. script.Parent.Humanoid:MoveTo(Vector3.new(0,0,0), game.Workspace.Bases.Base)
  818. end
  819. function stopmoving()
  820. script.Parent.Humanoid:MoveTo(script.Parent.Torso.Position, script.Parent.Torso)
  821. end
  822.  
  823. function follow(name)
  824. following=true
  825.  
  826. local p=game.Workspace:findFirstChild(name)
  827. if p==nil then return end
  828. while following==true do
  829. script.Parent.Humanoid:MoveTo(p.Torso.Position, p.Torso)
  830. wait(0.5)
  831. for i=1, 3 do
  832. if p.Humanoid.Health<1 then following=false; stopmoving() return end
  833. wait(0.5)
  834. end
  835. end
  836. end
  837.  
  838. function attack(name)
  839. if script.Parent:findFirstChild("Sword")~=nil then
  840. following=true
  841. local p=game.Workspace:findFirstChild(name)
  842. if p==nil then return end
  843. while following==true do
  844. script.Parent.Humanoid:MoveTo(p.Torso.Position, p.Torso)
  845. wait(0.5)
  846. for i=1, 3 do
  847. if p.Humanoid.Health<1 then following=false; stopmoving() return end
  848. local l=p.Torso.Position
  849. local q=script.Parent.Torso.Position
  850. local d=math.sqrt( ((l.x-q.x)^2)+((l.y-q.y)^2)+((l.z-q.z)^2) )
  851. if d<10 then
  852. script.Parent.Humanoid:MoveTo(p.Torso.Position, p.Torso); slash()
  853. if (q.y-l.y)>3 and (q.y-l.y)<7 then
  854. script.Parent.Humanoid:MoveTo(p.Torso.Position+Vector3.new(math.random(-4,4),0,math.random(-4,4)), p.Torso);
  855. end
  856. end
  857. wait(1)
  858. end
  859. end
  860. end
  861. end
  862.  
  863. function attackany()
  864. if script.Parent:findFirstChild("Sword")~=nil then
  865.  
  866. following=true
  867. while following==true do
  868.  
  869. local ch=game.Players:children()
  870. for i=1, #ch do
  871. local l=game.Workspace:findFirstChild(ch[i].Name)
  872. if l~=nil then
  873. local s=l.Torso
  874. local p=l.Torso.Position
  875. local q=script.Parent.Torso.Position
  876. local d=math.sqrt( ((p.x-q.x)^2)+((p.y-q.y)^2)+((p.z-q.z)^2) )
  877. if smallest==nil then
  878. smallest=d
  879. target=s
  880. elseif d<smallest then
  881. smallest=d
  882. target=s
  883. end
  884. end
  885. end
  886.  
  887. if smallest==nil then stopmoving() return end
  888.  
  889. if smallest>6*dist then return end
  890.  
  891. script.Parent.Humanoid:MoveTo(target.Position, target)
  892.  
  893. if smallest<10 then
  894. slash()
  895. end
  896. if target.Parent==nil then stopmoving() return end
  897. wait(0.5)
  898. for i=1, 3 do
  899. if target.Parent.Humanoid.Health<1 then
  900. stopmoving()
  901. else
  902. local p=target.Position
  903. local q=script.Parent.Torso.Position
  904. local d=math.sqrt( ((p.x-q.x)^2)+((p.y-q.y)^2)+((p.z-q.z)^2) )
  905. if d<10 then
  906. script.Parent.Humanoid:MoveTo(target.Position, target); slash()
  907. if (q.y-p.y)>3 and (q.y-p.y)<7 then
  908. script.Parent.Humanoid:MoveTo(p.Torso.Position+Vector3.new(math.random(-4,4),0,math.random(-4,4)), p.Torso);
  909. end
  910. end
  911. wait(1)
  912. end
  913. end
  914. end
  915. end
  916. end
  917.  
  918.  
  919. function patrol()
  920. if points==nil then
  921. points=0
  922. if game.Workspace:findFirstChild("pp1")~=nil then
  923. pp1=game.Workspace:findFirstChild("pp1")
  924. local points=points+1
  925. if game.Workspace:findFirstChild("pp2")~=nil then
  926. pp2=game.Workspace:findFirstChild("pp2")
  927. local points=points+1
  928. if game.Workspace:findFirstChild("pp3")~=nil then
  929. pp3=game.Workspace:findFirstChild("pp3")
  930. local points=points+1
  931. if game.Workspace:findFirstChild("pp4")~=nil then
  932. pp4=game.Workspace:findFirstChild("pp4")
  933. local points=points+1
  934. if game.Workspace:findFirstChild("pp5")~=nil then
  935. pp5=game.Workspace:findFirstChild("pp5")
  936. local points=points+1
  937. if game.Workspace:findFirstChild("pp6")~=nil then
  938. pp6=game.Workspace:findFirstChild("pp6")
  939. local points=points+1
  940. if game.Workspace:findFirstChild("pp7")~=nil then
  941. pp7=game.Workspace:findFirstChild("pp7")
  942. local points=points+1
  943. if game.Workspace:findFirstChild("pp8")~=nil then
  944. pp8=game.Workspace:findFirstChild("pp8")
  945. local points=points+1
  946. if game.Workspace:findFirstChild("pp9")~=nil then
  947. pp9=game.Workspace:findFirstChild("pp9")
  948. local points=points+1
  949. end
  950. end
  951. end
  952. end
  953. end
  954. end
  955. end
  956. end
  957. end
  958. end
  959.  
  960. if points<1 then return end
  961. patrolling=true
  962. local time=2
  963. if points==1 then return end
  964. if points>1 then
  965. while patrolling==true do
  966. script.Parent.Humanoid:MoveTo(pp1.Position, pp1)
  967. wait(time)
  968. script.Parent.Humanoid:MoveTo(pp2.Position, pp2)
  969. wait(time)
  970. if points>2 then
  971. script.Parent.Humanoid:MoveTo(pp3.Position, pp3)
  972. wait(time)
  973. if points>3 then
  974. script.Parent.Humanoid:MoveTo(pp4.Position, pp4)
  975. wait(time)
  976. if points>4 then
  977. script.Parent.Humanoid:MoveTo(pp5.Position, pp5)
  978. wait(time)
  979. if points>5 then
  980. script.Parent.Humanoid:MoveTo(pp6.Position, pp6)
  981. wait(time)
  982. if points>6 then
  983. script.Parent.Humanoid:MoveTo(pp7.Position, pp7)
  984. wait(time)
  985. if points>7 then
  986. script.Parent.Humanoid:MoveTo(pp8.Position, pp8)
  987. wait(time)
  988. if points>8 then
  989. script.Parent.Humanoid:MoveTo(pp9.Position, pp9)
  990. wait(time)
  991. end
  992. end
  993. end
  994. end
  995. end
  996. end
  997. end
  998. end
  999. end
  1000. end
  1001.  
  1002.  
  1003. function goto(pos,part)
  1004. while true do
  1005. end
  1006. end
  1007.  
  1008.  
  1009. function slash()
  1010. for i=1, 3 do
  1011. wait(.3)
  1012. RightShoulder.MaxVelocity = 2
  1013. LeftShoulder.MaxVelocity = 1
  1014. RightShoulder.DesiredAngle = -2.14
  1015. LeftShoulder.DesiredAngle = 0
  1016. RightHip.DesiredAngle = 0
  1017. LeftHip.DesiredAngle = 0
  1018. wait(.2)
  1019. RightShoulder.MaxVelocity = 2
  1020. LeftShoulder.MaxVelocity = 1
  1021. RightShoulder.DesiredAngle = 0
  1022. LeftShoulder.DesiredAngle = 0
  1023. RightHip.DesiredAngle = 0
  1024. LeftHip.DesiredAngle = 0
  1025. end
  1026. end
  1027.  
  1028. function defence()
  1029. proxkill=true
  1030. while proxkill==true do
  1031. local ch=game.Players:children()
  1032. for i=1, #ch do
  1033. local p=game.Workspace:findFirstChild(ch[i].Name)
  1034. if p~=nil then
  1035. local p=p.Torso.Position
  1036. local q=script.Parent.Torso.Position
  1037. local d=math.sqrt( ((p.x-q.x)^2)+((p.y-q.y)^2)+((p.z-q.z)^2) )
  1038. if d<dist and d>8 then
  1039. local ex=Instance.new("Explosion")
  1040. ex.Position=p
  1041. ex.Parent=game.Workspace
  1042. end
  1043. end
  1044. end
  1045. wait(1)
  1046. end
  1047. end
  1048.  
  1049.  
  1050.  
  1051.  
  1052. -----------------------------------------------------------------------------------------------------------------------
  1053. -----------------------------------------------------------------------------------------------------------------------
  1054. -----------------------------------------------------------------------------------------------------------------------
  1055. -----------------------------------------------------------------------------------------------------------------------
  1056. -----------------------------------------------------------------------------------------------------------------------
  1057. -----------------------------------------------------------------------------------------------------------------------
  1058. -----------------------------------------------------------------------------------------------------------------------
  1059. -----------------------------------------------------------------------------------------------------------------------
  1060. -----------------------------------------------------------------------------------------------------------------------
  1061. -----------------------------------------------------------------------------------------------------------------------
  1062. -----------------------------------------------------------------------------------------------------------------------
  1063. -----------------------------------------------------------------------------------------------------------------------
  1064.  
  1065.  
  1066. Humanoid.Died:connect(onDied)
  1067. Humanoid.Running:connect(onRunning)
  1068. Humanoid.Jumping:connect(onJumping)
  1069. Humanoid.Climbing:connect(onClimbing)
  1070. Humanoid.GettingUp:connect(onGettingUp)
  1071. Humanoid.FreeFalling:connect(onFreeFall)
  1072. Humanoid.FallingDown:connect(onFallingDown)
  1073. Humanoid.Seated:connect(onSeated)
  1074.  
  1075.  
  1076. --[[
  1077.  
  1078. function newSound(id)
  1079. local sound = Instance.new("Sound")
  1080. sound.SoundId = id
  1081. sound.Parent = script.Parent.Head
  1082. return sound
  1083. end
  1084.  
  1085.  
  1086. local sDied = newSound("rbxasset://sounds/uuhhh.wav")
  1087. local sFallingDown = newSound("rbxasset://sounds/splat.wav")
  1088. local sFreeFalling = newSound("rbxasset://sounds/swoosh.wav")
  1089. local sGettingUp = newSound("rbxasset://sounds/hit.wav")
  1090. local sJumping = newSound("rbxasset://sounds/button.wav")
  1091. local sRunning = newSound("rbxasset://sounds/bfsl-minifigfoots1.mp3")
  1092. sRunning.Looped = true
  1093.  
  1094. local Figure = script.Parent
  1095. local Head = waitForChild(Figure, "Head")
  1096. local Humanoid = waitForChild(Figure, "Humanoid")
  1097.  
  1098.  
  1099. function onDied()
  1100. sDied:play()
  1101. end
  1102.  
  1103. function onState(state, sound)
  1104. if state then
  1105. sound:play()
  1106. else
  1107. sound:pause()
  1108. end
  1109. end
  1110.  
  1111. function onRunning(speed)
  1112. if speed>0 then
  1113. sRunning:play()
  1114. else
  1115. sRunning:pause()
  1116. end
  1117. end
  1118.  
  1119.  
  1120. Humanoid.Died:connect(onDied)
  1121. Humanoid.Running:connect(onRunning)
  1122. Humanoid.Jumping:connect(function(state) onState(state, sJumping) end)
  1123. Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end)
  1124. Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end)
  1125. Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end)
  1126. --]]
  1127.  
  1128. local nextTime = 0
  1129. local runService = game:service("RunService");
  1130.  
  1131. while Figure.Parent~=nil do
  1132. time = runService.Stepped:wait()
  1133. if time > nextTime then
  1134. move(time)
  1135. nextTime = time + 0.1
  1136. end
  1137. end
  1138.  
  1139. end,o22)
  1140.  
  1141. o23.Name = "RegenScript"
  1142. o23.Parent = o3
  1143.  
  1144. runDummyScript(function()
  1145. model = game.Workspace.Train --Replace this with ur model name.
  1146. messageText = "Regenerating Train."
  1147.  
  1148. message = Instance.new("Message")
  1149. message.Text = messageText
  1150. backup = model:clone()
  1151.  
  1152. while true do
  1153. wait(100) -- regenerate this model every 180 seconds,u can also change how long till it regenerates.
  1154.  
  1155. message.Parent = game.Workspace
  1156. model:remove()
  1157.  
  1158. wait(4) -- display regen message for 2 seconds,this is how long the message will be there.
  1159.  
  1160. model = backup:clone()
  1161. model.Parent = game.Workspace
  1162. model:makeJoints()
  1163. message.Parent = nil
  1164. end
  1165.  
  1166.  
  1167. end,o23)
  1168.  
  1169. o24.Name = "RegenScript"
  1170. o24.Parent = o3
  1171.  
  1172. runDummyScript(function()
  1173. ---Place this INSIDE the model. Don't replace the model name or anything.
  1174. ------------------------------------------------------------------------------------------
  1175. object = script.Parent
  1176. if (object ~= nil) and (object ~= game.Workspace) then
  1177. model = object
  1178. messageText = "Placing this thing back..." .. model.Name .. ""
  1179.  
  1180. message = Instance.new("zombies r back")
  1181. message.Text = messageText
  1182. backup = model:clone() -- Make the backup
  1183. waitTime = 10 --Time to wait between regenerations
  1184. wait(math.random(0, waitTime))
  1185. while true do
  1186. wait(waitTime) -- Regen wait time
  1187.  
  1188. message.Parent = game.Workspace
  1189. model:remove()
  1190.  
  1191. wait(2.0) -- Display regen message for this amount of time
  1192.  
  1193. model = backup:clone()
  1194. model.Parent = game.Workspace
  1195. model:makeJoints()
  1196. message.Parent = nil
  1197. end
  1198. end
  1199. ------------------------------------------------------------------------------------------
  1200.  
  1201. end,o24)
  1202.  
  1203. o25.Name = "README"
  1204. o25.Parent = o3
  1205. o25.Disabled = true
  1206.  
  1207. runDummyScript(function()
  1208. --[[
  1209.  
  1210. ROBOTS v1
  1211.  
  1212. User Manual
  1213.  
  1214. ---------------------------------------------------------------------
  1215. Before you start:
  1216. 1. If you want to let the robot use weapons then get the Robot Weapon Hub from the toolbox.
  1217. 2. Look at the list of names in commander. Change these names to change who can command
  1218. your robot. Delete "Commander" if you want everyone to be able to control it.
  1219. 3. Delete the robot spawn pad if you dont want the robot to come back when dead.
  1220.  
  1221.  
  1222. The robot is only half done, I was going to add the ability to fire rockets, patrol set points, kill
  1223. one team only and so on. I got fed up of making stuff for it, and Im only releasing it now as
  1224. so many people have patiently been waiting for it. Its likely Ill update it in the future.
  1225.  
  1226.  
  1227. HOW TO USE IT:
  1228. It listens to what you type (if you are one of the people it is listening to)
  1229. Change the name of the robot to whatever you want, and it will do what you say when you say its name.
  1230.  
  1231. Commands:
  1232.  
  1233. {Zombue} dance
  1234. go home
  1235. run
  1236. climb
  1237. jump
  1238. zombie
  1239. disco
  1240. float
  1241. punch
  1242. kick
  1243. fly
  1244.  
  1245. heal
  1246. defend
  1247.  
  1248. stop
  1249.  
  1250. follow {rebel234}
  1251. follow all
  1252. kill {rebel234}
  1253. kill all
  1254.  
  1255.  
  1256. equip sword
  1257. rocket
  1258. slingshot
  1259. pbg
  1260. superball
  1261. trowel
  1262. bomb
  1263.  
  1264. unequip
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271. e.g.:
  1272. Yellow kill miked
  1273.  
  1274.  
  1275.  
  1276. Also you can type it however you like, just include the keywords:
  1277. e.g.:
  1278. Yellow my best friend in the world, can you do me a favour and kill that miked guy?
  1279.  
  1280.  
  1281.  
  1282. Its not case sensitive too:
  1283. e.g.:
  1284. YelLOW KiLl MiKeD
  1285.  
  1286.  
  1287.  
  1288.  
  1289. Also if you have lots of robots do this to get al their attention:
  1290.  
  1291. Everyone kill miked
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306. --]]
  1307.  
  1308.  
  1309.  
  1310. end,o25)
  1311.  
  1312. o26.Name = "Mode"
  1313. o26.Parent = o3
  1314. o27.Name = "README"
  1315. o27.Parent = o3
  1316.  
  1317. runDummyScript(function()
  1318. --To change the trees hp, adjust the value in "hit". Also look in the axe-tools script to adjust how much damage
  1319. --the axe deals, and how much money is awarded per tree.
  1320. end,o27)
  1321.  
  1322. o28.Name = "FellCheck"
  1323. o28.Parent = o3
  1324.  
  1325. runDummyScript(function()
  1326. hits = script.Parent.hit --This keeps track of how much "hp" the tree has left
  1327. local newtree = script.Parent:clone() --for inserting a new tree later
  1328.  
  1329. while true do --infinite loop
  1330. if hits.Value < 1 then --if the tree has less than 1 "hp" then
  1331. script.Parent:BreakJoints() --make tree able to fall over.
  1332. wait(3) --wait a while
  1333. script.Parent:remove() --remove the tree
  1334. wait(10) --wait a while
  1335. newtree.Parent = game.Workspace --insert a new tree
  1336. newtree:MakeJoints() --make tree unable to fall over
  1337. end
  1338. wait(1) --wait a while before checking trees hp again
  1339. end
  1340.  
  1341. end,o28)
  1342.  
  1343. o29.Name = "Timber"
  1344. o29.Parent = o3
  1345. o30.Name = "hit"
  1346. o30.Parent = o3
  1347. o30.Value = 5
  1348. o31.Name = "Handle"
  1349. o31.Parent = o3
  1350. o31.Position = Vector3.new(-138.399323, 172.419266, -159.035858)
  1351. o31.Rotation = Vector3.new(-175.48999, 0.00999999978, 89.9499969)
  1352. o31.Velocity = Vector3.new(0, -1, 0)
  1353. o31.CanCollide = false
  1354. o31.FormFactor = Enum.FormFactor.Plate
  1355. o31.Size = Vector3.new(2, 0.800000012, 2)
  1356. o31.CFrame = CFrame.new(-138.399323, 172.419266, -159.035858, 0.000787885918, -0.999999583, 0.000193497792, -0.99690944, -0.000770251092, 0.078554526, -0.0785543323, -0.000254791841, -0.996909797)
  1357. o31.BottomSurface = Enum.SurfaceType.Smooth
  1358. o31.FrontSurface = Enum.SurfaceType.Weld
  1359. o31.TopSurface = Enum.SurfaceType.Smooth
  1360. o31.Position = Vector3.new(-138.399323, 172.419266, -159.035858)
  1361. o31.velocity = Vector3.new(0, -1, 0)
  1362. o32.Parent = o31
  1363. o32.SoundId = "rbxasset://sounds/swordslash.wav"
  1364. o32.Volume = 0.69999998807907
  1365. o33.Parent = o31
  1366. o33.SoundId = "rbxasset://sounds/swordlunge.wav"
  1367. o33.Volume = 0.60000002384186
  1368. o34.Parent = o31
  1369. o34.SoundId = "rbxasset://sounds/unsheath.wav"
  1370. o34.Volume = 1
  1371. o35.Parent = o31
  1372. o35.SoundId = "rbxasset://sounds/swordslash.wav"
  1373. o35.Volume = 0.69999998807907
  1374. o36.Parent = o31
  1375. o36.SoundId = "rbxasset://sounds/swordlunge.wav"
  1376. o36.Volume = 0.60000002384186
  1377. o37.Parent = o31
  1378. o37.SoundId = "rbxasset://sounds/unsheath.wav"
  1379. o37.Volume = 1
  1380. o38.Parent = o31
  1381. o38.MeshId = "rbxasset://fonts/sword.mesh"
  1382. o38.TextureId = "rbxasset://textures/SwordTexture.png"
  1383. o38.MeshType = Enum.MeshType.FileMesh
  1384. mas.Parent = workspace
  1385. mas:MakeJoints()
  1386. local mas1 = mas:GetChildren()
  1387. for i=1,#mas1 do
  1388. mas1[i].Parent = workspace
  1389. ypcall(function() mas1[i]:MakeJoints() end)
  1390. end
  1391. mas:Destroy()
  1392. for i=1,#cors do
  1393. coroutine.resume(cors[i])
  1394. end
  1395. mess_handle.Text = "Resetting"
  1396. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  1397. v:LoadCharacter()
  1398. end
  1399. wait(1)
  1400. mess_handle:Remove()
  1401.  
  1402. game:GetService("Lighting").Ambient = Color3.new(0, 0, 0)
  1403. game:GetService("Lighting").Brightness = 1
  1404. game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
  1405. game:GetService("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
  1406. game:GetService("Lighting").GlobalShadows = true
  1407. game:GetService("Lighting").OutdoorAmbient = Color3.new(0.5, 0.5, 0.5)
  1408. game:GetService("Lighting").Outlines = false
  1409. game:GetService("Lighting").GeographicLatitude = 41.733299255371
  1410. game:GetService("Lighting").TimeOfDay = "14:00:00"
  1411. game:GetService("Lighting").FogColor = Color3.new(0.75, 0.75, 0.75)
  1412. game:GetService("Lighting").FogEnd = 100000
  1413. game:GetService("Lighting").FogStart = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement