SHOW:
|
|
- or go back to the newest paste.
| 1 | Effects = {} --sound effects, for advanced players.
| |
| 2 | local Player = game.Players.localPlayer | |
| 3 | local Character = Player.Character | |
| 4 | local Humanoid = Character.Humanoid | |
| 5 | z = Instance.new("Sound", Character)
| |
| 6 | z.SoundId = "rbxassetid://360461351"-- | |
| 7 | z.Looped = true --False for a one-time song. | |
| 8 | z.Pitch = 1.0 | |
| 9 | z.Volume = 1.6 | |
| 10 | wait(.1) | |
| 11 | z:Play() | |
| 12 | ------------------------ | |
| 13 | Player=game:GetService("Players").LocalPlayer
| |
| 14 | Character=Player.Character | |
| 15 | PlayerGui=Player.PlayerGui | |
| 16 | Backpack=Player.Backpack | |
| 17 | Torso=Character.Torso | |
| 18 | Head=Character.Head | |
| 19 | Humanoid=Character.Humanoid | |
| 20 | LeftArm=Character["Left Arm"] | |
| 21 | LeftLeg=Character["Left Leg"] | |
| 22 | RightArm=Character["Right Arm"] | |
| 23 | RightLeg=Character["Right Leg"] | |
| 24 | LS=Torso["Left Shoulder"] | |
| 25 | LH=Torso["Left Hip"] | |
| 26 | RS=Torso["Right Shoulder"] | |
| 27 | RH=Torso["Right Hip"] | |
| 28 | Face = Head.face | |
| 29 | Neck=Torso.Neck | |
| 30 | it=Instance.new | |
| 31 | attacktype=1 | |
| 32 | vt=Vector3.new | |
| 33 | cf=CFrame.new | |
| 34 | euler=CFrame.fromEulerAnglesXYZ | |
| 35 | angles=CFrame.Angles | |
| 36 | cloaked=false | |
| 37 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 38 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 39 | LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
| 40 | LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) | |
| 41 | RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
| 42 | RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) | |
| 43 | RootPart=Character.HumanoidRootPart | |
| 44 | RootJoint=RootPart.RootJoint | |
| 45 | RootCF=euler(-1.57,0,3.14) | |
| 46 | attack = false | |
| 47 | attackdebounce = false | |
| 48 | deb=false | |
| 49 | equipped=true | |
| 50 | hand=false | |
| 51 | MMouse=nil | |
| 52 | combo=0 | |
| 53 | mana=0 | |
| 54 | trispeed=.2 | |
| 55 | attackmode='none' | |
| 56 | local idle=0 | |
| 57 | local Anim="Idle" | |
| 58 | local Effects={}
| |
| 59 | local gun=false | |
| 60 | local shoot=false | |
| 61 | player=nil | |
| 62 | mana=0 | |
| 63 | cam = workspace.CurrentCamera | |
| 64 | ZTarget = nil | |
| 65 | RocketTarget = nil | |
| 66 | local m = Instance.new("Model",Character)
| |
| 67 | m.Name = "WeaponModel" | |
| 68 | ||
| 69 | mouse=Player:GetMouse() | |
| 70 | --save shoulders | |
| 71 | RSH, LSH=nil, nil | |
| 72 | --welds | |
| 73 | RW, LW=Instance.new("Weld"), Instance.new("Weld")
| |
| 74 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
| 75 | LH=Torso["Left Hip"] | |
| 76 | RH=Torso["Right Hip"] | |
| 77 | TorsoColor=Torso.BrickColor | |
| 78 | function NoOutline(Part) | |
| 79 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
| 80 | end | |
| 81 | player=Player | |
| 82 | ch=Character | |
| 83 | RSH=ch.Torso["Right Shoulder"] | |
| 84 | LSH=ch.Torso["Left Shoulder"] | |
| 85 | -- | |
| 86 | RSH.Parent=nil | |
| 87 | LSH.Parent=nil | |
| 88 | -- | |
| 89 | RW.Name="Right Shoulder" | |
| 90 | RW.Part0=ch.Torso | |
| 91 | RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
| 92 | RW.C1=cf(0, 0.5, 0) | |
| 93 | RW.Part1=ch["Right Arm"] | |
| 94 | RW.Parent=ch.Torso | |
| 95 | -- | |
| 96 | LW.Name="Left Shoulder" | |
| 97 | LW.Part0=ch.Torso | |
| 98 | LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
| 99 | LW.C1=cf(0, 0.5, 0) | |
| 100 | LW.Part1=ch["Left Arm"] | |
| 101 | LW.Parent=ch.Torso | |
| 102 | ||
| 103 | function swait(num) | |
| 104 | if num==0 or num==nil then | |
| 105 | game:service'RunService'.Heartbeat:wait(0) | |
| 106 | else | |
| 107 | for i=0,num do | |
| 108 | game:service'RunService'.Heartbeat:wait(0) | |
| 109 | end | |
| 110 | end | |
| 111 | end | |
| 112 | ||
| 113 | function nooutline(part) | |
| 114 | part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10 | |
| 115 | end | |
| 116 | ||
| 117 | function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size) | |
| 118 | local fp=it("Part")
| |
| 119 | fp.formFactor=formfactor | |
| 120 | fp.Parent=parent | |
| 121 | fp.Reflectance=reflectance | |
| 122 | fp.Transparency=transparency | |
| 123 | fp.CanCollide=false | |
| 124 | fp.Locked=true | |
| 125 | fp.BrickColor=BrickColor.new(tostring(brickcolor)) | |
| 126 | fp.Name=name | |
| 127 | fp.Size=size | |
| 128 | fp.Position=Character.Torso.Position | |
| 129 | nooutline(fp) | |
| 130 | fp.Material=material | |
| 131 | fp:BreakJoints() | |
| 132 | return fp | |
| 133 | end | |
| 134 | ||
| 135 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
| 136 | local mesh=it(Mesh) | |
| 137 | mesh.Parent=part | |
| 138 | if Mesh=="SpecialMesh" then | |
| 139 | mesh.MeshType=meshtype | |
| 140 | mesh.MeshId=meshid | |
| 141 | end | |
| 142 | mesh.Offset=offset | |
| 143 | mesh.Scale=scale | |
| 144 | return mesh | |
| 145 | end | |
| 146 | ||
| 147 | function weld(parent,part0,part1,c0,c1) | |
| 148 | local weld=it("Weld")
| |
| 149 | weld.Parent=parent | |
| 150 | weld.Part0=part0 | |
| 151 | weld.Part1=part1 | |
| 152 | weld.C0=c0 | |
| 153 | weld.C1=c1 | |
| 154 | return weld | |
| 155 | end | |
| 156 | ||
| 157 | ||
| 158 | local function CFrameFromTopBack(at, top, back) | |
| 159 | local right = top:Cross(back) | |
| 160 | return CFrame.new(at.x, at.y, at.z, | |
| 161 | right.x, top.x, back.x, | |
| 162 | right.y, top.y, back.y, | |
| 163 | right.z, top.z, back.z) | |
| 164 | end | |
| 165 | ||
| 166 | function Triangle(a, b, c) | |
| 167 | local edg1 = (c-a):Dot((b-a).unit) | |
| 168 | local edg2 = (a-b):Dot((c-b).unit) | |
| 169 | local edg3 = (b-c):Dot((a-c).unit) | |
| 170 | if edg1 <= (b-a).magnitude and edg1 >= 0 then | |
| 171 | a, b, c = a, b, c | |
| 172 | elseif edg2 <= (c-b).magnitude and edg2 >= 0 then | |
| 173 | a, b, c = b, c, a | |
| 174 | elseif edg3 <= (a-c).magnitude and edg3 >= 0 then | |
| 175 | a, b, c = c, a, b | |
| 176 | else | |
| 177 | assert(false, "unreachable") | |
| 178 | end | |
| 179 | ||
| 180 | local len1 = (c-a):Dot((b-a).unit) | |
| 181 | local len2 = (b-a).magnitude - len1 | |
| 182 | local width = (a + (b-a).unit*len1 - c).magnitude | |
| 183 | ||
| 184 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
| 185 | ||
| 186 | local list = {}
| |
| 187 | ||
| 188 | local TrailColor = ("Dark grey")
| |
| 189 | ||
| 190 | if len1 > 0.01 then | |
| 191 | local w1 = Instance.new('WedgePart', m)
| |
| 192 | game:GetService("Debris"):AddItem(w1,5)
| |
| 193 | w1.Material = "SmoothPlastic" | |
| 194 | w1.FormFactor = 'Custom' | |
| 195 | w1.BrickColor = BrickColor.new(TrailColor) | |
| 196 | w1.Transparency = 0 | |
| 197 | w1.Reflectance = 0 | |
| 198 | w1.Material = "SmoothPlastic" | |
| 199 | w1.CanCollide = false | |
| 200 | NoOutline(w1) | |
| 201 | local sz = Vector3.new(0.2, width, len1) | |
| 202 | w1.Size = sz | |
| 203 | local sp = Instance.new("SpecialMesh",w1)
| |
| 204 | sp.MeshType = "Wedge" | |
| 205 | sp.Scale = Vector3.new(0,1,1) * sz/w1.Size | |
| 206 | w1:BreakJoints() | |
| 207 | w1.Anchored = true | |
| 208 | w1.Parent = workspace | |
| 209 | w1.Transparency = 0.7 | |
| 210 | table.insert(Effects,{w1,"DisAttack",.01})
| |
| 211 | w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2) | |
| 212 | table.insert(list,w1) | |
| 213 | end | |
| 214 | ||
| 215 | if len2 > 0.01 then | |
| 216 | local w2 = Instance.new('WedgePart', m)
| |
| 217 | game:GetService("Debris"):AddItem(w2,5)
| |
| 218 | w2.Material = "SmoothPlastic" | |
| 219 | w2.FormFactor = 'Custom' | |
| 220 | w2.BrickColor = BrickColor.new(TrailColor) | |
| 221 | w2.Transparency = 0 | |
| 222 | w2.Reflectance = 0 | |
| 223 | w2.Material = "SmoothPlastic" | |
| 224 | w2.CanCollide = false | |
| 225 | NoOutline(w2) | |
| 226 | local sz = Vector3.new(0.2, width, len2) | |
| 227 | w2.Size = sz | |
| 228 | local sp = Instance.new("SpecialMesh",w2)
| |
| 229 | sp.MeshType = "Wedge" | |
| 230 | sp.Scale = Vector3.new(0,1,1) * sz/w2.Size | |
| 231 | w2:BreakJoints() | |
| 232 | w2.Anchored = true | |
| 233 | w2.Parent = workspace | |
| 234 | w2.Transparency = 0.7 | |
| 235 | table.insert(Effects,{w2,"DisAttack",.01})
| |
| 236 | w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2) | |
| 237 | table.insert(list,w2) | |
| 238 | end | |
| 239 | return unpack(list) | |
| 240 | end | |
| 241 | ||
| 242 | ||
| 243 | so = function(id,par,vol,pit) | |
| 244 | coroutine.resume(coroutine.create(function() | |
| 245 | local sou = Instance.new("Sound",par or workspace)
| |
| 246 | sou.Volume=vol | |
| 247 | sou.Pitch=pit or 1 | |
| 248 | sou.SoundId=id | |
| 249 | swait() | |
| 250 | sou:play() | |
| 251 | game:GetService("Debris"):AddItem(sou,6)
| |
| 252 | end)) | |
| 253 | end | |
| 254 | ||
| 255 | function clerp(a,b,t) | |
| 256 | local qa = {QuaternionFromCFrame(a)}
| |
| 257 | local qb = {QuaternionFromCFrame(b)}
| |
| 258 | local ax, ay, az = a.x, a.y, a.z | |
| 259 | local bx, by, bz = b.x, b.y, b.z | |
| 260 | local _t = 1-t | |
| 261 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
| 262 | end | |
| 263 | ||
| 264 | function QuaternionFromCFrame(cf) | |
| 265 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 266 | local trace = m00 + m11 + m22 | |
| 267 | if trace > 0 then | |
| 268 | local s = math.sqrt(1 + trace) | |
| 269 | local recip = 0.5/s | |
| 270 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
| 271 | else | |
| 272 | local i = 0 | |
| 273 | if m11 > m00 then | |
| 274 | i = 1 | |
| 275 | end | |
| 276 | if m22 > (i == 0 and m00 or m11) then | |
| 277 | i = 2 | |
| 278 | end | |
| 279 | if i == 0 then | |
| 280 | local s = math.sqrt(m00-m11-m22+1) | |
| 281 | local recip = 0.5/s | |
| 282 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
| 283 | elseif i == 1 then | |
| 284 | local s = math.sqrt(m11-m22-m00+1) | |
| 285 | local recip = 0.5/s | |
| 286 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
| 287 | elseif i == 2 then | |
| 288 | local s = math.sqrt(m22-m00-m11+1) | |
| 289 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
| 290 | end | |
| 291 | end | |
| 292 | end | |
| 293 | ||
| 294 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 295 | local xs, ys, zs = x + x, y + y, z + z | |
| 296 | local wx, wy, wz = w*xs, w*ys, w*zs | |
| 297 | local xx = x*xs | |
| 298 | local xy = x*ys | |
| 299 | local xz = x*zs | |
| 300 | local yy = y*ys | |
| 301 | local yz = y*zs | |
| 302 | local zz = z*zs | |
| 303 | return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) | |
| 304 | end | |
| 305 | ||
| 306 | function QuaternionSlerp(a, b, t) | |
| 307 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
| 308 | local startInterp, finishInterp; | |
| 309 | if cosTheta >= 0.0001 then | |
| 310 | if (1 - cosTheta) > 0.0001 then | |
| 311 | local theta = math.acos(cosTheta) | |
| 312 | local invSinTheta = 1/math.sin(theta) | |
| 313 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
| 314 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 315 | else | |
| 316 | startInterp = 1-t | |
| 317 | finishInterp = t | |
| 318 | end | |
| 319 | else | |
| 320 | if (1+cosTheta) > 0.0001 then | |
| 321 | local theta = math.acos(-cosTheta) | |
| 322 | local invSinTheta = 1/math.sin(theta) | |
| 323 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
| 324 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 325 | else | |
| 326 | startInterp = t-1 | |
| 327 | finishInterp = t | |
| 328 | end | |
| 329 | end | |
| 330 | return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp | |
| 331 | end | |
| 332 | ||
| 333 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
| 334 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
| |
| 335 | end | |
| 336 | ||
| 337 | Damagefunc=function(Part,hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock) | |
| 338 | if hit.Parent==nil then | |
| 339 | return | |
| 340 | end | |
| 341 | local h=hit.Parent:FindFirstChild("Humanoid")
| |
| 342 | for _,v in pairs(hit.Parent:children()) do | |
| 343 | if v:IsA("Humanoid") then
| |
| 344 | h=v | |
| 345 | end | |
| 346 | end | |
| 347 | if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
| |
| 348 | h=hit.Parent.Parent:FindFirstChild("Humanoid")
| |
| 349 | end | |
| 350 | if hit.Parent.className=="Hat" then | |
| 351 | hit=hit.Parent.Parent:findFirstChild("Head")
| |
| 352 | end | |
| 353 | if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
| |
| 354 | if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
| |
| 355 | --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then | |
| 356 | return | |
| 357 | end]] | |
| 358 | -- hs(hit,1.2) | |
| 359 | local c=Instance.new("ObjectValue")
| |
| 360 | c.Name="creator" | |
| 361 | c.Value=game:service("Players").LocalPlayer
| |
| 362 | c.Parent=h | |
| 363 | game:GetService("Debris"):AddItem(c,.5)
| |
| 364 | local Damage=math.random(minim,maxim) | |
| 365 | -- h:TakeDamage(Damage) | |
| 366 | local blocked=false | |
| 367 | local block=hit.Parent:findFirstChild("Block")
| |
| 368 | if block~=nil then | |
| 369 | print(block.className) | |
| 370 | if block.className=="NumberValue" then | |
| 371 | if block.Value>0 then | |
| 372 | blocked=true | |
| 373 | if decreaseblock==nil then | |
| 374 | block.Value=block.Value-1 | |
| 375 | end | |
| 376 | end | |
| 377 | end | |
| 378 | if block.className=="IntValue" then | |
| 379 | if block.Value>0 then | |
| 380 | blocked=true | |
| 381 | if decreaseblock~=nil then | |
| 382 | block.Value=block.Value-1 | |
| 383 | end | |
| 384 | end | |
| 385 | end | |
| 386 | end | |
| 387 | if blocked==false then | |
| 388 | -- h:TakeDamage(Damage) | |
| 389 | h.Health=h.Health-Damage | |
| 390 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, Part.BrickColor.Color) | |
| 391 | else | |
| 392 | h.Health=h.Health-(Damage/2) | |
| 393 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Bright blue").Color)
| |
| 394 | end | |
| 395 | if Type=="Knockdown" then | |
| 396 | local hum=hit.Parent.Humanoid | |
| 397 | hum.PlatformStand=true | |
| 398 | coroutine.resume(coroutine.create(function(HHumanoid) | |
| 399 | swait(1) | |
| 400 | HHumanoid.PlatformStand=false | |
| 401 | end),hum) | |
| 402 | local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit | |
| 403 | --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) | |
| 404 | local bodvol=Instance.new("BodyVelocity")
| |
| 405 | bodvol.velocity=angle*knockback | |
| 406 | bodvol.P=5000 | |
| 407 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
| 408 | bodvol.Parent=hit | |
| 409 | local rl=Instance.new("BodyAngularVelocity")
| |
| 410 | rl.P=3000 | |
| 411 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
| 412 | rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
| 413 | rl.Parent=hit | |
| 414 | game:GetService("Debris"):AddItem(bodvol,.5)
| |
| 415 | game:GetService("Debris"):AddItem(rl,.5)
| |
| 416 | elseif Type=="Normal" then | |
| 417 | local vp=Instance.new("BodyVelocity")
| |
| 418 | vp.P=500 | |
| 419 | vp.maxForce=Vector3.new(math.huge,0,math.huge) | |
| 420 | -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback | |
| 421 | if KnockbackType==1 then | |
| 422 | vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05 | |
| 423 | elseif KnockbackType==2 then | |
| 424 | vp.velocity=Property.CFrame.lookVector*knockback | |
| 425 | end | |
| 426 | if knockback>0 then | |
| 427 | vp.Parent=hit.Parent.Torso | |
| 428 | end | |
| 429 | game:GetService("Debris"):AddItem(vp,.5)
| |
| 430 | elseif Type=="Up" then | |
| 431 | local bodyVelocity=Instance.new("BodyVelocity")
| |
| 432 | bodyVelocity.velocity=vt(0,60,0) | |
| 433 | bodyVelocity.P=5000 | |
| 434 | bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
| 435 | bodyVelocity.Parent=hit | |
| 436 | game:GetService("Debris"):AddItem(bodyVelocity,1)
| |
| 437 | local rl=Instance.new("BodyAngularVelocity")
| |
| 438 | rl.P=3000 | |
| 439 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
| 440 | rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30)) | |
| 441 | rl.Parent=hit | |
| 442 | game:GetService("Debris"):AddItem(rl,.5)
| |
| 443 | elseif Type=="Snare" then | |
| 444 | local bp=Instance.new("BodyPosition")
| |
| 445 | bp.P=2000 | |
| 446 | bp.D=100 | |
| 447 | bp.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
| 448 | bp.position=hit.Parent.Torso.Position | |
| 449 | bp.Parent=hit.Parent.Torso | |
| 450 | game:GetService("Debris"):AddItem(bp,1)
| |
| 451 | elseif Type=="Target" then | |
| 452 | local Targetting = false | |
| 453 | if Targetting==false then | |
| 454 | ZTarget=hit.Parent.Torso | |
| 455 | coroutine.resume(coroutine.create(function(Part) | |
| 456 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
| |
| 457 | swait(5) | |
| 458 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
| |
| 459 | end),ZTarget) | |
| 460 | local TargHum=ZTarget.Parent:findFirstChild("Humanoid")
| |
| 461 | local targetgui=Instance.new("BillboardGui")
| |
| 462 | targetgui.Parent=ZTarget | |
| 463 | targetgui.Size=UDim2.new(10,100,10,100) | |
| 464 | local targ=Instance.new("ImageLabel")
| |
| 465 | targ.Parent=targetgui | |
| 466 | targ.BackgroundTransparency=1 | |
| 467 | targ.Image="rbxassetid://4834067" | |
| 468 | targ.Size=UDim2.new(1,0,1,0) | |
| 469 | cam.CameraType="Scriptable" | |
| 470 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
| 471 | local dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
| 472 | workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
| 473 | Targetting=true | |
| 474 | RocketTarget=ZTarget | |
| 475 | for i=1,Property do | |
| 476 | --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do | |
| 477 | if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then | |
| 478 | swait() | |
| 479 | end | |
| 480 | --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100) | |
| 481 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
| 482 | dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
| 483 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0) | |
| 484 | end | |
| 485 | Targetting=false | |
| 486 | RocketTarget=nil | |
| 487 | targetgui.Parent=nil | |
| 488 | cam.CameraType="Custom" | |
| 489 | end | |
| 490 | end | |
| 491 | local debounce=Instance.new("BoolValue")
| |
| 492 | debounce.Name="DebounceHit" | |
| 493 | debounce.Parent=hit.Parent | |
| 494 | debounce.Value=true | |
| 495 | game:GetService("Debris"):AddItem(debounce,Delay)
| |
| 496 | c=Instance.new("ObjectValue")
| |
| 497 | c.Name="creator" | |
| 498 | c.Value=Player | |
| 499 | c.Parent=h | |
| 500 | game:GetService("Debris"):AddItem(c,.5)
| |
| 501 | end | |
| 502 | end | |
| 503 | ||
| 504 | ||
| 505 | function ShowDamage(Pos, Text, Time, Color) | |
| 506 | local Rate = (1 / 30) | |
| 507 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
| 508 | local Text = (Text or "") | |
| 509 | local Time = (Time or 2) | |
| 510 | local Color = (Color or Color3.new(1, 0, 0)) | |
| 511 | local EffectPart = part("Custom",workspace,"SmoothPlastic",0,1,BrickColor.new(Color),"Effect",vt(0,0,0))
| |
| 512 | EffectPart.Anchored = true | |
| 513 | local BillboardGui = Instance.new("BillboardGui")
| |
| 514 | BillboardGui.Size = UDim2.new(3, 0, 3, 0) | |
| 515 | BillboardGui.Adornee = EffectPart | |
| 516 | local TextLabel = Instance.new("TextLabel")
| |
| 517 | TextLabel.BackgroundTransparency = 1 | |
| 518 | TextLabel.Size = UDim2.new(1, 0, 1, 0) | |
| 519 | TextLabel.Text = Text | |
| 520 | TextLabel.TextColor3 = Color | |
| 521 | TextLabel.TextScaled = true | |
| 522 | TextLabel.Font = Enum.Font.ArialBold | |
| 523 | TextLabel.Parent = BillboardGui | |
| 524 | BillboardGui.Parent = EffectPart | |
| 525 | game.Debris:AddItem(EffectPart, (Time + 0.1)) | |
| 526 | EffectPart.Parent = game:GetService("Workspace")
| |
| 527 | Delay(0, function() | |
| 528 | local Frames = (Time / Rate) | |
| 529 | for Frame = 1, Frames do | |
| 530 | wait(Rate) | |
| 531 | local Percent = (Frame / Frames) | |
| 532 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
| 533 | TextLabel.TextTransparency = Percent | |
| 534 | end | |
| 535 | if EffectPart and EffectPart.Parent then | |
| 536 | EffectPart:Destroy() | |
| 537 | end | |
| 538 | end) | |
| 539 | end | |
| 540 | ||
| 541 | --example: local con = HitboxB.Touched:connect(function(hit) Damagefunc(Hitbox,hit,Dmg,Dmg,math.random(Knockback,Knockback),"Normal",RootPart,.2,1) end) | |
| 542 | ||
| 543 | Handle=part(Enum.FormFactor.Symmetric,m,Enum.Material.SmoothPlastic,0,1,"Institutional white","Handle",Vector3.new(1, 1.19999993, 1)) | |
| 544 | Handleweld=weld(m,Character["Right Arm"],Handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.28881836e-005, 0.199964523, 4.57763672e-005, 1, 0, 0, 0, 0.999991894, 0, 0, 0, 1)) | |
| 545 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.200000003, 1.19999993, 0.220000014)) | |
| 546 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.41003418, -2.38418579e-007, -4.57763672e-005, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 547 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003)) | |
| 548 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-4.57763672e-005, 0.500000477, -0.410041809, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 549 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(0.200000003, 0.799999952, 0.200000003)) | |
| 550 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.410018921, -0.200001001, 0.209960938, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 551 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003)) | |
| 552 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-3.05175781e-005, 0.299999475, 0.409950256, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 553 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003)) | |
| 554 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-4.57763672e-005, -0.300000906, -0.410041809, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 555 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 556 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.409957886, -0.699999809, -0.21005249, 1.49011612e-008, -1.28550219e-008, 0.999999404, 3.68902874e-007, -0.999999464, -1.28550113e-008, 0.999999404, 3.5400177e-007, 4.47034836e-008)) | |
| 557 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
| |
| 558 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 559 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.409957886, -0.700000048, -0.209983826, -1.49011612e-008, -1.61062097e-008, -0.999999404, -1.92273887e-007, -0.999999464, 1.61061386e-008, -0.999999404, 2.07174992e-007, -4.47034836e-008)) | |
| 560 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
| |
| 561 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.399999946, 0.399999976, 0.200000003)) | |
| 562 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.309967041, -2.38418579e-007, -0.410041809, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 563 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.399999946, 0.399999976, 0.200000003)) | |
| 564 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.309967041, -2.38418579e-007, 0.409934998, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 565 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 566 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.409927368, -0.699999809, 0.409980774, -4.47034836e-008, 2.60680455e-008, 0.999999404, -2.94624101e-007, -0.999999464, 2.60680935e-008, 0.999999404, -3.09525149e-007, -1.49011612e-008)) | |
| 567 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
| |
| 568 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.200000003, 1.19999993, 0.220000014)) | |
| 569 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.409957886, -2.38418579e-007, -3.81469727e-005, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 570 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.419999957, 0.399999976, 0.200000003)) | |
| 571 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.300018311, -2.38418579e-007, 0.409934998, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 572 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.600000024, 0.600000024, 0.400000006)) | |
| 573 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.0199971199, -0.00997924805, 0.500038147, -1.52514076e-007, -0.999995351, -2.73758797e-005, -2.98023224e-008, -2.73752066e-005, 0.999992013, -0.99999392, 1.54019503e-007, -2.98023224e-008)) | |
| 574 | mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.617999971, 0.614000022, 0.19600004))
| |
| 575 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(0.200000003, 0.799999952, 0.200000003)) | |
| 576 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.409973145, -0.200001001, -0.21005249, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 577 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(0.200000003, 0.799999952, 0.200000003)) | |
| 578 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.409973145, -0.200001001, 0.209983826, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 579 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003)) | |
| 580 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-3.05175781e-005, 0.500000477, 0.409950256, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 581 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(0.200000003, 0.799999952, 0.200000003)) | |
| 582 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.410018921, -0.200001001, -0.210044861, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 583 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003)) | |
| 584 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-3.05175781e-005, -0.500000477, 0.409950256, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 585 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003)) | |
| 586 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-4.57763672e-005, -0.500000477, -0.410041809, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 587 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 588 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.410064697, -0.699999809, 0.41003418, -1.49011612e-008, -1.40300713e-007, -0.999999404, 1.80302209e-007, -0.999999464, 1.40300713e-007, -0.999999404, -1.65401119e-007, -4.47034836e-008)) | |
| 589 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
| |
| 590 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003)) | |
| 591 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-3.05175781e-005, -0.300000906, 0.409950256, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 592 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003)) | |
| 593 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-4.57763672e-005, 0.299999475, -0.410041809, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 594 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Institutional white","Part",Vector3.new(0.419999957, 0.399999976, 0.200000003)) | |
| 595 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.300018311, -2.38418579e-007, -0.410018921, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 596 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(0.600000024, 0.600000024, 0.400000006)) | |
| 597 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.0199971199, -0.00996398926, 0.500045776, -1.52514076e-007, -0.999995351, -2.73758797e-005, -2.98023224e-008, -2.73752066e-005, 0.999992013, -0.99999392, 1.54019503e-007, -2.98023224e-008)) | |
| 598 | mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.637999952, 0.618000031, 0.19600004))
| |
| 599 | GlowPrt2=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0.5,"Lime green","GlowPrt2",Vector3.new(0.400000036, 0.600000024, 0.600000024)) | |
| 600 | GlowPrt2weld=weld(m,Handle,GlowPrt2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.51007843, -0.0199995041, -0.00997924805, 0.999999642, -1.66703202e-007, 5.96046448e-008, 1.66703217e-007, 0.999999881, -5.77539403e-008, -5.96046448e-008, 5.77539083e-008, 0.999999642)) | |
| 601 | mesh("SpecialMesh",GlowPrt2,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
| |
| 602 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 603 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.409942627, -0.699999809, 0.410057068, -1.49011612e-008, -1.40300713e-007, -0.999999404, 1.80302209e-007, -0.999999464, 1.40300713e-007, -0.999999404, -1.65401119e-007, -4.47034836e-008)) | |
| 604 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
| |
| 605 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 606 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.409988403, -0.699999809, 0.409950256, -4.47034836e-008, 2.60680455e-008, 0.999999404, -2.94624101e-007, -0.999999464, 2.60680935e-008, 0.999999404, -3.09525149e-007, -1.49011612e-008)) | |
| 607 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
| |
| 608 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 609 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.410018921, -0.699999809, -0.209960938, -1.49011612e-008, -1.61062097e-008, -0.999999404, -1.92273887e-007, -0.999999464, 1.61061386e-008, -0.999999404, 2.07174992e-007, -4.47034836e-008)) | |
| 610 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
| |
| 611 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.200000003, 0.399999917, 0.200000003)) | |
| 612 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.409973145, 0.400000334, 0.209983826, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 613 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.200000003, 0.399999976, 0.200000003)) | |
| 614 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00997924805, -2.38418579e-007, -0.410049438, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 615 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.200000003, 0.399999976, 0.200000003)) | |
| 616 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00996398926, -2.38418579e-007, 0.409934998, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 617 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.200000003, 0.399999946, 0.200000003)) | |
| 618 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.409973145, 0.400002241, -0.21005249, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 619 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.200000003, 0.399999946, 0.200000003)) | |
| 620 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.410018921, 0.400002241, -0.210044861, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 621 | GlowPrt1=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","GlowPrt1",Vector3.new(0.400000036, 0.600000024, 0.600000024)) | |
| 622 | GlowPrt1weld=weld(m,Handle,GlowPrt1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.500053406, -0.0199995041, -0.00994873047, 0.999999404, -1.66703018e-007, 2.98023224e-008, 1.66703046e-007, 0.999999762, -5.77537804e-008, -2.98023224e-008, 5.77537378e-008, 0.999999404)) | |
| 623 | mesh("SpecialMesh",GlowPrt1,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
| |
| 624 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.200000003, 0.399999946, 0.200000003)) | |
| 625 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.410018921, 0.400002241, 0.209960938, 5.96046448e-008, -6.32701571e-008, -0.999999642, 1.58457397e-007, 0.999999762, -6.32701855e-008, 0.999999642, -1.58457411e-007, 5.96046448e-008)) | |
| 626 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Lime green","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 627 | Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.410018921, -0.699999809, -0.210044861, 1.49011612e-008, -1.28550219e-008, 0.999999404, 3.68902874e-007, -0.999999464, -1.28550113e-008, 0.999999404, 3.5400177e-007, 4.47034836e-008)) | |
| 628 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
| |
| 629 | ||
| 630 | Center=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,1,"Lime green","Center",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 631 | Centerweld=weld(m,Handle,Center,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00967407227, -0.0200638771, -0.610115051, 7.08338257e-006, 0.000369980873, -0.999999762, 0.000183756827, 0.999999106, 0.000371798873, 1, -0.000174473054, 6.74782859e-006)) | |
| 632 | mesh("SpecialMesh",Center,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(0.300000012, 0.300000012, 0.300000012))
| |
| 633 | Hitbox1=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,1,"Lime green","Hitbox1",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 634 | Hitbox1weld=weld(m,Center,Hitbox1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.19998169, -0.000478982925, -7.62939453e-006, 0.999999642, -1.81684379e-006, 2.71003955e-007, -1.81684379e-006, 0.999998629, 9.28639201e-006, 2.71003955e-007, 9.28639201e-006, 1)) | |
| 635 | mesh("SpecialMesh",Hitbox1,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(0.920000017, 0.368000001, 0.329999864))
| |
| 636 | Hitbox2=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,1,"Lime green","Hitbox2",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 637 | Hitbox2weld=weld(m,Center,Hitbox2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.13131714, 0.000480651855, 0.000106811523, -0.707104325, -0.707104445, 0.000228768389, 0.707107842, -0.707106829, 0.000209781603, 1.34258007e-005, 0.000310101605, 1)) | |
| 638 | mesh("SpecialMesh",Hitbox2,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(0.920000017, 0.368000001, 0.329999864))
| |
| 639 | Hitbox3=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,1,"Lime green","Hitbox3",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 640 | Hitbox3weld=weld(m,Center,Hitbox3,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.19998169, 0.000406503677, 7.62939453e-006, 0.999999642, -1.81684379e-006, 2.71003955e-007, -1.81684379e-006, 0.999998629, 9.28639201e-006, 2.71003955e-007, 9.28639201e-006, 1)) | |
| 641 | mesh("SpecialMesh",Hitbox3,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(0.920000017, 0.368000001, 0.329999864))
| |
| 642 | Hitbox4=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,1,"Lime green","Hitbox4",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 643 | Hitbox4weld=weld(m,Center,Hitbox4,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.13130951, 0.000442504883, -0.000122070313, 0.70710808, -0.707107663, 5.9657541e-006, 0.70710516, 0.707104683, -3.91977665e-006, -9.04705757e-007, 2.55630293e-005, 1)) | |
| 644 | mesh("SpecialMesh",Hitbox4,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(0.920000017, 0.368000001, 0.329999864))
| |
| 645 | Hitbox5=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,1,"Lime green","Hitbox5",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 646 | Hitbox5weld=weld(m,Center,Hitbox5,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.13146973, 0.000419616699, -0.000122070313, -0.70710808, 0.707107663, -0.000231138751, -0.70710516, -0.707104683, 0.000252452912, 1.50714714e-005, 0.000341950625, 1)) | |
| 647 | mesh("SpecialMesh",Hitbox5,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(0.920000017, 0.368000001, 0.329999864))
| |
| 648 | Hitbox6=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,1,"Lime green","Hitbox6",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 649 | Hitbox6weld=weld(m,Center,Hitbox6,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.19997478, 0.000411987305, 0.000183105469, -1.98085877e-006, 0.999998689, -1.33553549e-005, -0.999999642, 1.81745418e-006, 3.05094454e-006, 3.59292085e-006, 3.19282117e-005, 1)) | |
| 650 | mesh("SpecialMesh",Hitbox6,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(0.920000017, 0.368000001, 0.329999864))
| |
| 651 | Hitbox7=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,1,"Lime green","Hitbox7",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 652 | Hitbox7weld=weld(m,Center,Hitbox7,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.13132477, 0.000335693359, 0.000106811523, 0.707104683, 0.707104802, -2.76042265e-005, -0.70710808, 0.70710665, -2.73225814e-005, 7.40964424e-007, 5.74120495e-005, 1)) | |
| 653 | mesh("SpecialMesh",Hitbox7,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(0.920000017, 0.368000001, 0.329999864))
| |
| 654 | Hitbox8=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,1,"Lime green","Hitbox8",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
| 655 | Hitbox8weld=weld(m,Center,Hitbox8,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.19996178, -0.000503540039, -0.000175476074, -1.98085877e-006, 0.999998689, -1.33553549e-005, -0.999999642, 1.81745418e-006, 3.05094454e-006, 3.59292085e-006, 3.19282117e-005, 1)) | |
| 656 | mesh("SpecialMesh",Hitbox8,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(0.920000017, 0.368000001, 0.329999864))
| |
| 657 | ||
| 658 | local CurrentTransparency = 0.5 | |
| 659 | ||
| 660 | local Mode = "Defense" | |
| 661 | ||
| 662 | function Dissapear() | |
| 663 | attack = true | |
| 664 | Mode = "Defense" | |
| 665 | for _,i in pairs(m:children()) do | |
| 666 | coroutine.resume(coroutine.create(function(Part) | |
| 667 | for i=0,1,0.1 do | |
| 668 | swait() | |
| 669 | Hitbox1.Transparency=0.5*i | |
| 670 | Hitbox2.Transparency=0.5*i | |
| 671 | Hitbox3.Transparency=0.5*i | |
| 672 | Hitbox4.Transparency=0.5*i | |
| 673 | Hitbox5.Transparency=0.5*i | |
| 674 | Hitbox6.Transparency=0.5*i | |
| 675 | Hitbox7.Transparency=0.5*i | |
| 676 | Hitbox8.Transparency=0.5*i | |
| 677 | end | |
| 678 | Hitbox1.Transparency=1 | |
| 679 | Hitbox2.Transparency=1 | |
| 680 | Hitbox3.Transparency=1 | |
| 681 | Hitbox4.Transparency=1 | |
| 682 | Hitbox5.Transparency=1 | |
| 683 | Hitbox6.Transparency=1 | |
| 684 | Hitbox7.Transparency=1 | |
| 685 | Hitbox8.Transparency=1 | |
| 686 | end),i) | |
| 687 | end | |
| 688 | attack = false | |
| 689 | end | |
| 690 | ||
| 691 | function Reappear() | |
| 692 | attack = true | |
| 693 | Mode = "Attack" | |
| 694 | for _,i in pairs(m:children()) do | |
| 695 | coroutine.resume(coroutine.create(function(Part) | |
| 696 | for i=0,1,0.1 do | |
| 697 | swait() | |
| 698 | Hitbox1.Transparency=1*i | |
| 699 | Hitbox2.Transparency=1*i | |
| 700 | Hitbox3.Transparency=1*i | |
| 701 | Hitbox4.Transparency=1*i | |
| 702 | Hitbox5.Transparency=1*i | |
| 703 | Hitbox6.Transparency=1*i | |
| 704 | Hitbox7.Transparency=1*i | |
| 705 | Hitbox8.Transparency=1*i | |
| 706 | end | |
| 707 | Hitbox1.Transparency=0.5 | |
| 708 | Hitbox2.Transparency=0.5 | |
| 709 | Hitbox3.Transparency=0.5 | |
| 710 | Hitbox4.Transparency=0.5 | |
| 711 | Hitbox5.Transparency=0.5 | |
| 712 | Hitbox6.Transparency=0.5 | |
| 713 | Hitbox7.Transparency=0.5 | |
| 714 | Hitbox8.Transparency=0.5 | |
| 715 | end),i) | |
| 716 | end | |
| 717 | attack = false | |
| 718 | end | |
| 719 | ||
| 720 | function attackone() | |
| 721 | attack = true | |
| 722 | if Mode == "Attack" then | |
| 723 | for i = 0,1,0.05 do | |
| 724 | swait() | |
| 725 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(5),math.rad(0),math.rad(-50)),.3) | |
| 726 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(-3),math.rad(50)),.3) | |
| 727 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30), math.rad(10), math.rad(50)), 0.3) | |
| 728 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(50), math.rad(-10), math.rad(-20)), 0.3) | |
| 729 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(120),math.rad(5))*angles(math.rad(-2),math.rad(0),math.rad(0)),.3) | |
| 730 | LH.C0=clerp(LH.C0,cf(-1,-.9,0)*angles(math.rad(0),math.rad(-60),math.rad(-10))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
| 731 | Centerweld.C0 = clerp(Centerweld.C0,cf(0,0,0) *angles(6*i,math.rad(0),math.rad(0)),.3) | |
| 732 | end | |
| 733 | end | |
| 734 | attack = false | |
| 735 | end | |
| 736 | ||
| 737 | mouse.Button1Down:connect(function() | |
| 738 | if attack == false and attacktype == 1 then | |
| 739 | attacktype = 1 | |
| 740 | attackone() | |
| 741 | end | |
| 742 | end) | |
| 743 | ||
| 744 | mouse.KeyDown:connect(function(k) | |
| 745 | k=k:lower() | |
| 746 | if k=='q' then | |
| 747 | if Mode == "Defense" then | |
| 748 | Mode = "Attack" | |
| 749 | Reappear() | |
| 750 | elseif Mode == "Attack" then | |
| 751 | Mode = "Defense" | |
| 752 | Dissapear() | |
| 753 | end | |
| 754 | end | |
| 755 | end) | |
| 756 | ||
| 757 | ||
| 758 | local sine = 0 | |
| 759 | local change = 1 | |
| 760 | local val = 0 | |
| 761 | ||
| 762 | while true do | |
| 763 | swait() | |
| 764 | sine = sine + change | |
| 765 | local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
| 766 | local velderp=RootPart.Velocity.y | |
| 767 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
| 768 | if equipped==true or equipped==false then | |
| 769 | if attack==false then | |
| 770 | idle=idle+1 | |
| 771 | else | |
| 772 | idle=0 | |
| 773 | end | |
| 774 | if idle>=500 then | |
| 775 | if attack==false then | |
| 776 | end | |
| 777 | end | |
| 778 | if RootPart.Velocity.y > 1 and hitfloor==nil then | |
| 779 | Anim="Jump" | |
| 780 | if attack==false then | |
| 781 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
| 782 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
| 783 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3) | |
| 784 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3) | |
| 785 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3) | |
| 786 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3) | |
| 787 | end | |
| 788 | elseif RootPart.Velocity.y < -1 and hitfloor==nil then | |
| 789 | Anim="Fall" | |
| 790 | if attack==false then | |
| 791 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
| 792 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
| 793 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3) | |
| 794 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3) | |
| 795 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3) | |
| 796 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3) | |
| 797 | end | |
| 798 | elseif torvel<1 and hitfloor~=nil then | |
| 799 | Anim="Idle" | |
| 800 | if attack==false then | |
| 801 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(-30)),.3) | |
| 802 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-3),math.rad(-3),math.rad(30)),.3) | |
| 803 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(-10), math.rad(10)), 0.3) | |
| 804 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10), math.rad(-10), math.rad(-20)), 0.3) | |
| 805 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(5))*angles(math.rad(-2),math.rad(0),math.rad(0)),.3) | |
| 806 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-70),math.rad(-20))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
| 807 | Centerweld.C0 = clerp(Centerweld.C0,cf(0,0,0) *angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
| 808 | end | |
| 809 | elseif torvel>2 and hitfloor~=nil then | |
| 810 | Anim="Walk" | |
| 811 | if attack==false then | |
| 812 | change=3 | |
| 813 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.3) | |
| 814 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3) | |
| 815 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(10), math.rad(10), math.rad(10)), 0.3) | |
| 816 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(-10), math.rad(-20)), 0.3) | |
| 817 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-3),math.rad(0),math.rad(0)),.3) | |
| 818 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-3),math.rad(0),math.rad(0)),.3) | |
| 819 | Centerweld.C0 = clerp(Centerweld.C0,cf(0,0,0) *angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
| 820 | end | |
| 821 | end | |
| 822 | end | |
| 823 | if #Effects>0 then | |
| 824 | for e=1,#Effects do | |
| 825 | if Effects[e]~=nil then | |
| 826 | local Thing=Effects[e] | |
| 827 | if Thing~=nil then | |
| 828 | local Part=Thing[1] | |
| 829 | local Mode=Thing[2] | |
| 830 | local Delay=Thing[3] | |
| 831 | local IncX=Thing[4] | |
| 832 | local IncY=Thing[5] | |
| 833 | local IncZ=Thing[6] | |
| 834 | if Thing[1].Transparency<=1 then | |
| 835 | if Thing[2]=="Block1" then | |
| 836 | Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 837 | Mesh=Thing[1].Mesh | |
| 838 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
| 839 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 840 | elseif Thing[2]=="Cylinder" then | |
| 841 | Mesh=Thing[1].Mesh | |
| 842 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
| 843 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 844 | elseif Thing[2]=="Blood" then | |
| 845 | Mesh=Thing[7] | |
| 846 | Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0) | |
| 847 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
| 848 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 849 | elseif Thing[2]=="Elec" then | |
| 850 | Mesh=Thing[1].Mesh | |
| 851 | Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9]) | |
| 852 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 853 | elseif Thing[2]=="Disappear" then | |
| 854 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 855 | end | |
| 856 | else | |
| 857 | Part.Parent=nil | |
| 858 | table.remove(Effects,e) | |
| 859 | end | |
| 860 | end | |
| 861 | end | |
| 862 | end | |
| 863 | end | |
| 864 | end |