Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Created with ttyyuu12345's compiler
- --Errors:
- Create = function(itemClass,tabl)
- local item = Instance.new(itemClass)
- for i,v in pairs(tabl) do
- local a,b = ypcall(function() return item[i] end)
- if a then
- item[i] = tabl[i]
- end
- end
- return item
- end
- function runDummyScript(f,scri)
- local oldenv = getfenv(f)
- local newenv = setmetatable({}, {
- __index = function(_, k)
- if k:lower() == 'script' then
- return scri
- else
- return oldenv[k]
- end
- end
- })
- setfenv(f, newenv)
- ypcall(function() f() end)
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "CompiledModel"
- o1 = Create("Model",{
- ["Parent"] = mas,
- ["PrimaryPart"] = o168,
- })
- o2 = Create("Model",{
- ["Name"] = "Zombie",
- ["Parent"] = o1,
- ["PrimaryPart"] = o6,
- })
- o3 = Create("BodyColors",{
- ["Parent"] = o2,
- ["HeadColor"] = BrickColor.new("Bright yellow"),
- ["LeftArmColor"] = BrickColor.new("Medium stone grey"),
- ["LeftLegColor"] = BrickColor.new("Brick yellow"),
- ["RightArmColor"] = BrickColor.new("Medium stone grey"),
- ["RightLegColor"] = BrickColor.new("Brick yellow"),
- ["TorsoColor"] = BrickColor.new("Bright red"),
- })
- o4 = Create("IntValue",{
- ["Name"] = "Mode",
- ["Parent"] = o2,
- })
- o5 = Create("Part",{
- ["Name"] = "Right Arm",
- ["Parent"] = o2,
- ["BrickColor"] = BrickColor.new("Medium green"),
- ["Position"] = Vector3.new(-8.10000038, 4.4704051, -11.6999998),
- ["Rotation"] = Vector3.new(180, -0, -180),
- ["RotVelocity"] = Vector3.new(7.44785669e-025, 3.67559805e-022, 7.28629797e-025),
- ["Velocity"] = Vector3.new(3.64904782e-020, -0.00107575336, 3.7031548e-020),
- ["CFrame"] = CFrame.new(-8.10000038, 4.4704051, -11.6999998, -1, 0, -0, -0, 1, -0, -0, 0, -1),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Size"] = Vector3.new(1, 2, 1),
- ["Color"] = Color3.new(0.631373, 0.768628, 0.54902),
- })
- o6 = Create("Part",{
- ["Name"] = "Head",
- ["Parent"] = o2,
- ["BrickColor"] = BrickColor.new("Medium green"),
- ["Position"] = Vector3.new(-6.5999999, 5.96738625, -11.6182976),
- ["Rotation"] = Vector3.new(-175.307953, 6.34260746e-026, 180),
- ["CFrame"] = CFrame.new(-6.5999999, 5.96738625, -11.6182976, -1, -9.08568706e-029, 1.10699381e-027, 6.01853108e-036, 0.996648669, 0.0818002522, 2.22143231e-027, 0.0818002522, -0.996648669),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Size"] = Vector3.new(2, 1, 1),
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.631373, 0.768628, 0.54902),
- })
- o7 = Create("SpecialMesh",{
- ["Parent"] = o6,
- ["Scale"] = Vector3.new(1.25, 1.25, 1.25),
- })
- o8 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o9 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o10 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o11 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o12 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o13 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o14 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o15 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o16 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o17 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o18 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o19 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o20 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o21 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o22 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o23 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o24 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o25 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o26 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o27 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o28 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o29 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o30 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o31 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o32 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o33 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o34 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o35 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o36 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o37 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o38 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o39 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o40 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o41 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o42 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o43 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o44 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o45 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o46 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o47 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o48 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o49 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o50 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o51 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o52 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o53 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o54 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o55 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o56 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o57 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o58 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o59 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o60 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o61 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o62 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o63 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o64 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o65 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o66 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o67 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o68 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o69 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o70 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o71 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o72 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o73 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o74 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o75 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o76 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o77 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o78 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o79 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o80 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o81 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o82 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o83 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o84 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o85 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o86 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o87 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o88 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o89 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o90 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o91 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o92 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o93 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o94 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o95 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o96 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o97 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o98 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o99 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o100 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o101 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o102 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o103 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o104 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o105 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o106 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o107 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o108 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o109 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o110 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o111 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o112 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o113 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o114 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o115 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o116 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o117 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o118 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o119 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o120 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o121 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o122 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o123 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o124 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o125 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o126 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o127 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o128 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o129 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o130 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o131 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o132 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o133 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o134 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o135 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o136 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o137 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o138 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o139 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o140 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o141 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o142 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o143 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o144 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o145 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o146 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/uuhhh.wav",
- })
- o147 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/splat.wav",
- })
- o148 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/swoosh.wav",
- })
- o149 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/hit.wav",
- })
- o150 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/button.wav",
- })
- o151 = Create("Sound",{
- ["Parent"] = o6,
- ["SoundId"] = "rbxasset://sounds/bfsl-minifigfoots1.mp3",
- ["Looped"] = true,
- })
- o152 = Create("Part",{
- ["Name"] = "Left Leg",
- ["Parent"] = o2,
- ["BrickColor"] = BrickColor.new("Reddish brown"),
- ["Position"] = Vector3.new(-6.0999999, 2.47911358, -11.9046011),
- ["Rotation"] = Vector3.new(-175.307953, 1.26414217e-039, -180),
- ["CFrame"] = CFrame.new(-6.0999999, 2.47911358, -11.9046011, -1, 0, 2.20634443e-041, 0, 0.996648729, 0.0818002596, 1.11071615e-027, 0.0818002596, -0.996648729),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Size"] = Vector3.new(1, 2, 1),
- ["BottomSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.411765, 0.25098, 0.156863),
- })
- o153 = Create("Part",{
- ["Name"] = "Right Leg",
- ["Parent"] = o2,
- ["BrickColor"] = BrickColor.new("Reddish brown"),
- ["Position"] = Vector3.new(-7.0999999, 2.47911358, -11.9046011),
- ["Rotation"] = Vector3.new(-175.307953, 1.26414217e-039, -180),
- ["CFrame"] = CFrame.new(-7.0999999, 2.47911358, -11.9046011, -1, 0, 2.20634443e-041, 0, 0.996648729, 0.0818002596, 1.11071615e-027, 0.0818002596, -0.996648729),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Size"] = Vector3.new(1, 2, 1),
- ["BottomSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.411765, 0.25098, 0.156863),
- })
- o154 = Create("Humanoid",{
- ["Name"] = "Zombie",
- ["Parent"] = o2,
- ["RightLeg"] = o153,
- ["LeftLeg"] = o152,
- ["Torso"] = o159,
- })
- o155 = Create("Part",{
- ["Name"] = "Left Arm",
- ["Parent"] = o2,
- ["BrickColor"] = BrickColor.new("Medium green"),
- ["Position"] = Vector3.new(-5.0999999, 4.47241116, -11.7410002),
- ["Rotation"] = Vector3.new(-175.307953, 1.26414217e-039, -180),
- ["CFrame"] = CFrame.new(-5.0999999, 4.47241116, -11.7410002, -1, 0, 2.20634443e-041, 0, 0.996648729, 0.0818002596, 1.11071615e-027, 0.0818002596, -0.996648729),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Size"] = Vector3.new(1, 2, 1),
- ["Color"] = Color3.new(0.631373, 0.768628, 0.54902),
- })
- o156 = Create("Script",{
- ["Name"] = "README",
- ["Parent"] = o2,
- ["Disabled"] = true,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- ROBOTS v1
- User Manual
- ---------------------------------------------------------------------
- Before you start:
- 1. If you want to let the robot use weapons then get the Robot Weapon Hub from the toolbox.
- 2. Look at the list of names in commander. Change these names to change who can command
- your robot. Delete "Commander" if you want everyone to be able to control it.
- 3. Delete the robot spawn pad if you dont want the robot to come back when dead.
- The robot is only half done, I was going to add the ability to fire rockets, patrol set points, kill
- one team only and so on. I got fed up of making stuff for it, and Im only releasing it now as
- so many people have patiently been waiting for it. Its likely Ill update it in the future.
- HOW TO USE IT:
- It listens to what you type (if you are one of the people it is listening to)
- Change the name of the robot to whatever you want, and it will do what you say when you say its name.
- Commands:
- {Robot Name} dance
- go home
- run
- climb
- jump
- zombie
- disco
- float
- punch
- kick
- fly
- heal
- defend
- stop
- follow {Player Name}
- follow all
- kill {Player Name}
- kill all
- equip sword
- rocket
- slingshot
- pbg
- superball
- trowel
- bomb
- unequip
- e.g.:
- Yellow kill miked
- Also you can type it however you like, just include the keywords:
- e.g.:
- Yellow my best friend in the world, can you do me a favour and kill that miked guy?
- Its not case sensitive too:
- e.g.:
- YelLOW KiLl MiKeD
- Also if you have lots of robots do this to get al their attention:
- Everyone kill miked
- --]]
- end,o156)
- end))
- o157 = Create("Script",{
- ["Parent"] = o2,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 1000
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- function Hit(hit)
- local human = hit.Parent:FindFirstChild("Humanoid")
- if human ~= nil then
- human.Health = human.Health -8
- end
- end
- larm.Touched:connect(Hit)
- rarm.Touched:connect(Hit)
- while true do
- wait(0.1)
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- script.Parent.Zombie:MoveTo(target.Position, target)
- end
- end
- end,o157)
- end))
- o158 = Create("Script",{
- ["Name"] = "Robot",
- ["Parent"] = o2,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- model = script.Parent
- backup = model:Clone()
- regentime = 1 --5 minutes
- ------------------
- --SPAWNING--
- ------------------
- miked=script.Parent
- itlh=miked.Torso:findFirstChild("Left Hip")
- itlh.Part0=miked.Torso
- itlh.Part1=miked:findFirstChild("Left Leg")
- itlh.C0=CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itrh=miked.Torso:findFirstChild("Right Hip")
- itrh.Part0=miked.Torso
- itrh.Part1=miked:findFirstChild("Right Leg")
- itrh.C0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itls=miked.Torso:findFirstChild("Left Shoulder")
- itls.Part1=miked.Torso
- itls.C0=CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itls.Part0=miked:findFirstChild("Left Arm")
- itrs=miked.Torso:findFirstChild("Right Shoulder")
- itrs.Part1=miked.Torso
- itrs.C0=CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itrs.Part0=miked:findFirstChild("Right Arm")
- miked.Head:makeJoints()
- ------------------
- ------------------
- function waitForChild(parent, childName)
- while true do
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- parent.ChildAdded:wait()
- end
- end
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid = waitForChild(Figure, "Zombie")
- local pose = "Standing"
- local toolAnim = "None"
- local toolAnimTime = 0
- local isSeated = false
- function onRunning(speed)
- if isSeated then return end
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- wait(regentime)
- wait(1)
- model:remove()
- model = backup:Clone()
- wait(3)
- model.Parent = game.Workspace
- model:MakeJoints()
- end
- function onJumping()
- isSeated = false
- pose = "Jumping"
- end
- function onClimbing()
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- pose = "FreeFall"
- end
- function onDancing()
- pose = "Dancing"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- isSeated = true
- pose = "Seated"
- end
- function moveJump()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = -3.14
- LeftShoulder.DesiredAngle = -3.14
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- function moveFreeFall()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = -1
- LeftShoulder.DesiredAngle = -1
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- function moveFloat()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = -1.57
- LeftShoulder.DesiredAngle = 1.57
- RightHip.DesiredAngle = 1.57
- LeftHip.DesiredAngle = -1.57
- end
- function moveBoogy()
- while pose=="Boogy" do
- wait(.5)
- RightShoulder.MaxVelocity = 1
- LeftShoulder.MaxVelocity = 1
- RightShoulder.DesiredAngle = -3.14
- LeftShoulder.DesiredAngle = 0
- RightHip.DesiredAngle = 1.57
- LeftHip.DesiredAngle = 0
- wait(.5)
- RightShoulder.MaxVelocity = 1
- LeftShoulder.MaxVelocity = 1
- RightShoulder.DesiredAngle = 0
- LeftShoulder.DesiredAngle = -3.14
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 1.57
- end
- end
- function moveZombie()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = -1.57
- LeftShoulder.DesiredAngle = 1.57
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- function movePunch()
- script.Parent.Torso.Anchored=true
- RightShoulder.MaxVelocity = 60
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = -1.57
- LeftShoulder.DesiredAngle = 0
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- wait(1)
- script.Parent.Torso.Anchored=false
- pose="Standing"
- end
- function moveKick()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 0
- LeftShoulder.DesiredAngle = 0
- RightHip.MaxVelocity = 40
- RightHip.DesiredAngle = 1.57
- LeftHip.DesiredAngle = 0
- wait(1)
- pose="Standing"
- end
- function moveFly()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 0
- LeftShoulder.DesiredAngle = 0
- RightHip.MaxVelocity = 40
- RightHip.DesiredAngle = 1.57
- LeftHip.DesiredAngle = 0
- wait(1)
- pose="Standing"
- end
- function moveClimb()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = -3.14
- LeftShoulder.DesiredAngle = 3.14
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder.DesiredAngle = -3.14 /2
- LeftShoulder.DesiredAngle = -3.14 /2
- RightHip.DesiredAngle = 3.14 /2
- LeftHip.DesiredAngle = -3.14 /2
- end
- function getTool()
- kidTable = Figure:children()
- if (kidTable ~= nil) then
- numKids = #kidTable
- for i=1,numKids do
- if (kidTable[i].className == "Tool") then return kidTable[i] end
- end
- end
- return nil
- end
- function getToolAnim(tool)
- c = tool:children()
- for i=1,#c do
- if (c[i].Name == "toolanim" and c[i].className == "StringValue") then
- return c[i]
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- RightShoulder.DesiredAngle = -1.57
- return
- end
- if (toolAnim == "Slash") then
- RightShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 0
- return
- end
- if (toolAnim == "Lunge") then
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightHip.MaxVelocity = 0.5
- LeftHip.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = -1.57
- LeftShoulder.DesiredAngle = 1.0
- RightHip.DesiredAngle = 1.57
- LeftHip.DesiredAngle = 1.0
- return
- end
- end
- function move(time)
- local amplitude
- local frequency
- if (pose == "Jumping") then
- moveJump()
- return
- end
- if (pose == "Zombie") then
- moveZombie()
- return
- end
- if (pose == "Boogy") then
- moveBoogy()
- return
- end
- if (pose == "Float") then
- moveFloat()
- return
- end
- if (pose == "Punch") then
- movePunch()
- return
- end
- if (pose == "Kick") then
- moveKick()
- return
- end
- if (pose == "Fly") then
- moveFly()
- return
- end
- if (pose == "FreeFall") then
- moveFreeFall()
- return
- end
- if (pose == "Climbing") then
- moveClimb()
- return
- end
- if (pose == "Seated") then
- moveSit()
- return
- end
- amplitude = 0.1
- frequency = 1
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- if (pose == "Running") then
- amplitude = 1
- frequency = 9
- elseif (pose == "Dancing") then
- amplitude = 2
- frequency = 16
- end
- desiredAngle = amplitude * math.sin(time*frequency)
- if pose~="Dancing" then
- RightShoulder.DesiredAngle = -desiredAngle
- LeftShoulder.DesiredAngle = desiredAngle
- RightHip.DesiredAngle = -desiredAngle
- LeftHip.DesiredAngle = -desiredAngle
- else
- RightShoulder.DesiredAngle = desiredAngle
- LeftShoulder.DesiredAngle = desiredAngle
- RightHip.DesiredAngle = -desiredAngle
- LeftHip.DesiredAngle = -desiredAngle
- end
- local tool = getTool()
- if tool ~= nil then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject ~= nil then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- toolAnim = "None"
- toolAnimTime = 0
- end
- end
- -- connect events
- -----------------------------------------------------------------------------------------------------------------------
- function unequip()
- local items=script.Parent:children()
- for i=1, #items do
- if items[i].className=="Tool" then items[i]:remove() end
- end
- end
- function onChatted(msg, recipient)
- msg = string.lower(msg)
- if string.match(msg, string.lower(script.Parent.Name))~=nil or string.match(msg, "everyone") then
- if string.match(msg, "equip") then
- if game.Workspace:findFirstChild("Hub") then
- if string.match(msg, "rocket") then unequip()
- game.Workspace.Hub.Rocket:clone().Parent=script.Parent
- elseif string.match(msg, "slingshot") then unequip()
- game.Workspace.Hub.Slingshot:clone().Parent=script.Parent
- elseif string.match(msg, "sword") then unequip()
- game.Workspace.Hub.Sword:clone().Parent=script.Parent
- elseif string.match(msg, "pbg") then unequip()
- game.Workspace.Hub.PBG:clone().Parent=script.Parent
- elseif string.match(msg, "superball") then unequip()
- game.Workspace.Hub.Superball:clone().Parent=script.Parent
- elseif string.match(msg, "trowel") then unequip()
- game.Workspace.Hub.Trowel:clone().Parent=script.Parent
- elseif string.match(msg, "bomb") then unequip()
- game.Workspace.Hub.Bomb:clone().Parent=script.Parent
- end
- end
- end
- if string.match(msg, "unequip") then unequip() end
- if string.match(msg, "run") then onRunning(1) end
- if string.match(msg, "climb") then onClimbing() end
- if string.match(msg, "jump") then onJumping() end
- if string.match(msg, "zombie") then pose="Zombie" end
- if string.match(msg, "disco") then pose="Boogy" end
- if string.match(msg, "float") then pose="Float" end
- if string.match(msg, "punch") then pose="Punch" end
- if string.match(msg, "kick") then pose="Kick" end
- if string.match(msg, "fly") then pose="Fly" end
- if string.match(msg, "heal") then script.Parent.Humanoid.Health=script.Parent.Humanoid.MaxHealth end
- if string.match(msg, "defend") then defence() end
- if string.match(msg, "stop") then pose="Standing"; proxkill=false; following=false; stopmoving() end
- if string.match(msg, "go home") then following=false; gohome() end
- if string.match(msg, "follow") then
- if string.match(msg, "all") then
- followany()
- else
- local egg=game.Players:children()
- for i=1, #egg do
- if string.match(msg, string.lower(egg[i].Name)) then
- follow(egg[i].Name)
- return
- end
- end
- end
- end
- if string.match(msg, "kill") then
- if string.match(msg, "all") then
- attackany()
- else
- local egg=game.Players:children()
- for i=1, #egg do
- if string.match(msg, string.lower(egg[i].Name)) then
- attack(egg[i].Name)
- return
- end
- end
- end
- end
- end
- end
- if game.Players.NumPlayers>1 then
- x=game.Players:children()
- for i=1, #x do
- if script.Parent:findFirstChild("Commander")~=nil then
- if script.Parent.Commander:children()~=nil or script.Parent.Commander:children()>0 then
- local ch=script.Parent.Commander:children()
- for i=1, #ch do
- if string.lower(ch[i].Name)==string.lower(x[i].Name) then
- x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
- end
- end
- elseif string.lower(script.Parent.Commander.Value)==string.lower(x[i].Name) then
- x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
- end
- else
- x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
- end
- end
- end
- function onPlayerEntered(Player)
- while Player.Name==nil do
- wait(2)
- end
- if script.Parent:findFirstChild("Commander")~=nil then
- if script.Parent.Commander:children()~=nil or script.Parent.Commander:children()>0 then
- local ch=script.Parent.Commander:children()
- for i=1, #ch do
- if string.lower(ch[i].Name)==string.lower(Player.Name) then
- Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
- end
- end
- elseif string.lower(script.Parent.Commander.Value)==string.lower(Player.Name) then
- Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
- end
- else
- Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
- end
- end
- game.Players.ChildAdded:connect(onPlayerEntered)
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- dist=20
- function followany()
- following=true
- while following==true do
- local ch=game.Players:children()
- for i=1, #ch do
- local l=game.Workspace:findFirstChild(ch[i].Name)
- if l~=nil then
- local s=l.Torso
- local p=l.Torso.Position
- local q=script.Parent.Torso.Position
- local d=math.sqrt( ((p.x-q.x)^2)+((p.y-q.y)^2)+((p.z-q.z)^2) )
- if smallest==nil then
- smallest=d
- target=s
- elseif d<smallest then
- smallest=d
- target=s
- end
- end
- end
- if smallest==nil then stopmoving() return end
- if smallest>6*dist then return end
- script.Parent.Humanoid:MoveTo(target.Position, target)
- wait(0.5)
- for i=1, 6 do
- if target.Parent.Humanoid.Health<1 then stopmoving() else wait(0.5) end
- end
- end
- end
- function gohome()
- script.Parent.Humanoid:MoveTo(Vector3.new(0,0,0), game.Workspace.Bases.Base)
- end
- function stopmoving()
- script.Parent.Humanoid:MoveTo(script.Parent.Torso.Position, script.Parent.Torso)
- end
- function follow(name)
- following=true
- local p=game.Workspace:findFirstChild(name)
- if p==nil then return end
- while following==true do
- script.Parent.Humanoid:MoveTo(p.Torso.Position, p.Torso)
- wait(0.5)
- for i=1, 3 do
- if p.Humanoid.Health<1 then following=false; stopmoving() return end
- wait(0.5)
- end
- end
- end
- function attack(name)
- if script.Parent:findFirstChild("Sword")~=nil then
- following=true
- local p=game.Workspace:findFirstChild(name)
- if p==nil then return end
- while following==true do
- script.Parent.Humanoid:MoveTo(p.Torso.Position, p.Torso)
- wait(0.5)
- for i=1, 3 do
- if p.Humanoid.Health<1 then following=false; stopmoving() return end
- local l=p.Torso.Position
- local q=script.Parent.Torso.Position
- local d=math.sqrt( ((l.x-q.x)^2)+((l.y-q.y)^2)+((l.z-q.z)^2) )
- if d<10 then
- script.Parent.Humanoid:MoveTo(p.Torso.Position, p.Torso); slash()
- if (q.y-l.y)>3 and (q.y-l.y)<7 then
- script.Parent.Humanoid:MoveTo(p.Torso.Position+Vector3.new(math.random(-4,4),0,math.random(-4,4)), p.Torso);
- end
- end
- wait(1)
- end
- end
- end
- end
- function attackany()
- if script.Parent:findFirstChild("Sword")~=nil then
- following=true
- while following==true do
- local ch=game.Players:children()
- for i=1, #ch do
- local l=game.Workspace:findFirstChild(ch[i].Name)
- if l~=nil then
- local s=l.Torso
- local p=l.Torso.Position
- local q=script.Parent.Torso.Position
- local d=math.sqrt( ((p.x-q.x)^2)+((p.y-q.y)^2)+((p.z-q.z)^2) )
- if smallest==nil then
- smallest=d
- target=s
- elseif d<smallest then
- smallest=d
- target=s
- end
- end
- end
- if smallest==nil then stopmoving() return end
- if smallest>6*dist then return end
- script.Parent.Humanoid:MoveTo(target.Position, target)
- if smallest<10 then
- slash()
- end
- if target.Parent==nil then stopmoving() return end
- wait(0.5)
- for i=1, 3 do
- if target.Parent.Humanoid.Health<1 then
- stopmoving()
- else
- local p=target.Position
- local q=script.Parent.Torso.Position
- local d=math.sqrt( ((p.x-q.x)^2)+((p.y-q.y)^2)+((p.z-q.z)^2) )
- if d<10 then
- script.Parent.Humanoid:MoveTo(target.Position, target); slash()
- if (q.y-p.y)>3 and (q.y-p.y)<7 then
- script.Parent.Humanoid:MoveTo(p.Torso.Position+Vector3.new(math.random(-4,4),0,math.random(-4,4)), p.Torso);
- end
- end
- wait(1)
- end
- end
- end
- end
- end
- function patrol()
- if points==nil then
- points=0
- if game.Workspace:findFirstChild("pp1")~=nil then
- pp1=game.Workspace:findFirstChild("pp1")
- local points=points+1
- if game.Workspace:findFirstChild("pp2")~=nil then
- pp2=game.Workspace:findFirstChild("pp2")
- local points=points+1
- if game.Workspace:findFirstChild("pp3")~=nil then
- pp3=game.Workspace:findFirstChild("pp3")
- local points=points+1
- if game.Workspace:findFirstChild("pp4")~=nil then
- pp4=game.Workspace:findFirstChild("pp4")
- local points=points+1
- if game.Workspace:findFirstChild("pp5")~=nil then
- pp5=game.Workspace:findFirstChild("pp5")
- local points=points+1
- if game.Workspace:findFirstChild("pp6")~=nil then
- pp6=game.Workspace:findFirstChild("pp6")
- local points=points+1
- if game.Workspace:findFirstChild("pp7")~=nil then
- pp7=game.Workspace:findFirstChild("pp7")
- local points=points+1
- if game.Workspace:findFirstChild("pp8")~=nil then
- pp8=game.Workspace:findFirstChild("pp8")
- local points=points+1
- if game.Workspace:findFirstChild("pp9")~=nil then
- pp9=game.Workspace:findFirstChild("pp9")
- local points=points+1
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- if points<1 then return end
- patrolling=true
- local time=2
- if points==1 then return end
- if points>1 then
- while patrolling==true do
- script.Parent.Humanoid:MoveTo(pp1.Position, pp1)
- wait(time)
- script.Parent.Humanoid:MoveTo(pp2.Position, pp2)
- wait(time)
- if points>2 then
- script.Parent.Humanoid:MoveTo(pp3.Position, pp3)
- wait(time)
- if points>3 then
- script.Parent.Humanoid:MoveTo(pp4.Position, pp4)
- wait(time)
- if points>4 then
- script.Parent.Humanoid:MoveTo(pp5.Position, pp5)
- wait(time)
- if points>5 then
- script.Parent.Humanoid:MoveTo(pp6.Position, pp6)
- wait(time)
- if points>6 then
- script.Parent.Humanoid:MoveTo(pp7.Position, pp7)
- wait(time)
- if points>7 then
- script.Parent.Humanoid:MoveTo(pp8.Position, pp8)
- wait(time)
- if points>8 then
- script.Parent.Humanoid:MoveTo(pp9.Position, pp9)
- wait(time)
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- function goto(pos,part)
- while true do
- end
- end
- function slash()
- for i=1, 3 do
- wait(.3)
- RightShoulder.MaxVelocity = 2
- LeftShoulder.MaxVelocity = 1
- RightShoulder.DesiredAngle = -2.14
- LeftShoulder.DesiredAngle = 0
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- wait(.2)
- RightShoulder.MaxVelocity = 2
- LeftShoulder.MaxVelocity = 1
- RightShoulder.DesiredAngle = 0
- LeftShoulder.DesiredAngle = 0
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- end
- function defence()
- proxkill=true
- while proxkill==true do
- local ch=game.Players:children()
- for i=1, #ch do
- local p=game.Workspace:findFirstChild(ch[i].Name)
- if p~=nil then
- local p=p.Torso.Position
- local q=script.Parent.Torso.Position
- local d=math.sqrt( ((p.x-q.x)^2)+((p.y-q.y)^2)+((p.z-q.z)^2) )
- if d<dist and d>8 then
- local ex=Instance.new("Explosion")
- ex.Position=p
- ex.Parent=game.Workspace
- end
- end
- end
- wait(1)
- end
- end
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- --[[
- function newSound(id)
- local sound = Instance.new("Sound")
- sound.SoundId = id
- sound.Parent = script.Parent.Head
- return sound
- end
- local sDied = newSound("rbxasset://sounds/uuhhh.wav")
- local sFallingDown = newSound("rbxasset://sounds/splat.wav")
- local sFreeFalling = newSound("rbxasset://sounds/swoosh.wav")
- local sGettingUp = newSound("rbxasset://sounds/hit.wav")
- local sJumping = newSound("rbxasset://sounds/button.wav")
- local sRunning = newSound("rbxasset://sounds/bfsl-minifigfoots1.mp3")
- sRunning.Looped = true
- local Figure = script.Parent
- local Head = waitForChild(Figure, "Head")
- local Humanoid = waitForChild(Figure, "Humanoid")
- function onDied()
- sDied:play()
- end
- function onState(state, sound)
- if state then
- sound:play()
- else
- sound:pause()
- end
- end
- function onRunning(speed)
- if speed>0 then
- sRunning:play()
- else
- sRunning:pause()
- end
- end
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(function(state) onState(state, sJumping) end)
- Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end)
- Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end)
- Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end)
- --]]
- local nextTime = 0
- local runService = game:service("RunService");
- while Figure.Parent~=nil do
- time = runService.Stepped:wait()
- if time > nextTime then
- move(time)
- nextTime = time + 0.1
- end
- end
- end,o158)
- end))
- o159 = Create("Part",{
- ["Name"] = "Torso",
- ["Parent"] = o2,
- ["BrickColor"] = BrickColor.new("Reddish brown"),
- ["Position"] = Vector3.new(-6.5999999, 4.47241116, -11.7410002),
- ["Rotation"] = Vector3.new(-175.307953, 1.26414217e-039, -180),
- ["CFrame"] = CFrame.new(-6.5999999, 4.47241116, -11.7410002, -1, 0, 2.20634443e-041, 0, 0.996648729, 0.0818002596, 1.11071615e-027, 0.0818002596, -0.996648729),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Size"] = Vector3.new(2, 2, 1),
- ["Color"] = Color3.new(0.411765, 0.25098, 0.156863),
- })
- o160 = Create("Motor",{
- ["Name"] = "Left Hip",
- ["Parent"] = o159,
- ["Part0"] = o159,
- ["Part1"] = o152,
- ["DesiredAngle"] = 0.081891760230064,
- ["MaxVelocity"] = 0.10000000149012,
- })
- o161 = Create("Snap",{
- ["Name"] = "Neck",
- ["Parent"] = o159,
- })
- o162 = Create("Motor",{
- ["Name"] = "Right Hip",
- ["Parent"] = o159,
- ["Part0"] = o159,
- ["Part1"] = o153,
- ["DesiredAngle"] = 0.081891760230064,
- ["MaxVelocity"] = 0.10000000149012,
- })
- o163 = Create("Motor",{
- ["Name"] = "Left Shoulder",
- ["Parent"] = o159,
- ["Part0"] = o155,
- ["Part1"] = o159,
- ["DesiredAngle"] = -0.081891760230064,
- ["MaxVelocity"] = 0.15000000596046,
- })
- o164 = Create("Script",{
- ["Name"] = "BloodScript",
- ["Parent"] = o1,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- function onPlayerDied(dead)
- local h = script.Parent.Humanoid
- if (h.Health==0) then
- local head = script.Parent.Head
- local blood1 = Instance.new("Part")
- blood1.BrickColor = BrickColor.new(21)
- blood1.formFactor = 2
- blood1.Size = Vector3.new(1, 0.4, 1)
- blood1.Position = head.Position
- blood1.Name = "Blood"
- blood1.Parent = script.Parent
- local blood2 = Instance.new("Part")
- blood2.BrickColor = BrickColor.new(21)
- blood2.formFactor = 2
- blood2.Size = Vector3.new(1, 0.4, 1)
- blood2.Position = head.Position
- blood2.Name = "Blood"
- blood2.Parent = script.Parent
- local blood3 = Instance.new("Part")
- blood3.BrickColor = BrickColor.new(21)
- blood3.formFactor = 2
- blood3.Size = Vector3.new(1, 0.4, 1)
- blood3.Position = head.Position
- blood3.Name = "Blood"
- blood3.Parent = script.Parent
- local blood4 = Instance.new("Part")
- blood4.BrickColor = BrickColor.new(21)
- blood4.formFactor = 2
- blood4.Size = Vector3.new(1, 0.4, 1)
- blood4.Position = head.Position
- blood4.Name = "Blood"
- blood4.Parent = script.Parent
- end
- end
- script.Parent.Humanoid.Died:connect(onPlayerDied)
- end,o164)
- end))
- o165 = Create("Script",{
- ["Name"] = "BloodScript",
- ["Parent"] = o164,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- function onPlayerDied(dead)
- local h = script.Parent.Humanoid
- if (h.Health==0) then
- local head = script.Parent.Head
- local blood1 = Instance.new("Part")
- blood1.BrickColor = BrickColor.new(21)
- blood1.formFactor = 2
- blood1.Size = Vector3.new(1, 0.4, 1)
- blood1.Position = head.Position
- blood1.Name = "Blood"
- blood1.Parent = script.Parent
- local blood2 = Instance.new("Part")
- blood2.BrickColor = BrickColor.new(21)
- blood2.formFactor = 2
- blood2.Size = Vector3.new(1, 0.4, 1)
- blood2.Position = head.Position
- blood2.Name = "Blood"
- blood2.Parent = script.Parent
- local blood3 = Instance.new("Part")
- blood3.BrickColor = BrickColor.new(21)
- blood3.formFactor = 2
- blood3.Size = Vector3.new(1, 0.4, 1)
- blood3.Position = head.Position
- blood3.Name = "Blood"
- blood3.Parent = script.Parent
- end
- end
- script.Parent.Humanoid.Died:connect(onPlayerDied)
- end,o165)
- end))
- o166 = Create("Script",{
- ["Name"] = "BloodScript",
- ["Parent"] = o164,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- function onPlayerDied(dead)
- local h = script.Parent.Humanoid
- if (h.Health==0) then
- local head = script.Parent.Head
- local blood1 = Instance.new("Part")
- blood1.BrickColor = BrickColor.new(21)
- blood1.formFactor = 2
- blood1.Size = Vector3.new(1, 0.4, 1)
- blood1.Position = head.Position
- blood1.Name = "Blood"
- blood1.Parent = script.Parent
- local blood2 = Instance.new("Part")
- blood2.BrickColor = BrickColor.new(21)
- blood2.formFactor = 2
- blood2.Size = Vector3.new(1, 0.4, 1)
- blood2.Position = head.Position
- blood2.Name = "Blood"
- blood2.Parent = script.Parent
- local blood3 = Instance.new("Part")
- blood3.BrickColor = BrickColor.new(21)
- blood3.formFactor = 2
- blood3.Size = Vector3.new(1, 0.4, 1)
- blood3.Position = head.Position
- blood3.Name = "Blood"
- blood3.Parent = script.Parent
- end
- end
- script.Parent.Humanoid.Died:connect(onPlayerDied)
- end,o166)
- end))
- o167 = Create("Script",{
- ["Name"] = "BloodScript",
- ["Parent"] = o164,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- function onPlayerDied(dead)
- local h = script.Parent.Humanoid
- if (h.Health==0) then
- local head = script.Parent.Head
- local blood1 = Instance.new("Part")
- blood1.BrickColor = BrickColor.new(21)
- blood1.formFactor = 2
- blood1.Size = Vector3.new(1, 0.4, 1)
- blood1.Position = head.Position
- blood1.Name = "Blood"
- blood1.Parent = script.Parent
- local blood2 = Instance.new("Part")
- blood2.BrickColor = BrickColor.new(21)
- blood2.formFactor = 2
- blood2.Size = Vector3.new(1, 0.4, 1)
- blood2.Position = head.Position
- blood2.Name = "Blood"
- blood2.Parent = script.Parent
- local blood3 = Instance.new("Part")
- blood3.BrickColor = BrickColor.new(21)
- blood3.formFactor = 2
- blood3.Size = Vector3.new(1, 0.4, 1)
- blood3.Position = head.Position
- blood3.Name = "Blood"
- blood3.Parent = script.Parent
- local blood4 = Instance.new("Part")
- blood4.BrickColor = BrickColor.new(21)
- blood4.formFactor = 2
- blood4.Size = Vector3.new(1, 0.4, 1)
- blood4.Position = head.Position
- blood4.Name = "Blood"
- blood4.Parent = script.Parent
- end
- end
- script.Parent.Humanoid.Died:connect(onPlayerDied)
- end,o167)
- end))
- o168 = Create("Part",{
- ["Name"] = "Smooth Block Model",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Medium green"),
- ["Position"] = Vector3.new(-6.5999999, 0.843410015, -11.5369997),
- ["Rotation"] = Vector3.new(-175.307953, 1.36643061e-018, -180),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(-6.5999999, 0.843410015, -11.5369997, -1, 3.91421785e-021, 2.38487124e-020, 5.85193125e-021, 0.996648729, 0.0818002596, -2.34486042e-020, 0.0818002596, -0.996648729),
- ["Size"] = Vector3.new(6, 1.20000005, 6),
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.631373, 0.768628, 0.54902),
- })
- o169 = Create("Decal",{
- ["Parent"] = o168,
- ["Texture"] = "rbxasset://Textures/SpawnLocation.png",
- ["Face"] = Enum.NormalId.Top,
- })
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = script
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
Advertisement
Add Comment
Please, Sign In to add comment