SHOW:
|
|
- or go back to the newest paste.
| 1 | local oldtick = tick() | |
| 2 | warn("Animation rig - By Mewy23")
| |
| 3 | local plr = game:GetService("Players").LocalPlayer
| |
| 4 | local char, mouse = plr.Character, plr:GetMouse() | |
| 5 | local hitTab = {}
| |
| 6 | local fadeTab = {}
| |
| 7 | local spd = 0.2 * char:FindFirstChild("Humanoid").WalkSpeed / 16
| |
| 8 | local sound1 = Instance.new("Sound", char.HumanoidRootPart)
| |
| 9 | local sound2 = Instance.new("Sound", char.HumanoidRootPart)
| |
| 10 | local sound3 = Instance.new("Sound")
| |
| 11 | sound1.SoundId = "rbxassetid://130767866" | |
| 12 | sound1.Volume = 10 | |
| 13 | sound2.SoundId = "rbxassetid://142684400" | |
| 14 | sound2.Volume = 10 | |
| 15 | - | sound3.SoundId = "rbxassetid://985132972" |
| 15 | + | sound3.SoundId = "rbxassetid://141679994" |
| 16 | sound3.Volume = 10 | |
| 17 | local particle = Instance.new("ParticleEmitter")
| |
| 18 | particle.LightEmission = 0.2 | |
| 19 | - | particle.Texture = "rbxassetid://50263573" |
| 19 | + | particle.Texture = "rbxassetid://1515585913" |
| 20 | particle.Size = NumberSequence.new({
| |
| 21 | NumberSequenceKeypoint.new(0, 0), | |
| 22 | NumberSequenceKeypoint.new(0.5, 1), | |
| 23 | NumberSequenceKeypoint.new(1, 0) | |
| 24 | }) | |
| 25 | particle.Acceleration = Vector3.new(0, 0, 0) | |
| 26 | particle.Lifetime = NumberRange.new(0.15, 0.3) | |
| 27 | particle.Rate = 50 | |
| 28 | particle.Rotation = NumberRange.new(0, 360) | |
| 29 | particle.RotSpeed = NumberRange.new(0, 0) | |
| 30 | particle.Speed = NumberRange.new(0, 0) | |
| 31 | local dfj = {}
| |
| 32 | char:WaitForChild("Animate"):Destroy()
| |
| 33 | char:WaitForChild("Humanoid"):WaitForChild("Animator"):Destroy()
| |
| 34 | for i, v in pairs(char:FindFirstChild("Torso"):GetChildren()) do
| |
| 35 | if v:IsA("Motor6D") and v.Name ~= "Neck" then
| |
| 36 | table.insert(dfj, v:Clone()) | |
| 37 | v:Destroy() | |
| 38 | end | |
| 39 | end | |
| 40 | local state = "idle" | |
| 41 | local rootpart = char:FindFirstChild("HumanoidRootPart")
| |
| 42 | local rootjoint = rootpart:FindFirstChild("RootJoint")
| |
| 43 | rootjoint.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180)) | |
| 44 | local rarm = Instance.new("Weld", char:FindFirstChild("Right Arm") or nil)
| |
| 45 | rarm.Part0 = char:FindFirstChild("Torso") or nil
| |
| 46 | rarm.Part1 = char:FindFirstChild("Right Arm") or nil
| |
| 47 | rarm.C0 = CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
| 48 | rarm.C1 = CFrame.new(-0.5, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
| 49 | local larm = Instance.new("Weld", char:FindFirstChild("Left Arm") or nil)
| |
| 50 | larm.Part0 = char:FindFirstChild("Torso") or nil
| |
| 51 | larm.Part1 = char:FindFirstChild("Left Arm") or nil
| |
| 52 | larm.C0 = CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
| 53 | larm.C1 = CFrame.new(0.5, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
| 54 | local rleg = Instance.new("Weld", char:FindFirstChild("Right Leg") or nil)
| |
| 55 | rleg.Part0 = char:FindFirstChild("Torso") or nil
| |
| 56 | rleg.Part1 = char:FindFirstChild("Right Leg") or nil
| |
| 57 | rleg.C0 = CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
| 58 | rleg.C1 = CFrame.new(0.5, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
| 59 | local lleg = Instance.new("Weld", char:FindFirstChild("Left Leg") or nil)
| |
| 60 | lleg.Part0 = char:FindFirstChild("Torso") or nil
| |
| 61 | lleg.Part1 = char:FindFirstChild("Left Leg") or nil
| |
| 62 | lleg.C0 = CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
| 63 | lleg.C1 = CFrame.new(-0.5, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
| 64 | local neck = char:FindFirstChild("Torso"):FindFirstChild("Neck") or nil
| |
| 65 | neck.Part0 = char:FindFirstChild("Torso") or nil
| |
| 66 | neck.Part1 = char:FindFirstChild("Head") or nil
| |
| 67 | neck.C0 = CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
| 68 | neck.C1 = CFrame.new(0, -0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
| 69 | function hitSphere() | |
| 70 | local function recSearch(par) | |
| 71 | local tab = {}
| |
| 72 | local function rec(parent) | |
| 73 | if parent:IsA("Humanoid") and parent ~= char:FindFirstChildOfClass("Humanoid") then
| |
| 74 | table.insert(tab, parent) | |
| 75 | end | |
| 76 | for i, v in pairs(parent:GetChildren()) do | |
| 77 | rec(v) | |
| 78 | end | |
| 79 | end | |
| 80 | rec(par) | |
| 81 | return tab | |
| 82 | end | |
| 83 | local humsFound = {}
| |
| 84 | for i, v in pairs(recSearch(workspace)) do | |
| 85 | table.insert(humsFound, v) | |
| 86 | end | |
| 87 | return humsFound | |
| 88 | end | |
| 89 | mouse.Button1Down:connect(function() | |
| 90 | if state ~= "busy" then | |
| 91 | state = "busy" | |
| 92 | do | |
| 93 | local foundHums = {}
| |
| 94 | local prtcls = {}
| |
| 95 | local sounds = {}
| |
| 96 | local parts = {}
| |
| 97 | sound1:Play() | |
| 98 | local hit = false | |
| 99 | local toggle = false | |
| 100 | local frmcon | |
| 101 | local frame = 0 | |
| 102 | frmcon = game:service("RunService").RenderStepped:connect(function()
| |
| 103 | frame = frame + 1 | |
| 104 | if frame / 4 == math.floor(frame / 4) then | |
| 105 | if toggle == false then | |
| 106 | toggle = true | |
| 107 | else | |
| 108 | toggle = false | |
| 109 | end | |
| 110 | end | |
| 111 | if toggle == true then | |
| 112 | rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 113 | lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 114 | rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(45)), spd * 1.5) | |
| 115 | larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(90)), spd * 1.5) | |
| 116 | rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(225)), spd * 1.5) | |
| 117 | neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(-45), math.rad(0)), spd * 1.5) | |
| 118 | else | |
| 119 | rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 120 | lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 121 | rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(-90)), spd * 1.5) | |
| 122 | larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(-45)), spd * 1.5) | |
| 123 | rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(135)), spd * 1.5) | |
| 124 | neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(45), math.rad(0)), spd * 1.5) | |
| 125 | end | |
| 126 | if frame % 5 == 0 then | |
| 127 | for i, v in pairs(hitSphere()) do | |
| 128 | for o, b in pairs(v.Parent:GetChildren()) do | |
| 129 | if b:IsA("BasePart") and 4 >= (b.Position - rootjoint.Parent.CFrame * CFrame.new(0, 0, -2.25).p).Magnitude then
| |
| 130 | hit = true | |
| 131 | if foundHums[v] then | |
| 132 | foundHums[v] = foundHums[v] + 1 | |
| 133 | else | |
| 134 | foundHums[v] = 1 | |
| 135 | local ns = sound3:Clone() | |
| 136 | ns.Parent = b | |
| 137 | table.insert(sounds, ns) | |
| 138 | end | |
| 139 | if not prtcls[b] then | |
| 140 | partClone = particle:Clone() | |
| 141 | partClone.Enabled = false | |
| 142 | partClone.Parent = b | |
| 143 | prtcls[b] = partClone | |
| 144 | end | |
| 145 | local p = Instance.new("Part")
| |
| 146 | p.Size = Vector3.new(0.2, 0.2, 0.2) | |
| 147 | - | p.Color = Color3.new(1, 1, 1) |
| 147 | + | p.Color = Color3.new(1, 0, 1) |
| 148 | p.TopSurface = "Smooth" | |
| 149 | p.BottomSurface = "Smooth" | |
| 150 | p.Anchored = true | |
| 151 | p.CanCollide = false | |
| 152 | p.Shape = "Ball" | |
| 153 | p.CFrame = CFrame.new(b.CFrame.p + Vector3.new(math.random(-10, 10) / 10, math.random(-10, 10) / 10, math.random(-10, 10) / 10)) | |
| 154 | p.Parent = workspace | |
| 155 | table.insert(fadeTab, p) | |
| 156 | parts[b] = b | |
| 157 | end | |
| 158 | end | |
| 159 | end | |
| 160 | end | |
| 161 | end) | |
| 162 | local bucon | |
| 163 | bucon = mouse.Button1Up:connect(function() | |
| 164 | frmcon:disconnect() | |
| 165 | sound1:Stop() | |
| 166 | state = "idle" | |
| 167 | if hit == true then | |
| 168 | sound2:Play() | |
| 169 | wait(2.7) | |
| 170 | for i, v in pairs(sounds) do | |
| 171 | spawn(function() | |
| 172 | wait(math.random(0, 100) / 600) | |
| 173 | v.TimePosition = 2.5 | |
| 174 | v:Play() | |
| 175 | end) | |
| 176 | end | |
| 177 | wait(1.2) | |
| 178 | for i, v in pairs(prtcls) do | |
| 179 | v.Enabled = true | |
| 180 | end | |
| 181 | wait(1.3) | |
| 182 | spawn(function() | |
| 183 | local rcon | |
| 184 | local frame = 0 | |
| 185 | rcon = game:service("RunService").RenderStepped:connect(function()
| |
| 186 | frame = frame + 1 | |
| 187 | for i, v in pairs(sounds) do | |
| 188 | v.Volume = 10 - frame / 5 | |
| 189 | if v.Volume <= 0 then | |
| 190 | v.Volume = 0 | |
| 191 | v:Destroy() | |
| 192 | end | |
| 193 | end | |
| 194 | if frame >= 200 then | |
| 195 | for i, v in pairs(sounds) do | |
| 196 | v:Destroy() | |
| 197 | end | |
| 198 | end | |
| 199 | end) | |
| 200 | end) | |
| 201 | for i, v in pairs(parts) do | |
| 202 | v.RotVelocity = Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100)) | |
| 203 | v.Velocity = v.Velocity + Vector3.new(0, 20, 0) | |
| 204 | local bvel = Instance.new("BodyVelocity", v)
| |
| 205 | bvel.MaxForce = Vector3.new(1000000, 1000000, 1000000) | |
| 206 | bvel.Velocity = Vector3.new(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
| 207 | game:service("Debris"):AddItem(bvel, 0.5)
| |
| 208 | end | |
| 209 | for i, v in pairs(foundHums) do | |
| 210 | if i.MaxHealth >= math.huge then | |
| 211 | i.MaxHealth = 100 | |
| 212 | end | |
| 213 | i.Health = 0 | |
| 214 | local boom = Instance.new("Explosion", workspace)
| |
| 215 | boom.Position = i.Character.Torso | |
| 216 | boom.Visible = false | |
| 217 | boom.BlastRadius = 999999999999999 | |
| 218 | end | |
| 219 | wait(0.7) | |
| 220 | for i, v in pairs(prtcls) do | |
| 221 | v.Enabled = false | |
| 222 | end | |
| 223 | end | |
| 224 | bucon:disconnect() | |
| 225 | end) | |
| 226 | end | |
| 227 | end | |
| 228 | end) | |
| 229 | game:GetService("RunService").Heartbeat:connect(function()
| |
| 230 | for i, v in pairs(fadeTab) do | |
| 231 | v.Transparency = v.Transparency + 0.1 | |
| 232 | local savecf = v.CFrame | |
| 233 | v.Size = v.Size + Vector3.new(0.3, 0.3, 0.3) | |
| 234 | v.CFrame = savecf | |
| 235 | end | |
| 236 | local isub = 0 | |
| 237 | for i = 1, #fadeTab do | |
| 238 | if fadeTab[i - isub].Transparency >= 1 then | |
| 239 | fadeTab[i - isub]:Destroy() | |
| 240 | table.remove(fadeTab, i - isub) | |
| 241 | isub = isub + 1 | |
| 242 | end | |
| 243 | end | |
| 244 | char:FindFirstChild("Humanoid").WalkSpeed = 26
| |
| 245 | spd = 0.2 * char:FindFirstChild("Humanoid").WalkSpeed / 16
| |
| 246 | if state ~= "busy" then | |
| 247 | local ray = Ray.new(rootpart.Position, Vector3.new(0, -4, 0)) | |
| 248 | local part, pos, normal = workspace:FindPartOnRayWithIgnoreList(ray, char:GetChildren(), false, true) | |
| 249 | if rootpart.Velocity.Magnitude > 0.5 and part ~= nil then | |
| 250 | state = "running" | |
| 251 | elseif rootpart.Velocity.Magnitude <= 0.5 and part ~= nil then | |
| 252 | state = "idle" | |
| 253 | elseif 0 < rootpart.Velocity.Y and part == nil then | |
| 254 | state = "jumping" | |
| 255 | elseif 0 >= rootpart.Velocity.Y and part == nil then | |
| 256 | state = "falling" | |
| 257 | end | |
| 258 | if state == "idle" then | |
| 259 | rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 260 | lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 261 | rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5 + math.cos(tick() + 0.5) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad((math.cos(tick()) + 1) / 16) * 20), spd) | |
| 262 | larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5 + math.cos(tick() + 0.5) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-(math.cos(tick()) + 1) / 16) * 20), spd) | |
| 263 | rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180)), spd) | |
| 264 | neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 265 | elseif state == "running" then | |
| 266 | rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1 - -math.sin(tick() * 8 + 90) / 8, math.sin(tick() * 8 + 90) / 10) * CFrame.Angles(math.rad(math.sin(tick() * 8) * 60), math.rad(0), math.rad(0)), spd) | |
| 267 | lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1 - math.sin(tick() * 8 + 90) / 8, -math.sin(tick() * 8 + 90) / 10) * CFrame.Angles(-math.rad(math.sin(tick() * 8) * 60), math.rad(0), math.rad(0)), spd) | |
| 268 | rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(math.sin(tick() * 8) * 80), math.rad(0), math.rad(0)), spd) | |
| 269 | larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(-math.rad(math.sin(tick() * 8) * 80), math.rad(0), math.rad(0)), spd) | |
| 270 | rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-110), math.rad(0), math.rad(180)), spd) | |
| 271 | neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), spd) | |
| 272 | elseif state == "jumping" then | |
| 273 | rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 274 | lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 275 | rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 276 | larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 277 | rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180)), spd) | |
| 278 | neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 279 | elseif state == "falling" then | |
| 280 | rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 281 | lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 282 | rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 283 | larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 284 | rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180)), spd) | |
| 285 | neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd) | |
| 286 | end | |
| 287 | end | |
| 288 | end) | |
| 289 | warn("Loaded! Time elapsed: " .. tick() - oldtick) |