SHOW:
|
|
- or go back to the newest paste.
| 1 | local ply = game.Players.LocalPlayer | |
| 2 | char = ply.Character | |
| 3 | torso = char.Torso | |
| 4 | head = char.Head | |
| 5 | holding = false | |
| 6 | RS = game:service'RunService' | |
| 7 | larm,rarm = char['Left Arm'],char['Right Arm'] | |
| 8 | Debris = game:service'Debris' | |
| 9 | floatforce = 196.25 | |
| 10 | attacking = false | |
| 11 | lh,rh = torso['Left Hip'],torso['Right Hip'] | |
| 12 | curcam = Workspace.CurrentCamera | |
| 13 | mouse = ply:GetMouse() | |
| 14 | FFS = function(A,B) return A:FindFirstChild(B) end ---- FindFirstChild Shortcut | |
| 15 | function genNew(ClassName, Parent, Properties) | |
| 16 | local nObj = Instance.new(ClassName, Parent) | |
| 17 | if Properties["FormFactor"] then | |
| 18 | nObj["FormFactor"] = Properties["FormFactor"] | |
| 19 | end | |
| 20 | for Prop, Value in pairs(Properties) do | |
| 21 | nObj[Prop] = Value | |
| 22 | end | |
| 23 | return nObj | |
| 24 | end | |
| 25 | pcall(function() char.Sole:Destroy() end) --- Destroys Physical Tool | |
| 26 | Weapon = Instance.new("Model",char) Weapon.Name = 'Sole'
| |
| 27 | cfn,ang,md,mr = CFrame.new,CFrame.Angles,math.rad,math.random --- Some Shortcuts | |
| 28 | udim = function(a,b) | |
| 29 | if type(a) ~= 'string' then | |
| 30 | return UDim2.new(a,0,b,0) | |
| 31 | else | |
| 32 | local x,y = a:match('(%.*%d+)%,(%.*%d+)')
| |
| 33 | return UDim2.new(x,0,y,0) | |
| 34 | end | |
| 35 | end | |
| 36 | for i,v in pairs(head:children()) do | |
| 37 | if v.Name == 'MugSound' then v:Destroy() end | |
| 38 | end | |
| 39 | Name = 'Seokinji' | |
| 40 | pcall(function() ply.Backpack[Name]:Destroy() end) --- Destroys Tool | |
| 41 | hop = Instance.new('HopperBin',ply.Backpack)
| |
| 42 | hop.Name = Name | |
| 43 | rw,lw = _,_ | |
| 44 | Col3 = function(r,g,b) return Color3.new(r/255,g/255,b/255) end | |
| 45 | udim = function(x,y) return UDim2.new(x,0,y,0) end | |
| 46 | bcol = BrickColor.new | |
| 47 | ---TOOLS--- | |
| 48 | Add ={ --- Array for handy functions
| |
| 49 | BG = function(parent) | |
| 50 | local bg = Instance.new("BodyGyro",parent)
| |
| 51 | bg.P = 20e+003 | |
| 52 | bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge | |
| 53 | return bg | |
| 54 | end; | |
| 55 | BP = function(parent,position) | |
| 56 | local bp = Instance.new("BodyPosition",parent)
| |
| 57 | bp.maxForce = Vector3.new()*math.huge | |
| 58 | bp.position = position or parent.Position | |
| 59 | return bp | |
| 60 | end; | |
| 61 | BV = function(parent,force) | |
| 62 | local bv = Instance.new("BodyVelocity",parent)
| |
| 63 | bv.maxForce = Vector3.new()*math.huge | |
| 64 | bv.velocity = force or Vector3.new(0,0,0) | |
| 65 | return bv | |
| 66 | end; | |
| 67 | Sound = function(id,pitch,parent) | |
| 68 | local tab = {}
| |
| 69 | local snd = Instance.new("Sound",char.Head)
| |
| 70 | snd.Name = 'MugSound' | |
| 71 | snd.SoundId = id | |
| 72 | snd.Pitch = pitch or 1 | |
| 73 | tab.Sound = snd | |
| 74 | function tab:Play() | |
| 75 | self.Sound:Play() | |
| 76 | end | |
| 77 | function tab:Stop() | |
| 78 | self.Sound:Stop() | |
| 79 | end | |
| 80 | function tab:Pitch(a) | |
| 81 | self.Sound.Pitch = a | |
| 82 | end | |
| 83 | setmetatable(tab,{
| |
| 84 | __call = function(t,param) local cl = t.Sound:Clone() cl.Parent = param return cl end; | |
| 85 | }) | |
| 86 | return tab | |
| 87 | end; | |
| 88 | Fire = function(parent,size,heat,color,color2) | |
| 89 | local f = Instance.new("Fire",parent)
| |
| 90 | f.Size = size | |
| 91 | f.Heat = heat | |
| 92 | f.Color = BrickColor.new(color).Color | |
| 93 | if color2 then | |
| 94 | f.SecondaryColor = BrickColor.new(color2).Color | |
| 95 | end | |
| 96 | return f | |
| 97 | end; | |
| 98 | } | |
| 99 | function l(a,x,y,z,xx,yy,zz) | |
| 100 | if string.find(tostring(a),',') == _ then | |
| 101 | return (a.CFrame * cfn(x,y,z))*ang(xx or 0,yy or 0,zz or 0) | |
| 102 | else | |
| 103 | return (a * cfn(x,y,z))*ang(xx or 0,yy or 0,zz or 0) | |
| 104 | end | |
| 105 | end | |
| 106 | Cur_Parent = _ | |
| 107 | Part = function(x,y,z,color,tr,cc,an,parent) | |
| 108 | local p = Instance.new('Part',parent or Cur_Parent or Weapon)
| |
| 109 | p.formFactor = 'Custom' | |
| 110 | p.Locked = true | |
| 111 | p.Size = Vector3.new(x,y,z) | |
| 112 | - | p.BrickColor = BrickColor.new(color or 'Black') |
| 112 | + | p.BrickColor = BrickColor.new(color or 'White') |
| 113 | p.CanCollide = cc or false | |
| 114 | p.Anchored = an or false | |
| 115 | p.Transparency = tr or 0 | |
| 116 | p.TopSurface,p.BottomSurface = 0,0 | |
| 117 | return p | |
| 118 | end | |
| 119 | Wedge = function(x,y,z,color,tr,cc,an,parent) | |
| 120 | local p = Instance.new('WedgePart',parent or Weapon)
| |
| 121 | p.formFactor = 'Custom' | |
| 122 | p.Size = Vector3.new(x,y,z) | |
| 123 | - | p.BrickColor = BrickColor.new(color or 'Black') |
| 123 | + | p.BrickColor = BrickColor.new(color or 'White') |
| 124 | p.CanCollide = cc or false | |
| 125 | p.Anchored = an or false | |
| 126 | p.Transparency = tr or 0 | |
| 127 | p.TopSurface,p.BottomSurface = 0,0 | |
| 128 | return p | |
| 129 | end | |
| 130 | Meshes = {Diamond = 'rbxassetid://9756362'; Spikeball = 'rbxassetid://9982590'; Table = 'rbxassetid://111868131'; --- MeshIds
| |
| 131 | Egg = 'rbxassetid://1527559'; Ring = 'rbxassetid://3270017'; Bullet = 'rbxassetid://2697549'; Grass = 'rbxassetid://1080954'; | |
| 132 | Shark = 'rbxassetid://82821384';Sword = 'rbxassetid://12221720'} | |
| 133 | Mesh = function(par,num,x,y,z,tex) | |
| 134 | local msh = _ | |
| 135 | if num == 1 then msh = Instance.new("CylinderMesh",par)
| |
| 136 | elseif num == 2 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 3
| |
| 137 | elseif num == 3 then msh = Instance.new("BlockMesh",par)
| |
| 138 | elseif type(num) == 'string' then msh = Instance.new("SpecialMesh",par)
| |
| 139 | msh.MeshId = string.find(num,'://') == _ and Meshes[num] or num | |
| 140 | msh.TextureId = tex and tex or '' | |
| 141 | end | |
| 142 | msh.Scale = Vector3.new(x or 1,y or 1,z or 1) | |
| 143 | return msh | |
| 144 | end | |
| 145 | Weld = function(p0,p1,x,y,z,rx,ry,rz,par) | |
| 146 | p0.Position = p1.Position | |
| 147 | local w = Instance.new('Motor',par or p0)
| |
| 148 | w.Part0 = p1 | |
| 149 | w.Part1 = p0 | |
| 150 | w.C0 = CFrame.new(x or 0,y or 0,z or 0)*CFrame.Angles(rx or 0,ry or 0,rz or 0) | |
| 151 | w.MaxVelocity = .1 | |
| 152 | return w | |
| 153 | end | |
| 154 | GetGround = function(position,radius) local result = _ --- Check's height from nearest object | |
| 155 | local r = Ray.new(position,Vector3.FromNormalId(Enum.NormalId.Bottom)*radius) | |
| 156 | local o,p = Workspace:FindPartOnRay(r,char) | |
| 157 | if o and p then result = {}
| |
| 158 | result.obj = o | |
| 159 | result.pos = p | |
| 160 | result.mag = (position-p).magnitude | |
| 161 | end | |
| 162 | return result | |
| 163 | end | |
| 164 | gTorso = char.Torso | |
| 165 | ftorso = _ | |
| 166 | function genNew(ClassName, Parent, Properties) | |
| 167 | local nObj = Instance.new(ClassName, Parent) | |
| 168 | if Properties["FormFactor"] then | |
| 169 | nObj["FormFactor"] = Properties["FormFactor"] | |
| 170 | end | |
| 171 | for Prop, Value in pairs(Properties) do | |
| 172 | nObj[Prop] = Value | |
| 173 | end | |
| 174 | return nObj | |
| 175 | end | |
| 176 | --Anim | |
| 177 | Lock = function(which) --- For using Animation | |
| 178 | local torso = ftorso or gTorso | |
| 179 | local result = {rw=false,lw=false}
| |
| 180 | if which == 'R' then | |
| 181 | if not rw then | |
| 182 | rabr = Part(1,1,1,'White',0) rabr.Transparency = 1 | |
| 183 | rabr.Position = torso.Position | |
| 184 | rw = Weld(rabr,torso,1.5,.5,0,0,0,0) rw.Parent = Weapon rw.Name = 'rw' | |
| 185 | w = Instance.new("Weld",Weapon)
| |
| 186 | w.Part0,w.Part1 = char['Right Arm'],rabr | |
| 187 | w.C1 = CFrame.new(0,-.5,0) | |
| 188 | else | |
| 189 | rabr:Destroy() | |
| 190 | rw = _ | |
| 191 | end | |
| 192 | elseif which == 'L' then | |
| 193 | if not lw then | |
| 194 | labr = Part(1,1,1,'White',0) labr.Transparency = 1 | |
| 195 | labr.Position = torso.Position | |
| 196 | lw = Weld(labr,torso,-1.5,.5,0,0,0,0) lw.Parent = Weapon rw.Name = 'lw' | |
| 197 | w = Instance.new("Weld",Weapon)
| |
| 198 | w.Part0,w.Part1 = char['Left Arm'],labr | |
| 199 | w.C1 = CFrame.new(0,-.5,0) | |
| 200 | else | |
| 201 | labr:Destroy() | |
| 202 | lw = _ | |
| 203 | end | |
| 204 | elseif which == _ then | |
| 205 | if b then | |
| 206 | local rw,lw = FFS(b,'rw') FFS(b,'lw') | |
| 207 | return rw,lw | |
| 208 | else | |
| 209 | return rw,lw | |
| 210 | end | |
| 211 | end | |
| 212 | end | |
| 213 | Lock2 = function(which) --- For using Animation | |
| 214 | local torso = ftorso or gTorso | |
| 215 | local result = {rw2=false,lw2=false}
| |
| 216 | if which == 'R' then | |
| 217 | if not rw2 then | |
| 218 | rlbr = Part(1,1,1,'White',0) rlbr.Transparency = 1 | |
| 219 | rlbr.Position = torso.Position | |
| 220 | rw2 = Weld(rlbr,torso,.5,-1.5,0,0,0,0) rw2.Parent = Weapon rw2.Name = 'rw2' | |
| 221 | w = Instance.new("Weld",Weapon)
| |
| 222 | w.Part0,w.Part1 = char['Right Leg'],rlbr | |
| 223 | w.C1 = CFrame.new(0,-.5,0) | |
| 224 | else | |
| 225 | rlbr:Destroy() | |
| 226 | rw2 = _ | |
| 227 | end | |
| 228 | elseif which == 'L' then | |
| 229 | if not lw2 then | |
| 230 | llbr = Part(1,1,1,'White',0) llbr.Transparency = 1 | |
| 231 | llbr.Position = torso.Position | |
| 232 | lw2 = Weld(llbr,torso,-.5,-1.5,0,0,0,0) lw2.Parent = Weapon lw2.Name = 'lw2' | |
| 233 | w = Instance.new("Weld",Weapon)
| |
| 234 | w.Part0,w.Part1 = char['Left Leg'],llbr | |
| 235 | w.C1 = CFrame.new(0,-.5,0) | |
| 236 | else | |
| 237 | llbr:Destroy() | |
| 238 | lw2 = _ | |
| 239 | end | |
| 240 | elseif which == _ then | |
| 241 | if b then | |
| 242 | local rw2,lw2 = FFS(b,'rw2') FFS(b,'lw2') | |
| 243 | return rw2,lw2 | |
| 244 | else | |
| 245 | return rw2,lw2 | |
| 246 | end | |
| 247 | end | |
| 248 | end | |
| 249 | tw = function(Weld, Stop, Step,a) --- TweenWeld function | |
| 250 | local func = function() | |
| 251 | local Start = Weld.C1 | |
| 252 | local X1, Y1, Z1 = Start:toEulerAnglesXYZ() | |
| 253 | local Stop = Stop | |
| 254 | local X2, Y2, Z2 = Stop:toEulerAnglesXYZ() | |
| 255 | ||
| 256 | for i = 0, 1, Step or .1 do | |
| 257 | Weld.C1 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i), | |
| 258 | (Start.p.Y * (1 - i)) + (Stop.p.Y * i), | |
| 259 | (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ( | |
| 260 | (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i), | |
| 261 | (Z1 * (1 - i)) + (Z2 * i) ) | |
| 262 | wait() | |
| 263 | end | |
| 264 | ||
| 265 | Weld.C1 = Stop | |
| 266 | end | |
| 267 | if a then coroutine.wrap(function() func() end)() else func() end | |
| 268 | end | |
| 269 | tw2 = function(Weld, Stop, Step,a) --- TweenWeld function | |
| 270 | local func = function() | |
| 271 | local Start = Weld.C0 | |
| 272 | local X1, Y1, Z1 = Start:toEulerAnglesXYZ() | |
| 273 | local Stop = Stop | |
| 274 | local X2, Y2, Z2 = Stop:toEulerAnglesXYZ() | |
| 275 | ||
| 276 | for i = 0, 1, Step or .1 do | |
| 277 | Weld.C0 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i), | |
| 278 | (Start.p.Y * (1 - i)) + (Stop.p.Y * i), | |
| 279 | (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ( | |
| 280 | (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i), | |
| 281 | (Z1 * (1 - i)) + (Z2 * i) ) | |
| 282 | wait() | |
| 283 | end | |
| 284 | ||
| 285 | Weld.C0 = Stop | |
| 286 | end | |
| 287 | if a then coroutine.wrap(function() func() end)() else func() end | |
| 288 | end | |
| 289 | tc = function(Part, Stop, Step,a) --- TweenCFrame function | |
| 290 | local func = function() | |
| 291 | local Start = Part.CFrame | |
| 292 | local X1, Y1, Z1 = Start:toEulerAnglesXYZ() | |
| 293 | local Stop = Stop | |
| 294 | local X2, Y2, Z2 = Stop:toEulerAnglesXYZ() | |
| 295 | ||
| 296 | for i = 0, 1, Step or .1 do | |
| 297 | Part.CFrame = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i), | |
| 298 | (Start.p.Y * (1 - i)) + (Stop.p.Y * i), | |
| 299 | (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ( | |
| 300 | (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i), | |
| 301 | (Z1 * (1 - i)) + (Z2 * i) ) | |
| 302 | wait() | |
| 303 | end | |
| 304 | ||
| 305 | Part.CFrame = Stop | |
| 306 | end | |
| 307 | if a then coroutine.wrap(function() func() end)() else func() end | |
| 308 | end | |
| 309 | --/Anim | |
| 310 | --SFX | |
| 311 | Sparks = function(part,position,radius,number,number2) | |
| 312 | local part = part | |
| 313 | part.Parent = _ | |
| 314 | mode = Instance.new("Model",Weapon)
| |
| 315 | for i = 1,number2 do | |
| 316 | local pos = position+Vector3.new(mr(-radius,radius),mr(-radius,radius),mr(-radius,radius)) | |
| 317 | local mag = (position-pos).magnitude | |
| 318 | local laz = part:Clone() laz.Parent = mode laz.Anchored = true | |
| 319 | laz.Size = Vector3.new(laz.Size.x,mag,laz.Size.z) | |
| 320 | --Mesh(laz,1,1,1,1) | |
| 321 | laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0) | |
| 322 | cframe = (laz.CFrame*cfn(0,-mag/2,0)).p | |
| 323 | pos2 = cframe+Vector3.new(mr(-radius,radius),mr(-radius,radius),mr(-radius,radius)) | |
| 324 | mag2 = (cframe-pos2).magnitude | |
| 325 | local laz2 = part:Clone() laz2.Parent = mode | |
| 326 | laz2.Size = Vector3.new(laz.Size.x,mag2,laz.Size.z) laz2.Anchored = true | |
| 327 | --Mesh(laz2,1,1,1,1) | |
| 328 | laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0) | |
| 329 | previo = laz2 | |
| 330 | for i = 1,number do | |
| 331 | cframe = (previo.CFrame*cfn(0,-mag/2,0)).p | |
| 332 | pos2 = cframe+Vector3.new(mr(-radius,radius),mr(-radius,radius),mr(-radius,radius)) | |
| 333 | mag2 = (cframe-pos2).magnitude | |
| 334 | laz2 = part:Clone() laz2.Parent = mode | |
| 335 | laz2.Size = Vector3.new(laz.Size.x,mag2,laz.Size.z) laz2.Anchored = true | |
| 336 | --Mesh(laz2,1,1,1,1) | |
| 337 | laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0) | |
| 338 | previo = laz2 | |
| 339 | end | |
| 340 | end | |
| 341 | Debris:AddItem(mode,.1) | |
| 342 | return mode | |
| 343 | end | |
| 344 | function trace(obj,cf,color,delay,t,thick) -- offset,color,delay,transparency,thickness | |
| 345 | if type(thick) == 'table' then | |
| 346 | x,y = thick[1],thick[2] | |
| 347 | else | |
| 348 | x,y = thick,thick | |
| 349 | end | |
| 350 | local name | |
| 351 | for i,v in pairs(getfenv()) do | |
| 352 | if v == obj then name = i end | |
| 353 | end | |
| 354 | getfenv()[name..'tr'] = true | |
| 355 | local prev = obj.CFrame | |
| 356 | coroutine.wrap(function() | |
| 357 | while getfenv()[name..'tr'] do | |
| 358 | local cf = obj.CFrame*cf | |
| 359 | local mag = (prev.p-cf.p).magnitude | |
| 360 | - | local p = Part(x or .1,mag,y or .1,color or 'Black',t or .5) p.Anchored = true |
| 360 | + | local p = Part(x or .1,mag,y or .1,color or 'White',t or .5) p.Anchored = true |
| 361 | if type(thick) ~= 'table' then Mesh(p,1) end | |
| 362 | p.CFrame = (cfn(prev.p,cf.p)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0) | |
| 363 | Debris:AddItem(p,delay or 1) | |
| 364 | prev = cf | |
| 365 | wait() | |
| 366 | end end)() | |
| 367 | end | |
| 368 | Lightning = function(p0,p1,tym,ofs,col,th,tra) -- start end times offset color thickness | |
| 369 | local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
| |
| 370 | for i=1,tym do | |
| 371 | li = Part(th,th,magz/tym,col,tra or .4) li.Anchored = true | |
| 372 | local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) | |
| 373 | local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz | |
| 374 | if tym == i then | |
| 375 | local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2) | |
| 376 | li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2) | |
| 377 | else | |
| 378 | li.CFrame = cfn(curpos,trolpos)*cfn(0,0,magz/tym/2) | |
| 379 | end | |
| 380 | curpos = li.CFrame*cfn(0,0,magz/tym/2).p Debris:AddItem(li,0.25) | |
| 381 | end | |
| 382 | end | |
| 383 | --/SFX | |
| 384 | - | --Weapon |
| 384 | + | |
| 385 | - | hdl = Part(.25,4,.25,'Really Black') |
| 385 | + | |
| 386 | - | hw = Weld(hdl,rarm,0,-1,0,-math.pi/2) |
| 386 | + | |
| 387 | - | Mesh(hdl,1) |
| 387 | + | |
| 388 | - | ydin = Part(.5,.5,.5,'Bright red') |
| 388 | + | |
| 389 | - | Weld(ydin,hdl,0,2.25,0) |
| 389 | + | |
| 390 | - | Mesh(ydin,2) |
| 390 | + | |
| 391 | - | tip = Part(1,2,1,'Bright red',.5) |
| 391 | + | |
| 392 | - | tipw = Weld(tip,ydin,0,.6,0) |
| 392 | + | |
| 393 | - | Mesh(tip,2,1,1,1) |
| 393 | + | |
| 394 | - | plate = Part(2,.1,2,'Black') Mesh(plate,1,.5,.5,.5) |
| 394 | + | |
| 395 | - | Weld(plate,hdl,0,2,0) |
| 395 | + | |
| 396 | - | r = .5 |
| 396 | + | |
| 397 | - | for i = 1,360,30 do |
| 397 | + | |
| 398 | - | p = Part(.11,.1,.1,'Black') Mesh(p,3,1,1,.5) |
| 398 | + | |
| 399 | - | Weld(p,plate,math.cos(md(i))*r,0,math.sin(md(i))*r,math.pi/2,0,math.pi/2+md(i)) |
| 399 | + | |
| 400 | - | p2 = Part(.35,.1,.1,'Black') Mesh(p2,3,1,.5,.5) |
| 400 | + | |
| 401 | - | Weld(p2,p,0,r*2.25,0) |
| 401 | + | |
| 402 | function stab() Lock'L' | |
| 403 | - | r = .1 |
| 403 | + | |
| 404 | - | for i = 0,1,.05 do |
| 404 | + | |
| 405 | - | if i%5 == 0 then wait() end |
| 405 | + | |
| 406 | - | p = Part(.1,.1,.1,'Black') Mesh(p,2) |
| 406 | + | |
| 407 | - | Weld(p,hdl,math.cos(md(i*360*3))*r,-2+i*4,math.sin(md(i*360*3))*r) |
| 407 | + | |
| 408 | tw(rw,cfn(-.2,.3,.2)*ang(md(-130),md(-45),md(-10)),.1,'') --Rise | |
| 409 | - | p = Part(1,1,1,'Cyan') |
| 409 | + | |
| 410 | - | Weld(p,hdl,0,-2,0,math.pi/2) |
| 410 | + | |
| 411 | - | Mesh(p,'Diamond',.5,.5,.5) |
| 411 | + | |
| 412 | - | --/Weapon |
| 412 | + | |
| 413 | tipw.C0 = cfn(0,.6+i*1.5,0) | |
| 414 | - | ftw = _ |
| 414 | + | |
| 415 | - | function FindHum(a) result = _ |
| 415 | + | |
| 416 | - | for i,v in pairs(a:children()) do |
| 416 | + | |
| 417 | - | if v:IsA'Humanoid' then result = v end |
| 417 | + | |
| 418 | end | |
| 419 | tw(rw,cfn(-.2,.3,.2)*ang(md(-130),md(-45),md(-50)),.1,'') --Rise | |
| 420 | for i = 0,1,.1 do wait() --Morph | |
| 421 | - | function Equip() |
| 421 | + | |
| 422 | - | Lock'R' --Lock'L' |
| 422 | + | |
| 423 | - | PutBack'F' |
| 423 | + | |
| 424 | - | tw(rw,cfn()*ang(0,0,md(-5)),.1) |
| 424 | + | |
| 425 | - | --tw(lw,cfn()*ang(0,0,md(15))) |
| 425 | + | |
| 426 | - | equip = rw.C1 --equip2 = lw.C1 |
| 426 | + | |
| 427 | tw(rw,cfn()*ang(md(40),md(0),md(-10)),.3) --Down | |
| 428 | - | function Unequip() PutBack'T' |
| 428 | + | |
| 429 | - | Lock'R' --Lock'L' |
| 429 | + | |
| 430 | tw(rw,equip,.1,'') --Back | |
| 431 | - | BackPos = cfn(0,0,.6)*ang(0,0,md(45)) |
| 431 | + | |
| 432 | - | HoldPos = cfn(0,-1,0)*ang(-math.pi/2,0,0) |
| 432 | + | |
| 433 | - | function PutBack(a) |
| 433 | + | |
| 434 | - | if a == 'T' then |
| 434 | + | |
| 435 | - | hw.Part0 = torso |
| 435 | + | |
| 436 | - | hw.C0 = BackPos |
| 436 | + | |
| 437 | - | elseif a == 'F' then |
| 437 | + | |
| 438 | - | hw.Part0 = rarm |
| 438 | + | |
| 439 | - | hw.C0 = HoldPos |
| 439 | + | |
| 440 | function trip() | |
| 441 | Lock2'R' | |
| 442 | - | PutBack'T' |
| 442 | + | |
| 443 | - | --funcs |
| 443 | + | |
| 444 | - | local function check(k) local downed = false |
| 444 | + | |
| 445 | - | if not Keys[k] then downed = true else downed = false end |
| 445 | + | |
| 446 | - | return downed |
| 446 | + | |
| 447 | tw(rw2,cfn(0,-.2,-.3)*ang(md(30),0,0)) Whoosh:Play() | |
| 448 | - | local function WK(key) |
| 448 | + | |
| 449 | - | return (Keys[key] and downed) |
| 449 | + | |
| 450 | Lock2'R' | |
| 451 | - | local function CreateLoop(tim,keys) local count = 0 |
| 451 | + | |
| 452 | - | while count < tim do |
| 452 | + | |
| 453 | - | for i,v in pairs(keys) do |
| 453 | + | |
| 454 | - | if WK(i) then v(mouse) return end |
| 454 | + | |
| 455 | Lock2'R' Lock2'L' Lock'L' | |
| 456 | - | count = count+1 |
| 456 | + | |
| 457 | sitbg = Add.BG(torso) | |
| 458 | --rw2.C1 = cfn()*ang(md(i),0,md(i/(90/-30))) | |
| 459 | --lw2.C1 = cfn()*ang(md(i),0,md(i/(90/30))) | |
| 460 | - | --/funcs |
| 460 | + | |
| 461 | - | function lerp(a,b,c) |
| 461 | + | |
| 462 | - | return a+(b-a)*c |
| 462 | + | |
| 463 | tw(lw,cfn()*ang(md(25),0,md(20)),.1,'') --larm down | |
| 464 | cf = torso.CFrame | |
| 465 | for i = 0,1,.1 do wait() | |
| 466 | sitbp.position = torso.Position - Vector3.new(0,i*1.25,0) | |
| 467 | sitbg.cframe = cf*ang(md(i*20),0,0) | |
| 468 | end | |
| 469 | elseif sitbp ~= nil then | |
| 470 | --rw2.C1 = cfn()*ang(md(i),0,md(i/(90/-30))) | |
| 471 | --lw2.C1 = cfn()*ang(md(i),0,md(i/(90/30))) | |
| 472 | tw(rw2,cfn(),.1,'') | |
| 473 | tw(lw2,cfn(),.1,'') tw(rw,equip,.1,'') | |
| 474 | for i = 0,1,.1 do wait() | |
| 475 | sitbp.position = torso.Position + Vector3.new(0,i,0) | |
| 476 | sitbg.cframe = cf*cfn(-i,-i,-i) | |
| 477 | end | |
| 478 | Lock2'R' Lock2'L' Lock'L' | |
| 479 | sitbp:Remove() sitbg:Destroy() sitbp = nil sitbg = _ | |
| 480 | end | |
| 481 | end | |
| 482 | Crack = Add.Sound("http://www.roblox.com/Asset/?id=15933756",1)
| |
| 483 | Crack.Sound.Volume = 300 | |
| 484 | function blast() local list = {}
| |
| 485 | tw(rw,cfn()*ang(md(-120),0,0),.1,'') | |
| 486 | tw(hw,cfn()*ang(md(45),0,0)) | |
| 487 | met = Part(1,1,1,'White',0,1,1) | |
| 488 | holding = true | |
| 489 | mag = 1 maxmag = 15 | |
| 490 | while holding do mag = mag < maxmag and mag+.5 or maxmag | |
| 491 | met.Size = Vector3.new(1,mag*7,1) | |
| 492 | met.CFrame = l(l(torso,0,0,-7),0,0,-mag*7/2,math.pi/2) | |
| 493 | wait() | |
| 494 | end | |
| 495 | met:Destroy() | |
| 496 | tcf = torso.CFrame | |
| 497 | for y = 0,mag do | |
| 498 | local ground = GetGround(l(tcf,0,0,-7-y*7).p,300) | |
| 499 | if ground.pos then | |
| 500 | cf = cfn(ground.pos) | |
| 501 | end | |
| 502 | for i = 1,15 do local tab = {}
| |
| 503 | p = Part(1,1,1,i%2 == 0 and 'White' or 'Cyan',0,1,1) | |
| 504 | p.CFrame = l(cf,mr(-5,5),0,mr(-5,5)) | |
| 505 | tab.obj = p | |
| 506 | tab.cf = p.CFrame | |
| 507 | tab.size = mr(5,10) | |
| 508 | table.insert(list,tab) | |
| 509 | end | |
| 510 | end Crack:Play() | |
| 511 | for i = 0,1,.2 do wait() | |
| 512 | for _,v in pairs(list) do | |
| 513 | v.obj.Size = Vector3.new(1,v.size*i,1) | |
| 514 | v.obj.CFrame = v.cf*cfn(0,v.size*i/2,0) | |
| 515 | end | |
| 516 | end | |
| 517 | Delay(4,function() | |
| 518 | for i = 1,0,-.2 do wait() | |
| 519 | for _,v in pairs(list) do | |
| 520 | v.obj.Size = Vector3.new(1,v.size*i,1) | |
| 521 | v.obj.CFrame = v.cf*cfn(0,v.size*i/2,0) | |
| 522 | end | |
| 523 | end | |
| 524 | for _,v in pairs(list) do | |
| 525 | v.obj:Destroy() | |
| 526 | end end) | |
| 527 | tw(rw,equip,.1,'') tw(hw,cfn()) | |
| 528 | end | |
| 529 | Cages = {}
| |
| 530 | function shoudon(mouse) a = 0 | |
| 531 | Mod = Instance.new('Model',Weapon)
| |
| 532 | Cur_Parent = Mod | |
| 533 | p = Part(1,1,1,'Black',1) p.Anchored = true | |
| 534 | holding = true | |
| 535 | genNew('SelectionBox',p,{
| |
| 536 | Adornee = p; | |
| 537 | Color = bcol'Cyan'; | |
| 538 | }) | |
| 539 | cf = mouse.hit | |
| 540 | while holding do wait() a = a+1 | |
| 541 | if Keys.e then for i,v in pairs(Cages) do v:Destroy() end p:Destroy() Cages = {}
| |
| 542 | return end | |
| 543 | p.Size = Vector3.new(a,a,a) | |
| 544 | p.CFrame = cfn(cf.p)*cfn(0,a/2,0) | |
| 545 | end | |
| 546 | ||
| 547 | for i = 1,0,-.1 do | |
| 548 | wait() | |
| 549 | p.Transparency = i | |
| 550 | end | |
| 551 | for _,y in pairs({-a/2+.5,a/2+.5}) do
| |
| 552 | for _,pos in pairs({ {x=a/2,z=0};{x=-a/2,z=0};{z=a/2,x=0,r=1};{z=-a/2,x=0,r=1} }) do
| |
| 553 | w = Part(1,1,a+1,'Black',0,1,1) | |
| 554 | w.CFrame = l(p,pos.x,y,pos.z,0,pos.r and math.pi/2 or 0) | |
| 555 | w = Part(1,a-1,a-1,'Cyan',.5,1,1) | |
| 556 | w.CFrame = l(p,pos.x,.5,pos.z,0,pos.r and math.pi/2 or 0) | |
| 557 | end | |
| 558 | end | |
| 559 | w = Part(1,a-1,a-1,'Cyan',.5,1,1) | |
| 560 | w.CFrame = l(p,0,a/2,0,0,0,math.pi/2) | |
| 561 | w = Part(1,a-1,a-1,'Cyan',.5,1,1) | |
| 562 | w.CFrame = l(p,0,-a/2,0,0,0,math.pi/2) | |
| 563 | for i,pos in pairs({ {x=a/2,z=a/2};{x=-a/2,z=-a/2};{z=a/2,x=-a/2};{z=-a/2,x= a/2} }) do
| |
| 564 | w = Part(1,a,1,'Black',0,1,1) | |
| 565 | w.CFrame = l(p,pos.x,0,pos.z,0) | |
| 566 | - | met = Part(1,1,1,'Black',0,1,1) |
| 566 | + | |
| 567 | table.insert(Cages,Mod) Cur_Parent = _ | |
| 568 | for i = 0,1,.1 do | |
| 569 | wait() | |
| 570 | p.Transparency = i | |
| 571 | end | |
| 572 | p:Destroy() | |
| 573 | end | |
| 574 | for i,v in pairs(torso:children()) do if v:IsA'BodyGyro' or v:IsA'BodyPosition' or v:IsA'BodyVelocity' then v:Destroy() end end | |
| 575 | function teleport(mouse) char.archivable = true | |
| 576 | coroutine.wrap(function() loopi = true a = 0 | |
| 577 | repeat a = a+1 | |
| 578 | local p = Part(5,5,5,a%2 == 0 and 'White' or 'Cyan',.5) | |
| 579 | p.CFrame = l(torso,0,0,0,mr(-10,10),mr(-10,10),mr(-10,10)) | |
| 580 | Debris:AddItem(p,.1) wait() | |
| 581 | until not loopi | |
| 582 | - | p = Part(1,1,1,i%2 == 0 and 'Black' or 'Bright red',0,1,1) |
| 582 | + | |
| 583 | tc(torso,cfn(mouse.hit.p)*cfn(0,5,0),.1) | |
| 584 | loopi = false | |
| 585 | end | |
| 586 | function loud() | |
| 587 | tw(rw,cfn()*ang(md(40),md(-25),0),.1,'') | |
| 588 | for i = 0,1,.1 do wait() | |
| 589 | tip.Size = Vector3.new(1+i*1,2-i*1.5,1+i*1) | |
| 590 | tipw.Parent = ydin | |
| 591 | tipw.Part1 = tip | |
| 592 | end | |
| 593 | e = Instance.new("Explosion",Workspace)
| |
| 594 | e.BlastPressure = 0 | |
| 595 | e.Position = tip.Position | |
| 596 | e.Hit:connect(function(hit) | |
| 597 | local hum = FindHum(hit.Parent) | |
| 598 | if hum and hum.Parent ~= char then | |
| 599 | hum.Health = hum.Health -(3) | |
| 600 | hum.Sit = true | |
| 601 | hum.Torso.Velocity = cfn(e.Position,Vector3.new(hum.Torso.Position.x,torso.Position.y,hum.Torso.Position.z)).lookVector*100 | |
| 602 | end | |
| 603 | end) | |
| 604 | coroutine.wrap(function() | |
| 605 | local p = Part(1,1,1,'Cyan',.5,1,0) | |
| 606 | p.CFrame = cfn(tip.CFrame.p)*ang(math.pi/2,0,0) | |
| 607 | msh = Mesh(p,'Ring') | |
| 608 | for i = 1,30 do wait() | |
| 609 | msh.Scale = Vector3.new(i,i,1) | |
| 610 | p.Transparency = i/30 | |
| 611 | end | |
| 612 | p:Destroy() | |
| 613 | end)() | |
| 614 | q = Add.BV(torso,cfn(l(torso).p,l(torso,0,2,5).p).lookVector*100) | |
| 615 | Debris:AddItem(q,.5) | |
| 616 | - | Color = bcol'Bright red'; |
| 616 | + | |
| 617 | for i = 1,0,-.1 do wait() | |
| 618 | tip.Size = Vector3.new(1+i*1,2-i*1.5,1+i*1) | |
| 619 | tipw.Parent = ydin | |
| 620 | tipw.Part1 = tip | |
| 621 | end | |
| 622 | end | |
| 623 | --/Attacks | |
| 624 | --Sounds | |
| 625 | Synth = Add.Sound("http://www.roblox.com/Asset/?id=46153268",1)
| |
| 626 | --/Sounds | |
| 627 | --http://www.roblox.com/asset/?id=107431751 | |
| 628 | --http://www.roblox.com/asset/?id=107431876 | |
| 629 | klist = { --- Key Bindings
| |
| 630 | f = slash; | |
| 631 | x = sit; | |
| 632 | eq = blast; | |
| 633 | qq = shoudon; | |
| 634 | - | w = Part(1,a-1,a-1,'Bright red',.5,1,1) |
| 634 | + | |
| 635 | c = loud; | |
| 636 | v = trip; | |
| 637 | } | |
| 638 | - | w = Part(1,a-1,a-1,'Bright red',.5,1,1) |
| 638 | + | |
| 639 | function CheckKeys(key) | |
| 640 | - | w = Part(1,a-1,a-1,'Bright red',.5,1,1) |
| 640 | + | |
| 641 | elseif not Keys[key] then Keys[key] = true | |
| 642 | end | |
| 643 | end | |
| 644 | hop.Selected:connect(function(mouse) Equip() | |
| 645 | mouse.Button1Up:connect(function() holding = false end) | |
| 646 | mouse.KeyUp:connect(function(key) CheckKeys(key) for i,v in pairs(klist) do if key == i:sub(1,1) and i:sub(2,2) == 'q' then holding = false end end end) | |
| 647 | mouse.KeyDown:connect(function(key) | |
| 648 | CheckKeys(key) | |
| 649 | if attacking then return end | |
| 650 | for i,v in pairs(klist) do | |
| 651 | if key == i:sub(1,1) then attacking = true v(mouse) attacking = false | |
| 652 | end | |
| 653 | end | |
| 654 | end) | |
| 655 | end) |