SHOW:
|
|
- or go back to the newest paste.
| 1 | -- This is a small bot by supersonicfan111 | |
| 2 | -- This was made quickly, and is not efficient, probably | |
| 3 | -- Feel free to make it better, etc, :) | |
| 4 | ||
| 5 | Plr = owner or game:GetService("Players").LocalPlayer
| |
| 6 | P = Plr.Character | |
| 7 | ||
| 8 | ||
| 9 | P.Archivable = true | |
| 10 | local Dum = P:Clone() | |
| 11 | Dum.Parent = workspace | |
| 12 | local chr=Dum | |
| 13 | CLerp=function(startcf, endcf, alpha) | |
| 14 | return startcf:lerp(endcf, alpha) | |
| 15 | end | |
| 16 | ||
| 17 | local RH=Instance.new('Weld',chr.Torso)
| |
| 18 | RH.Name="Right Hip" | |
| 19 | RH.Part0=chr.Torso | |
| 20 | RH.Part1=chr['Right Leg'] | |
| 21 | RH.C0=CFrame.new(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
| 22 | RH.C1=CFrame.new(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) | |
| 23 | ||
| 24 | local LH=Instance.new('Weld',chr.Torso)
| |
| 25 | LH.Name="Left Hip" | |
| 26 | LH.Part0=chr.Torso | |
| 27 | LH.Part1=chr['Left Leg'] | |
| 28 | LH.C0=CFrame.new(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
| 29 | LH.C1=CFrame.new(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) | |
| 30 | ||
| 31 | local RS=Instance.new('Weld',chr.Torso)
| |
| 32 | RS.Name="Right Shoulder" | |
| 33 | RS.Part0=chr.Torso | |
| 34 | RS.Part1=chr['Right Arm'] | |
| 35 | RS.C0=CFrame.new(1.5,0.5,0) | |
| 36 | RS.C1=CFrame.new(0, 0.5, 0) | |
| 37 | ||
| 38 | local LS=Instance.new('Weld',chr.Torso)
| |
| 39 | LS.Name="Left Shoulder" | |
| 40 | LS.Part0=chr.Torso | |
| 41 | LS.Part1=chr['Left Arm'] | |
| 42 | LS.C0=CFrame.new(-1.5,0.5,0) | |
| 43 | LS.C1=CFrame.new(0, 0.5, 0) | |
| 44 | ||
| 45 | LHC0=CFrame.new(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
| 46 | RHC0=CFrame.new(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
| 47 | ||
| 48 | local sine=0 | |
| 49 | local change=.1 | |
| 50 | local Anim="Idle" | |
| 51 | local cf=CFrame.new | |
| 52 | local sin=math.sin | |
| 53 | local rad=math.rad | |
| 54 | - | local attack=false |
| 54 | + | local attack=true |
| 55 | local angles=CFrame.Angles | |
| 56 | local euler=CFrame.fromEulerAnglesXYZ | |
| 57 | local Character=chr | |
| 58 | local Humanoid=Character:findFirstChild'Humanoid' | |
| 59 | local RootPart=chr.HumanoidRootPart | |
| 60 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
| 61 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
| |
| 62 | end | |
| 63 | ||
| 64 | - | Humanoid.WalkSpeed=10 |
| 64 | + | Humanoid.WalkSpeed=6 |
| 65 | ||
| 66 | - | Humanoid.MaxHealth=50 |
| 66 | + | Humanoid.MaxHealth=6000 |
| 67 | - | Humanoid.Health=50 |
| 67 | + | Humanoid.Health=6000 |
| 68 | local injured=false | |
| 69 | local RSC0=CFrame.new(1.5,0.5,0) | |
| 70 | local LSC0=cf(-1.5,0.5,0) | |
| 71 | spawn(function() | |
| 72 | while wait() do | |
| 73 | sine=sine+change | |
| 74 | sine = sine + change | |
| 75 | local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
| 76 | local velderp=RootPart.Velocity.y | |
| 77 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
| 78 | if torvel > 4 and torvel < 16 and hitfloor then | |
| 79 | Anim="Walk" | |
| 80 | end | |
| 81 | if RootPart.Velocity.y > 1 and hitfloor==nil then | |
| 82 | Anim="Jump" | |
| 83 | elseif RootPart.Velocity.y < -1 and hitfloor==nil then | |
| 84 | Anim="Fall" | |
| 85 | elseif torvel<1 and hitfloor then | |
| 86 | Anim="Idle" | |
| 87 | elseif torvel >= 16 and hitfloor then | |
| 88 | Anim="Run" | |
| 89 | end | |
| 90 | end | |
| 91 | end) | |
| 92 | ||
| 93 | local popcorn=true | |
| 94 | ||
| 95 | spawn(function() | |
| 96 | while wait() do | |
| 97 | if Humanoid.Health==Humanoid.MaxHealth then | |
| 98 | popcorn=true | |
| 99 | elseif Humanoid.Health==Humanoid.MaxHealth/2 then | |
| 100 | popcorn=false | |
| 101 | Humanoid.WalkSpeed=8 | |
| 102 | elseif Humanoid.Health==10 then | |
| 103 | popcorn=false | |
| 104 | Humanoid.WalkSpeed=4 | |
| 105 | end | |
| 106 | end | |
| 107 | end) | |
| 108 | ||
| 109 | spawn(function() | |
| 110 | while wait() do | |
| 111 | if Humanoid.Jump and injured then | |
| 112 | Humanoid.Jump=false | |
| 113 | end | |
| 114 | end | |
| 115 | end) | |
| 116 | ||
| 117 | ||
| 118 | local tracking=false | |
| 119 | ||
| 120 | moveBot=function() | |
| 121 | local x=math.random(-450, 450) | |
| 122 | local z=math.random(-450, 450) | |
| 123 | local pos=Vector3.new(x,0,z) | |
| 124 | Humanoid:MoveTo(pos) | |
| 125 | end | |
| 126 | ||
| 127 | moveBot() | |
| 128 | ||
| 129 | spawn(function() | |
| 130 | while wait(4) do | |
| 131 | moveBot() | |
| 132 | end | |
| 133 | end) | |
| 134 | ||
| 135 | ||
| 136 | ||
| 137 | ||
| 138 | ||
| 139 | ||
| 140 | while wait() do | |
| 141 | if Anim=='Walk' then | |
| 142 | change=.1 | |
| 143 | if not attack then | |
| 144 | LS.C0=CLerp(LS.C0, LSC0*angles(sin(sine), 0, 0), .2) | |
| 145 | RS.C0=CLerp(RS.C0, RSC0*angles(-sin(sine), 0, 0), .2) | |
| 146 | end | |
| 147 | LH.C0=CLerp(LH.C0, LHC0*angles(0, 0, sin(sine)), .2) | |
| 148 | RH.C0=CLerp(RH.C0, RHC0*angles(0, 0, sin(sine)), .2) | |
| 149 | elseif Anim=='Idle' then | |
| 150 | change=0 | |
| 151 | if not attack then | |
| 152 | LS.C0=CLerp(LS.C0, LSC0*angles(0, 0, -rad(10)), .2) | |
| 153 | RS.C0=CLerp(RS.C0, RSC0*angles(0, 0, rad(10)), .2) | |
| 154 | LH.C0=CLerp(LH.C0, LHC0*angles(-rad(10), 0, 0), .2) | |
| 155 | RH.C0=CLerp(RH.C0, RHC0*angles(-rad(10), 0, 0), .2) | |
| 156 | end | |
| 157 | elseif Anim=='Jump' then | |
| 158 | if not attack then | |
| 159 | LS.C0=CLerp(LS.C0, LSC0*angles(0, 0, math.rad(-150)), .2) | |
| 160 | RS.C0=CLerp(RS.C0, RSC0*angles(0, 0, math.rad(150)), .2) | |
| 161 | LH.C0=CLerp(LH.C0, LHC0*angles(0, 0, 0), .2) | |
| 162 | RH.C0=CLerp(RH.C0, RHC0*angles(0, 0, 0), .2) | |
| 163 | end | |
| 164 | elseif Anim=='Fall' then | |
| 165 | if not attack then | |
| 166 | LS.C0=CLerp(LS.C0, LSC0*angles(0, 0, rad(-45)), .2) | |
| 167 | RS.C0=CLerp(RS.C0, RSC0*angles(0, 0, rad(45)), .2) | |
| 168 | LH.C0=CLerp(LH.C0, LHC0*angles(0, 0, 0), .2) | |
| 169 | RH.C0=CLerp(RH.C0, RHC0*angles(0, 0, 0), .2) | |
| 170 | end | |
| 171 | end | |
| 172 | end |