SHOW:
|
|
- or go back to the newest paste.
| 1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
| 2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 3 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
| 4 | local RealPlayer = Player | |
| 5 | do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
| |
| 6 | warn'any options for magic' | |
| 7 | plr = game.Players.LocalPlayer | |
| 8 | char = plr.Character | |
| 9 | hum = char.Humanoid | |
| 10 | local cam = game.Workspace.CurrentCamera | |
| 11 | t = char.Torso | |
| 12 | h = char.Head | |
| 13 | ra = char["Right Arm"] | |
| 14 | la = char["Left Arm"] | |
| 15 | rl = char["Right Leg"] | |
| 16 | ll = char["Left Leg"] | |
| 17 | tors = char.Torso | |
| 18 | lleg = char["Left Leg"] | |
| 19 | root = char.HumanoidRootPart | |
| 20 | hed = char.Head | |
| 21 | rleg = char["Right Leg"] | |
| 22 | rarm = char["Right Arm"] | |
| 23 | larm = char["Left Arm"] | |
| 24 | vt = Vector3.new | |
| 25 | bc = BrickColor.new | |
| 26 | br = BrickColor.random | |
| 27 | it = Instance.new | |
| 28 | cf = CFrame.new | |
| 29 | ||
| 30 | ||
| 31 | local Create = LoadLibrary("RbxUtility").Create
| |
| 32 | ||
| 33 | CFuncs = {
| |
| 34 | ["Part"] = {
| |
| 35 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
| 36 | local Part = Create("Part"){
| |
| 37 | Parent = Parent, | |
| 38 | Reflectance = Reflectance, | |
| 39 | Transparency = Transparency, | |
| 40 | CanCollide = false, | |
| 41 | Locked = true, | |
| 42 | BrickColor = BrickColor.new(tostring(BColor)), | |
| 43 | Name = Name, | |
| 44 | Size = Size, | |
| 45 | Material = Material, | |
| 46 | } | |
| 47 | RemoveOutlines(Part) | |
| 48 | return Part | |
| 49 | end; | |
| 50 | }; | |
| 51 | ||
| 52 | ["Mesh"] = {
| |
| 53 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
| 54 | local Msh = Create(Mesh){
| |
| 55 | Parent = Part, | |
| 56 | Offset = OffSet, | |
| 57 | Scale = Scale, | |
| 58 | } | |
| 59 | if Mesh == "SpecialMesh" then | |
| 60 | Msh.MeshType = MeshType | |
| 61 | Msh.MeshId = MeshId | |
| 62 | end | |
| 63 | return Msh | |
| 64 | end; | |
| 65 | }; | |
| 66 | ||
| 67 | ["Mesh"] = {
| |
| 68 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
| 69 | local Msh = Create(Mesh){
| |
| 70 | Parent = Part, | |
| 71 | Offset = OffSet, | |
| 72 | Scale = Scale, | |
| 73 | } | |
| 74 | if Mesh == "SpecialMesh" then | |
| 75 | Msh.MeshType = MeshType | |
| 76 | Msh.MeshId = MeshId | |
| 77 | end | |
| 78 | return Msh | |
| 79 | end; | |
| 80 | }; | |
| 81 | ||
| 82 | ["Weld"] = {
| |
| 83 | Create = function(Parent, Part0, Part1, C0, C1) | |
| 84 | local Weld = Create("Weld"){
| |
| 85 | Parent = Parent, | |
| 86 | Part0 = Part0, | |
| 87 | Part1 = Part1, | |
| 88 | C0 = C0, | |
| 89 | C1 = C1, | |
| 90 | } | |
| 91 | return Weld | |
| 92 | end; | |
| 93 | }; | |
| 94 | ||
| 95 | ["Sound"] = {
| |
| 96 | Create = function(id, par, vol, pit) | |
| 97 | coroutine.resume(coroutine.create(function() | |
| 98 | local S = Create("Sound"){
| |
| 99 | Volume = vol, | |
| 100 | Pitch = pit or 1, | |
| 101 | SoundId = id, | |
| 102 | Parent = par or workspace, | |
| 103 | } | |
| 104 | wait() | |
| 105 | S:play() | |
| 106 | game:GetService("Debris"):AddItem(S, 10)
| |
| 107 | end)) | |
| 108 | end; | |
| 109 | }; | |
| 110 | ||
| 111 | ["ParticleEmitter"] = {
| |
| 112 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
| 113 | local fp = Create("ParticleEmitter"){
| |
| 114 | Parent = Parent, | |
| 115 | Color = ColorSequence.new(Color1, Color2), | |
| 116 | LightEmission = LightEmission, | |
| 117 | Size = Size, | |
| 118 | Texture = Texture, | |
| 119 | Transparency = Transparency, | |
| 120 | ZOffset = ZOffset, | |
| 121 | Acceleration = Accel, | |
| 122 | Drag = Drag, | |
| 123 | LockedToPart = LockedToPart, | |
| 124 | VelocityInheritance = VelocityInheritance, | |
| 125 | EmissionDirection = EmissionDirection, | |
| 126 | Enabled = Enabled, | |
| 127 | Lifetime = LifeTime, | |
| 128 | Rate = Rate, | |
| 129 | Rotation = Rotation, | |
| 130 | RotSpeed = RotSpeed, | |
| 131 | Speed = Speed, | |
| 132 | VelocitySpread = VelocitySpread, | |
| 133 | } | |
| 134 | return fp | |
| 135 | end; | |
| 136 | }; | |
| 137 | ||
| 138 | CreateTemplate = {
| |
| 139 | ||
| 140 | }; | |
| 141 | } | |
| 142 | ||
| 143 | ||
| 144 | ||
| 145 | New = function(Object, Parent, Name, Data) | |
| 146 | local Object = Instance.new(Object) | |
| 147 | for Index, Value in pairs(Data or {}) do
| |
| 148 | Object[Index] = Value | |
| 149 | end | |
| 150 | Object.Parent = Parent | |
| 151 | Object.Name = Name | |
| 152 | return Object | |
| 153 | end | |
| 154 | local m = Instance.new("Model",char)
| |
| 155 | ||
| 156 | function CreatePart(parent,transparency,reflectance,material,brickcolor) | |
| 157 | local p = Instance.new("Part")
| |
| 158 | p.Parent = parent | |
| 159 | p.Size = Vector3.new(1,1,1) | |
| 160 | p.Transparency = transparency | |
| 161 | p.Reflectance = reflectance | |
| 162 | p.CanCollide = false | |
| 163 | p.Locked = true | |
| 164 | p.BrickColor = brickcolor | |
| 165 | p.Material = material | |
| 166 | return p | |
| 167 | end | |
| 168 | ||
| 169 | function CreateMesh(parent,meshtype,x1,y1,z1) | |
| 170 | local mesh = Instance.new("SpecialMesh",parent)
| |
| 171 | mesh.MeshType = meshtype | |
| 172 | mesh.Scale = Vector3.new(x1,y1,z1) | |
| 173 | return mesh | |
| 174 | end | |
| 175 | ||
| 176 | function CreateSpecialGlowMesh(parent,meshid,x1,y1,z1) | |
| 177 | local mesh = Instance.new("SpecialMesh",parent)
| |
| 178 | mesh.MeshType = "FileMesh" | |
| 179 | mesh.MeshId = meshid | |
| 180 | mesh.TextureId = "http://www.roblox.com/asset/?id=269748808" | |
| 181 | mesh.Scale = Vector3.new(x1,y1,z1) | |
| 182 | mesh.VertexColor = Vector3.new(parent.BrickColor.r, parent.BrickColor.g, parent.BrickColor.b) | |
| 183 | return mesh | |
| 184 | end | |
| 185 | ||
| 186 | function CreateWeld(parent,part0,part1,C1X,C1Y,C1Z,C1Xa,C1Ya,C1Za,C0X,C0Y,C0Z,C0Xa,C0Ya,C0Za) | |
| 187 | local weld = Instance.new("Weld")
| |
| 188 | weld.Parent = parent | |
| 189 | weld.Part0 = part0 | |
| 190 | weld.Part1 = part1 | |
| 191 | weld.C1 = CFrame.new(C1X,C1Y,C1Z)*CFrame.Angles(C1Xa,C1Ya,C1Za) | |
| 192 | weld.C0 = CFrame.new(C0X,C0Y,C0Z)*CFrame.Angles(C0Xa,C0Ya,C0Za) | |
| 193 | return weld | |
| 194 | end | |
| 195 | ||
| 196 | ||
| 197 | local sorb = CreatePart(m,1,1,"SmoothPlastic",BrickColor.random()) | |
| 198 | CreateWeld(sorb,rarm,sorb,0,2,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
| 199 | local sorb2 = CreatePart(m,1,1,"SmoothPlastic",BrickColor.random()) | |
| 200 | CreateWeld(sorb2,larm,sorb2,0,2,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
| 201 | ||
| 202 | Player=game:GetService("Players").LocalPlayer
| |
| 203 | Character=Player.Character | |
| 204 | PlayerGui=Player.PlayerGui | |
| 205 | Backpack=Player.Backpack | |
| 206 | Torso=Character.Torso | |
| 207 | Head=Character.Head | |
| 208 | Humanoid=Character.Humanoid | |
| 209 | m=Instance.new('Model',Character)
| |
| 210 | LeftArm=Character["Left Arm"] | |
| 211 | LeftLeg=Character["Left Leg"] | |
| 212 | RightArm=Character["Right Arm"] | |
| 213 | RightLeg=Character["Right Leg"] | |
| 214 | LS=Torso["Left Shoulder"] | |
| 215 | LH=Torso["Left Hip"] | |
| 216 | RS=Torso["Right Shoulder"] | |
| 217 | RH=Torso["Right Hip"] | |
| 218 | Face = Head.face | |
| 219 | Neck=Torso.Neck | |
| 220 | it=Instance.new | |
| 221 | attacktype=1 | |
| 222 | vt=Vector3.new | |
| 223 | cf=CFrame.new | |
| 224 | euler=CFrame.fromEulerAnglesXYZ | |
| 225 | angles=CFrame.Angles | |
| 226 | cloaked=false | |
| 227 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 228 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 229 | LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
| 230 | LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) | |
| 231 | RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
| 232 | RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) | |
| 233 | RootPart=Character.HumanoidRootPart | |
| 234 | RootJoint=RootPart.RootJoint | |
| 235 | RootCF=euler(-1.57,0,3.14) | |
| 236 | attack = false | |
| 237 | attackdebounce = false | |
| 238 | deb=false | |
| 239 | equipped=true | |
| 240 | hand=false | |
| 241 | MMouse=nil | |
| 242 | combo=0 | |
| 243 | mana=0 | |
| 244 | trispeed=.2 | |
| 245 | attackmode='none' | |
| 246 | local idle=0 | |
| 247 | local Anim="Idle" | |
| 248 | local Effects={}
| |
| 249 | local gun=false | |
| 250 | local shoot=false | |
| 251 | local sine = 0 | |
| 252 | local change = 1 | |
| 253 | player=nil | |
| 254 | ||
| 255 | mouse=Player:GetMouse() | |
| 256 | --save shoulders | |
| 257 | RSH, LSH=nil, nil | |
| 258 | --welds | |
| 259 | RW, LW=Instance.new("Weld"), Instance.new("Weld")
| |
| 260 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
| 261 | LH=Torso["Left Hip"] | |
| 262 | RH=Torso["Right Hip"] | |
| 263 | TorsoColor=Torso.BrickColor | |
| 264 | function NoOutline(Part) | |
| 265 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
| 266 | end | |
| 267 | player=Player | |
| 268 | ch=Character | |
| 269 | RSH=ch.Torso["Right Shoulder"] | |
| 270 | LSH=ch.Torso["Left Shoulder"] | |
| 271 | -- | |
| 272 | RSH.Parent=nil | |
| 273 | LSH.Parent=nil | |
| 274 | -- | |
| 275 | RW.Name="Right Shoulder" | |
| 276 | RW.Part0=ch.Torso | |
| 277 | RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
| 278 | RW.C1=cf(0, 0.5, 0) | |
| 279 | RW.Part1=ch["Right Arm"] | |
| 280 | RW.Parent=ch.Torso | |
| 281 | -- | |
| 282 | LW.Name="Left Shoulder" | |
| 283 | LW.Part0=ch.Torso | |
| 284 | LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
| 285 | LW.C1=cf(0, 0.5, 0) | |
| 286 | LW.Part1=ch["Left Arm"] | |
| 287 | LW.Parent=ch.Torso | |
| 288 | ||
| 289 | local Stats=Instance.new("BoolValue")
| |
| 290 | Stats.Name="Stats" | |
| 291 | Stats.Parent=Character | |
| 292 | local Atk=Instance.new("NumberValue")
| |
| 293 | Atk.Name="Damage" | |
| 294 | Atk.Parent=Stats | |
| 295 | Atk.Value=1 | |
| 296 | local Def=Instance.new("NumberValue")
| |
| 297 | Def.Name="Defense" | |
| 298 | Def.Parent=Stats | |
| 299 | Def.Value=1 | |
| 300 | local Speed=Instance.new("NumberValue")
| |
| 301 | Speed.Name="Speed" | |
| 302 | Speed.Parent=Stats | |
| 303 | Speed.Value=1 | |
| 304 | local Mvmt=Instance.new("NumberValue")
| |
| 305 | Mvmt.Name="Movement" | |
| 306 | Mvmt.Parent=Stats | |
| 307 | Mvmt.Value=1 | |
| 308 | ||
| 309 | local donum=0 | |
| 310 | ||
| 311 | ||
| 312 | function part(formfactor,parent,reflectance,transparency,brickcolor,name,size) | |
| 313 | local fp=it("Part")
| |
| 314 | fp.formFactor=formfactor | |
| 315 | fp.Parent=parent | |
| 316 | fp.Reflectance=reflectance | |
| 317 | fp.Transparency=transparency | |
| 318 | fp.CanCollide=false | |
| 319 | fp.Locked=true | |
| 320 | fp.BrickColor=brickcolor | |
| 321 | fp.Name=name | |
| 322 | fp.Size=size | |
| 323 | fp.Position=Torso.Position | |
| 324 | NoOutline(fp) | |
| 325 | fp.Material="SmoothPlastic" | |
| 326 | fp:BreakJoints() | |
| 327 | return fp | |
| 328 | end | |
| 329 | ||
| 330 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
| 331 | local mesh=it(Mesh) | |
| 332 | mesh.Parent=part | |
| 333 | if Mesh=="SpecialMesh" then | |
| 334 | mesh.MeshType=meshtype | |
| 335 | if meshid~="nil" then | |
| 336 | mesh.MeshId="http://www.roblox.com/asset/?id="..meshid | |
| 337 | end | |
| 338 | end | |
| 339 | mesh.Offset=offset | |
| 340 | mesh.Scale=scale | |
| 341 | return mesh | |
| 342 | end | |
| 343 | ||
| 344 | function weld(parent,part0,part1,c0) | |
| 345 | local weld=it("Weld")
| |
| 346 | weld.Parent=parent | |
| 347 | weld.Part0=part0 | |
| 348 | weld.Part1=part1 | |
| 349 | weld.C0=c0 | |
| 350 | return weld | |
| 351 | end | |
| 352 | ||
| 353 | local Color1=Torso.BrickColor | |
| 354 | ||
| 355 | local bodvel=Instance.new("BodyVelocity")
| |
| 356 | local bg=Instance.new("BodyGyro")
| |
| 357 | ||
| 358 | function swait(num) | |
| 359 | if num==0 or num==nil then | |
| 360 | game:service'RunService'.Stepped:wait(0) | |
| 361 | else | |
| 362 | for i=0,num do | |
| 363 | game:service'RunService'.Stepped:wait(0) | |
| 364 | end | |
| 365 | end | |
| 366 | end | |
| 367 | ||
| 368 | ||
| 369 | so = function(id,par,vol,pit) | |
| 370 | coroutine.resume(coroutine.create(function() | |
| 371 | local sou = Instance.new("Sound",par or workspace)
| |
| 372 | sou.Volume=vol | |
| 373 | sou.Pitch=pit or 1 | |
| 374 | sou.SoundId=id | |
| 375 | swait() | |
| 376 | sou:play() | |
| 377 | game:GetService("Debris"):AddItem(sou,6)
| |
| 378 | end)) | |
| 379 | end | |
| 380 | ||
| 381 | function clerp(a,b,t) | |
| 382 | local qa = {QuaternionFromCFrame(a)}
| |
| 383 | local qb = {QuaternionFromCFrame(b)}
| |
| 384 | local ax, ay, az = a.x, a.y, a.z | |
| 385 | local bx, by, bz = b.x, b.y, b.z | |
| 386 | local _t = 1-t | |
| 387 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
| 388 | end | |
| 389 | ||
| 390 | function QuaternionFromCFrame(cf) | |
| 391 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 392 | local trace = m00 + m11 + m22 | |
| 393 | if trace > 0 then | |
| 394 | local s = math.sqrt(1 + trace) | |
| 395 | local recip = 0.5/s | |
| 396 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
| 397 | else | |
| 398 | local i = 0 | |
| 399 | if m11 > m00 then | |
| 400 | i = 1 | |
| 401 | end | |
| 402 | if m22 > (i == 0 and m00 or m11) then | |
| 403 | i = 2 | |
| 404 | end | |
| 405 | if i == 0 then | |
| 406 | local s = math.sqrt(m00-m11-m22+1) | |
| 407 | local recip = 0.5/s | |
| 408 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
| 409 | elseif i == 1 then | |
| 410 | local s = math.sqrt(m11-m22-m00+1) | |
| 411 | local recip = 0.5/s | |
| 412 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
| 413 | elseif i == 2 then | |
| 414 | local s = math.sqrt(m22-m00-m11+1) | |
| 415 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
| 416 | end | |
| 417 | end | |
| 418 | end | |
| 419 | ||
| 420 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 421 | local xs, ys, zs = x + x, y + y, z + z | |
| 422 | local wx, wy, wz = w*xs, w*ys, w*zs | |
| 423 | local xx = x*xs | |
| 424 | local xy = x*ys | |
| 425 | local xz = x*zs | |
| 426 | local yy = y*ys | |
| 427 | local yz = y*zs | |
| 428 | local zz = z*zs | |
| 429 | 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)) | |
| 430 | end | |
| 431 | ||
| 432 | function QuaternionSlerp(a, b, t) | |
| 433 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
| 434 | local startInterp, finishInterp; | |
| 435 | if cosTheta >= 0.0001 then | |
| 436 | if (1 - cosTheta) > 0.0001 then | |
| 437 | local theta = math.acos(cosTheta) | |
| 438 | local invSinTheta = 1/math.sin(theta) | |
| 439 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
| 440 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 441 | else | |
| 442 | startInterp = 1-t | |
| 443 | finishInterp = t | |
| 444 | end | |
| 445 | else | |
| 446 | if (1+cosTheta) > 0.0001 then | |
| 447 | local theta = math.acos(-cosTheta) | |
| 448 | local invSinTheta = 1/math.sin(theta) | |
| 449 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
| 450 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 451 | else | |
| 452 | startInterp = t-1 | |
| 453 | finishInterp = t | |
| 454 | end | |
| 455 | end | |
| 456 | 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 | |
| 457 | end | |
| 458 | ||
| 459 | local function CFrameFromTopBack(at, top, back) | |
| 460 | local right = top:Cross(back) | |
| 461 | return CFrame.new(at.x, at.y, at.z, | |
| 462 | right.x, top.x, back.x, | |
| 463 | right.y, top.y, back.y, | |
| 464 | right.z, top.z, back.z) | |
| 465 | end | |
| 466 | ||
| 467 | function Triangle(a, b, c) | |
| 468 | local edg1 = (c-a):Dot((b-a).unit) | |
| 469 | local edg2 = (a-b):Dot((c-b).unit) | |
| 470 | local edg3 = (b-c):Dot((a-c).unit) | |
| 471 | if edg1 <= (b-a).magnitude and edg1 >= 0 then | |
| 472 | a, b, c = a, b, c | |
| 473 | elseif edg2 <= (c-b).magnitude and edg2 >= 0 then | |
| 474 | a, b, c = b, c, a | |
| 475 | elseif edg3 <= (a-c).magnitude and edg3 >= 0 then | |
| 476 | a, b, c = c, a, b | |
| 477 | else | |
| 478 | assert(false, "unreachable") | |
| 479 | end | |
| 480 | ||
| 481 | local len1 = (c-a):Dot((b-a).unit) | |
| 482 | local len2 = (b-a).magnitude - len1 | |
| 483 | local width = (a + (b-a).unit*len1 - c).magnitude | |
| 484 | ||
| 485 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
| 486 | ||
| 487 | local list = {}
| |
| 488 | ||
| 489 | if len1 > 0.01 then | |
| 490 | local w1 = Instance.new('WedgePart', m)
| |
| 491 | game:GetService("Debris"):AddItem(w1,5)
| |
| 492 | w1.Material = "SmoothPlastic" | |
| 493 | w1.FormFactor = 'Custom' | |
| 494 | w1.BrickColor = BrickColor.new("Really red")
| |
| 495 | w1.Transparency = 0 | |
| 496 | w1.Reflectance = 0 | |
| 497 | w1.Material = "SmoothPlastic" | |
| 498 | w1.CanCollide = false | |
| 499 | local l1 = Instance.new("PointLight",w1)
| |
| 500 | l1.Color = Color3.new(170,0,0) | |
| 501 | NoOutline(w1) | |
| 502 | local sz = Vector3.new(0.2, width, len1) | |
| 503 | w1.Size = sz | |
| 504 | local sp = Instance.new("SpecialMesh",w1)
| |
| 505 | sp.MeshType = "Wedge" | |
| 506 | sp.Scale = Vector3.new(0,1,1) * sz/w1.Size | |
| 507 | w1:BreakJoints() | |
| 508 | w1.Anchored = true | |
| 509 | w1.Parent = workspace | |
| 510 | w1.Transparency = 0.7 | |
| 511 | table.insert(Effects,{w1,"Disappear",.01})
| |
| 512 | w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2) | |
| 513 | table.insert(list,w1) | |
| 514 | end | |
| 515 | ||
| 516 | if len2 > 0.01 then | |
| 517 | local w2 = Instance.new('WedgePart', m)
| |
| 518 | game:GetService("Debris"):AddItem(w2,5)
| |
| 519 | w2.Material = "SmoothPlastic" | |
| 520 | w2.FormFactor = 'Custom' | |
| 521 | w2.BrickColor = BrickColor.new("Really red")
| |
| 522 | w2.Transparency = 0 | |
| 523 | w2.Reflectance = 0 | |
| 524 | w2.Material = "SmoothPlastic" | |
| 525 | w2.CanCollide = false | |
| 526 | local l2 = Instance.new("PointLight",w2)
| |
| 527 | l2.Color = Color3.new(170,0,0) | |
| 528 | NoOutline(w2) | |
| 529 | local sz = Vector3.new(0.2, width, len2) | |
| 530 | w2.Size = sz | |
| 531 | local sp = Instance.new("SpecialMesh",w2)
| |
| 532 | sp.MeshType = "Wedge" | |
| 533 | sp.Scale = Vector3.new(0,1,1) * sz/w2.Size | |
| 534 | w2:BreakJoints() | |
| 535 | w2.Anchored = true | |
| 536 | w2.Parent = workspace | |
| 537 | w2.Transparency = 0.7 | |
| 538 | table.insert(Effects,{w2,"Disappear",.01})
| |
| 539 | w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2) | |
| 540 | table.insert(list,w2) | |
| 541 | end | |
| 542 | return unpack(list) | |
| 543 | end | |
| 544 | ||
| 545 | ||
| 546 | Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock) | |
| 547 | if hit.Parent==nil then | |
| 548 | return | |
| 549 | end | |
| 550 | h=hit.Parent:FindFirstChild("Humanoid")
| |
| 551 | for _,v in pairs(hit.Parent:children()) do | |
| 552 | if v:IsA("Humanoid") then
| |
| 553 | h=v | |
| 554 | end | |
| 555 | end | |
| 556 | if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
| |
| 557 | h=hit.Parent.Parent:FindFirstChild("Humanoid")
| |
| 558 | end | |
| 559 | if hit.Parent.className=="Hat" then | |
| 560 | hit=hit.Parent.Parent:findFirstChild("Head")
| |
| 561 | end | |
| 562 | if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
| |
| 563 | if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
| |
| 564 | --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then | |
| 565 | return | |
| 566 | end]] | |
| 567 | -- hs(hit,1.2) | |
| 568 | c=Instance.new("ObjectValue")
| |
| 569 | c.Name="creator" | |
| 570 | c.Value=game:service("Players").LocalPlayer
| |
| 571 | c.Parent=h | |
| 572 | game:GetService("Debris"):AddItem(c,.5)
| |
| 573 | Damage=math.random(minim,maxim) | |
| 574 | -- h:TakeDamage(Damage) | |
| 575 | blocked=false | |
| 576 | block=hit.Parent:findFirstChild("Block")
| |
| 577 | if block~=nil then | |
| 578 | print(block.className) | |
| 579 | if block.className=="NumberValue" then | |
| 580 | if block.Value>0 then | |
| 581 | blocked=true | |
| 582 | if decreaseblock==nil then | |
| 583 | block.Value=block.Value-1 | |
| 584 | end | |
| 585 | end | |
| 586 | end | |
| 587 | if block.className=="IntValue" then | |
| 588 | if block.Value>0 then | |
| 589 | blocked=true | |
| 590 | if decreaseblock~=nil then | |
| 591 | block.Value=block.Value-1 | |
| 592 | end | |
| 593 | end | |
| 594 | end | |
| 595 | end | |
| 596 | if blocked==false then | |
| 597 | -- h:TakeDamage(Damage) | |
| 598 | h.Health=h.Health-Damage | |
| 599 | showDamage(hit.Parent,Damage,.5,BrickColor.new("Really red"))
| |
| 600 | else | |
| 601 | h.Health=h.Health-(Damage/2) | |
| 602 | showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
| |
| 603 | end | |
| 604 | if Type=="Knockdown" then | |
| 605 | hum=hit.Parent.Humanoid | |
| 606 | hum.PlatformStand=true | |
| 607 | coroutine.resume(coroutine.create(function(HHumanoid) | |
| 608 | swait(1) | |
| 609 | HHumanoid.PlatformStand=false | |
| 610 | end),hum) | |
| 611 | local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit | |
| 612 | --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) | |
| 613 | local bodvol=Instance.new("BodyVelocity")
| |
| 614 | bodvol.velocity=angle*knockback | |
| 615 | bodvol.P=5000 | |
| 616 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
| 617 | bodvol.Parent=hit | |
| 618 | rl=Instance.new("BodyAngularVelocity")
| |
| 619 | rl.P=3000 | |
| 620 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
| 621 | rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
| 622 | rl.Parent=hit | |
| 623 | game:GetService("Debris"):AddItem(bodvol,.5)
| |
| 624 | game:GetService("Debris"):AddItem(rl,.5)
| |
| 625 | elseif Type=="Normal" then | |
| 626 | vp=Instance.new("BodyVelocity")
| |
| 627 | vp.P=500 | |
| 628 | vp.maxForce=Vector3.new(math.huge,0,math.huge) | |
| 629 | -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback | |
| 630 | if KnockbackType==1 then | |
| 631 | vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05 | |
| 632 | elseif KnockbackType==2 then | |
| 633 | vp.velocity=Property.CFrame.lookVector*knockback | |
| 634 | end | |
| 635 | if knockback>0 then | |
| 636 | vp.Parent=hit.Parent.Torso | |
| 637 | end | |
| 638 | game:GetService("Debris"):AddItem(vp,.5)
| |
| 639 | elseif Type=="Up" then | |
| 640 | local bodyVelocity=Instance.new("BodyVelocity")
| |
| 641 | bodyVelocity.velocity=vt(0,60,0) | |
| 642 | bodyVelocity.P=5000 | |
| 643 | bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
| 644 | bodyVelocity.Parent=hit | |
| 645 | game:GetService("Debris"):AddItem(bodyVelocity,1)
| |
| 646 | rl=Instance.new("BodyAngularVelocity")
| |
| 647 | rl.P=3000 | |
| 648 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
| 649 | rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30)) | |
| 650 | rl.Parent=hit | |
| 651 | game:GetService("Debris"):AddItem(rl,.5)
| |
| 652 | elseif Type=="Snare" then | |
| 653 | bp=Instance.new("BodyPosition")
| |
| 654 | bp.P=2000 | |
| 655 | bp.D=100 | |
| 656 | bp.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
| 657 | bp.position=hit.Parent.Torso.Position | |
| 658 | bp.Parent=hit.Parent.Torso | |
| 659 | game:GetService("Debris"):AddItem(bp,1)
| |
| 660 | elseif Type=="Target" then | |
| 661 | if Targetting==false then | |
| 662 | ZTarget=hit.Parent.Torso | |
| 663 | coroutine.resume(coroutine.create(function(Part) | |
| 664 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
| |
| 665 | swait(5) | |
| 666 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
| |
| 667 | end),ZTarget) | |
| 668 | TargHum=ZTarget.Parent:findFirstChild("Humanoid")
| |
| 669 | targetgui=Instance.new("BillboardGui")
| |
| 670 | targetgui.Parent=ZTarget | |
| 671 | targetgui.Size=UDim2.new(10,100,10,100) | |
| 672 | targ=Instance.new("ImageLabel")
| |
| 673 | targ.Parent=targetgui | |
| 674 | targ.BackgroundTransparency=1 | |
| 675 | targ.Image="rbxassetid://4834067" | |
| 676 | targ.Size=UDim2.new(1,0,1,0) | |
| 677 | cam.CameraType="Scriptable" | |
| 678 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
| 679 | dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
| 680 | workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
| 681 | Targetting=true | |
| 682 | RocketTarget=ZTarget | |
| 683 | for i=1,Property do | |
| 684 | --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do | |
| 685 | if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then | |
| 686 | swait() | |
| 687 | end | |
| 688 | --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100) | |
| 689 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
| 690 | dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
| 691 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0) | |
| 692 | end | |
| 693 | Targetting=false | |
| 694 | RocketTarget=nil | |
| 695 | targetgui.Parent=nil | |
| 696 | cam.CameraType="Custom" | |
| 697 | end | |
| 698 | end | |
| 699 | debounce=Instance.new("BoolValue")
| |
| 700 | debounce.Name="DebounceHit" | |
| 701 | debounce.Parent=hit.Parent | |
| 702 | debounce.Value=true | |
| 703 | game:GetService("Debris"):AddItem(debounce,Delay)
| |
| 704 | c=Instance.new("ObjectValue")
| |
| 705 | c.Name="creator" | |
| 706 | c.Value=Player | |
| 707 | c.Parent=h | |
| 708 | game:GetService("Debris"):AddItem(c,.5)
| |
| 709 | CRIT=false | |
| 710 | hitDeb=true | |
| 711 | AttackPos=6 | |
| 712 | end | |
| 713 | end | |
| 714 | ||
| 715 | showDamage=function(Char,Dealt,du,Color) | |
| 716 | m=Instance.new("Model")
| |
| 717 | m.Name=tostring(Dealt) | |
| 718 | h=Instance.new("Humanoid")
| |
| 719 | h.Health=0 | |
| 720 | h.MaxHealth=0 | |
| 721 | h.Parent=m | |
| 722 | c=Instance.new("Part")
| |
| 723 | c.Transparency=0 | |
| 724 | c.BrickColor=Color | |
| 725 | c.Transparency = 1 | |
| 726 | c.Name="Head" | |
| 727 | c.TopSurface=0 | |
| 728 | c.BottomSurface=0 | |
| 729 | c.formFactor="Plate" | |
| 730 | c.Size=Vector3.new(1,.4,1) | |
| 731 | ||
| 732 | local txt = Instance.new("BillboardGui", c)
| |
| 733 | txt.Adornee = c | |
| 734 | txt.Name = "_status" | |
| 735 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
| 736 | txt.StudsOffset = Vector3.new(-9, 8, 0) | |
| 737 | local text = Instance.new("TextLabel", txt)
| |
| 738 | text.Size = UDim2.new(10, 0, 7, 0) | |
| 739 | text.FontSize = "Size12" | |
| 740 | text.TextScaled = true | |
| 741 | text.TextTransparency = 0.5 | |
| 742 | text.BackgroundTransparency = 1 | |
| 743 | text.TextTransparency = 0.5 | |
| 744 | text.TextStrokeTransparency = 0.5 | |
| 745 | text.Font = "SciFi" | |
| 746 | text.TextStrokeColor3 = Color3.new(0,0,0) | |
| 747 | v=Instance.new("Part")
| |
| 748 | v.Name = "ColorBrick" | |
| 749 | v.Parent=c | |
| 750 | v.FormFactor="Symmetric" | |
| 751 | v.Anchored=true | |
| 752 | v.CanCollide=false | |
| 753 | v.BottomSurface="Smooth" | |
| 754 | v.TopSurface="Smooth" | |
| 755 | v.Size=Vector3.new(10,5,3) | |
| 756 | v.Transparency=1 | |
| 757 | v.CFrame=c.CFrame | |
| 758 | v.BrickColor=BrickColor.random() | |
| 759 | v.Transparency=1 | |
| 760 | text.TextColor3 = t.BrickColor.Color | |
| 761 | v.Shape="Block" | |
| 762 | text.Text = tostring(Dealt) | |
| 763 | ms=Instance.new("CylinderMesh")
| |
| 764 | ms.Scale=Vector3.new(.8,.8,.8) | |
| 765 | --[[local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"}
| |
| 766 | local rndm=math.random(1,#hitsounds) | |
| 767 | local r=rndm | |
| 768 | CFuncs["Sound"].Create("http://www.roblox.com/asset/?id="..hitsounds[r],c,1.25,1)]]--
| |
| 769 | if CRIT==true then | |
| 770 | ms.Scale=Vector3.new(1,1.25,1) | |
| 771 | end | |
| 772 | ms.Parent=c | |
| 773 | c.Reflectance=0 | |
| 774 | Instance.new("BodyGyro").Parent=c
| |
| 775 | c.Parent=m | |
| 776 | if Char:findFirstChild("Head")~=nil then
| |
| 777 | c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
| 778 | elseif Char.Parent:findFirstChild("Head")~=nil then
| |
| 779 | c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
| 780 | end | |
| 781 | f=Instance.new("BodyPosition")
| |
| 782 | f.P=2000 | |
| 783 | f.D=100 | |
| 784 | f.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
| 785 | f.position=c.Position+Vector3.new(0,3,0) | |
| 786 | f.Parent=c | |
| 787 | game:GetService("Debris"):AddItem(m,.5+du)
| |
| 788 | c.CanCollide=false | |
| 789 | m.Parent=workspace | |
| 790 | c.CanCollide=false | |
| 791 | end | |
| 792 | ||
| 793 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
| 794 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
| |
| 795 | end | |
| 796 | ||
| 797 | function SkullEffect(brickcolor,cframe,x1,y1,z1,delay) | |
| 798 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 799 | prt.Anchored=true | |
| 800 | prt.CFrame=cframe | |
| 801 | local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1))
| |
| 802 | --http://www.roblox.com/asset/?id=4770560 | |
| 803 | game:GetService("Debris"):AddItem(prt,2)
| |
| 804 | CF=prt.CFrame | |
| 805 | coroutine.resume(coroutine.create(function(Part,Mesh,TehCF) | |
| 806 | for i=0,1,0.2 do | |
| 807 | wait() | |
| 808 | Part.CFrame=CF*cf(0,0,-0.4) | |
| 809 | end | |
| 810 | for i=0,1,delay do | |
| 811 | wait() | |
| 812 | --Part.CFrame=CF*cf((math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5) | |
| 813 | Mesh.Scale=Mesh.Scale | |
| 814 | end | |
| 815 | for i=0,1,0.1 do | |
| 816 | wait() | |
| 817 | Part.Transparency=i | |
| 818 | end | |
| 819 | Part.Parent=nil | |
| 820 | end),prt,msh,CF) | |
| 821 | end | |
| 822 | ||
| 823 | function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
| 824 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 825 | prt.Anchored=true | |
| 826 | prt.Material = "Neon" | |
| 827 | prt.CFrame=cframe | |
| 828 | prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 829 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
| |
| 830 | game:GetService("Debris"):AddItem(prt,5)
| |
| 831 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 832 | for i=0,1,delay do | |
| 833 | swait() | |
| 834 | Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 835 | Part.Transparency=i | |
| 836 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
| 837 | end | |
| 838 | Part.Parent=nil | |
| 839 | end),prt,msh) | |
| 840 | end | |
| 841 | ||
| 842 | function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype) | |
| 843 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 844 | prt.Anchored=true | |
| 845 | prt.Material = "Neon" | |
| 846 | prt.CFrame=cframe | |
| 847 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
| |
| 848 | game:GetService("Debris"):AddItem(prt,5)
| |
| 849 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 850 | local rtype = rottype | |
| 851 | for i=0,1,delay do | |
| 852 | swait() | |
| 853 | if rtype == 1 then | |
| 854 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
| 855 | elseif rtype == 2 then | |
| 856 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
| 857 | end | |
| 858 | Part.Transparency=i | |
| 859 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
| 860 | end | |
| 861 | Part.Parent=nil | |
| 862 | end),prt,msh) | |
| 863 | end | |
| 864 | ||
| 865 | function MagicSphere(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
| 866 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 867 | prt.Anchored=true | |
| 868 | prt.CFrame=cframe | |
| 869 | prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 870 | msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
| |
| 871 | game:GetService("Debris"):AddItem(prt,5)
| |
| 872 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 873 | for i=0,1,delay do | |
| 874 | wait() | |
| 875 | Part.Transparency=i | |
| 876 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
| 877 | end | |
| 878 | Part.Parent=nil | |
| 879 | end),prt,msh) | |
| 880 | end | |
| 881 | ||
| 882 | function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype) | |
| 883 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 884 | prt.Anchored=true | |
| 885 | prt.Material = "Neon" | |
| 886 | prt.CFrame=cframe | |
| 887 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
| |
| 888 | game:GetService("Debris"):AddItem(prt,5)
| |
| 889 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 890 | local rtype = rottype | |
| 891 | for i=0,1,delay do | |
| 892 | swait() | |
| 893 | if rtype == 1 then | |
| 894 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
| 895 | elseif rtype == 2 then | |
| 896 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
| 897 | end | |
| 898 | Part.Transparency=i | |
| 899 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
| 900 | end | |
| 901 | Part.Parent=nil | |
| 902 | end),prt,msh) | |
| 903 | end | |
| 904 | ||
| 905 | function MagicShock(brickcolor,cframe,x1,y1,x3,y3,delay,rottype) | |
| 906 | local prt=part(3,char,1,1,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 907 | prt.Anchored=true | |
| 908 | prt.Material = "Neon" | |
| 909 | prt.CFrame=cframe | |
| 910 | local dec = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt) | |
| 911 | local dec2 = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt) | |
| 912 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01))
| |
| 913 | game:GetService("Debris"):AddItem(prt,5)
| |
| 914 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 915 | local rtype = rottype | |
| 916 | for i=0,1,delay do | |
| 917 | swait() | |
| 918 | if rtype == 1 then | |
| 919 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
| 920 | elseif rtype == 2 then | |
| 921 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
| 922 | end | |
| 923 | dec.Transparency=i | |
| 924 | dec2.Transparency=i | |
| 925 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
| 926 | end | |
| 927 | Part.Parent=nil | |
| 928 | end),prt,msh) | |
| 929 | end | |
| 930 | ||
| 931 | function MagicShockAlt(brickcolor,cframe,x1,y1,x3,y3,delay,rottype) | |
| 932 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 933 | prt.Anchored=true | |
| 934 | prt.Material = "Neon" | |
| 935 | prt.CFrame=cframe | |
| 936 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01))
| |
| 937 | game:GetService("Debris"):AddItem(prt,5)
| |
| 938 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 939 | local rtype = rottype | |
| 940 | for i=0,1,delay do | |
| 941 | swait() | |
| 942 | if rtype == 1 then | |
| 943 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
| 944 | elseif rtype == 2 then | |
| 945 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
| 946 | end | |
| 947 | prt.Transparency=i | |
| 948 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
| 949 | end | |
| 950 | Part.Parent=nil | |
| 951 | end),prt,msh) | |
| 952 | end | |
| 953 | ||
| 954 | function MagicShockAltCircle(brickcolor,cframe,x1,z1,x3,z3,delay,rottype) | |
| 955 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 956 | prt.Anchored=true | |
| 957 | prt.Material = "Neon" | |
| 958 | prt.CFrame=cframe | |
| 959 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,1,z1))
| |
| 960 | game:GetService("Debris"):AddItem(prt,5)
| |
| 961 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 962 | local rtype = rottype | |
| 963 | for i=0,1,delay do | |
| 964 | swait() | |
| 965 | if rtype == 1 then | |
| 966 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0.1,0) | |
| 967 | elseif rtype == 2 then | |
| 968 | prt.CFrame = prt.CFrame*CFrame.Angles(0,-0.1,0) | |
| 969 | end | |
| 970 | prt.Transparency=i | |
| 971 | Mesh.Scale=Mesh.Scale+vt(x3,0,z3) | |
| 972 | end | |
| 973 | Part.Parent=nil | |
| 974 | end),prt,msh) | |
| 975 | end | |
| 976 | ||
| 977 | function MagicShockTrailAlt(brickcolor,cframe,x1,y1,z1,x3,y3,delay,rottype) | |
| 978 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 979 | prt.Anchored=true | |
| 980 | prt.Material = "Neon" | |
| 981 | prt.CFrame=cframe | |
| 982 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
| |
| 983 | game:GetService("Debris"):AddItem(prt,5)
| |
| 984 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 985 | local rtype = rottype | |
| 986 | for i=0,1,delay do | |
| 987 | swait() | |
| 988 | if rtype == 1 then | |
| 989 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
| 990 | elseif rtype == 2 then | |
| 991 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
| 992 | end | |
| 993 | prt.Transparency=i | |
| 994 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
| 995 | end | |
| 996 | Part.Parent=nil | |
| 997 | end),prt,msh) | |
| 998 | end | |
| 999 | ||
| 1000 | function MagicBlock2(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay) | |
| 1001 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 1002 | prt.Anchored=false | |
| 1003 | prt.CFrame=cframe | |
| 1004 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
| |
| 1005 | local wld=weld(prt,prt,Parent,cframe) | |
| 1006 | game:GetService("Debris"):AddItem(prt,5)
| |
| 1007 | coroutine.resume(coroutine.create(function(Part,Mesh,Weld) | |
| 1008 | for i=0,1,delay do | |
| 1009 | wait() | |
| 1010 | Weld.C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cframe | |
| 1011 | --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 1012 | Part.Transparency=i | |
| 1013 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
| 1014 | end | |
| 1015 | Part.Parent=nil | |
| 1016 | end),prt,msh,wld) | |
| 1017 | end | |
| 1018 | ||
| 1019 | function MagicBlock3(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay) | |
| 1020 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 1021 | prt.Anchored=false | |
| 1022 | prt.CFrame=cframe | |
| 1023 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
| |
| 1024 | local wld=weld(prt,prt,Parent,euler(0,0,0)*cf(0,0,0)) | |
| 1025 | game:GetService("Debris"):AddItem(prt,5)
| |
| 1026 | coroutine.resume(coroutine.create(function(Part,Mesh,Weld) | |
| 1027 | for i=0,1,delay do | |
| 1028 | wait() | |
| 1029 | Weld.C0=euler(i*20,0,0) | |
| 1030 | --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 1031 | Part.Transparency=i | |
| 1032 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
| 1033 | end | |
| 1034 | Part.Parent=nil | |
| 1035 | end),prt,msh,wld) | |
| 1036 | end | |
| 1037 | ||
| 1038 | function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
| 1039 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 1040 | prt.Anchored=true | |
| 1041 | prt.CFrame=cframe | |
| 1042 | local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
| |
| 1043 | game:GetService("Debris"):AddItem(prt,2)
| |
| 1044 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 1045 | for i=0,1,delay do | |
| 1046 | wait() | |
| 1047 | Part.CFrame=Part.CFrame | |
| 1048 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
| 1049 | local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 1050 | prt2.Anchored=true | |
| 1051 | prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 1052 | local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
| |
| 1053 | game:GetService("Debris"):AddItem(prt2,2)
| |
| 1054 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 1055 | for i=0,1,0.1 do | |
| 1056 | wait() | |
| 1057 | Part.CFrame=Part.CFrame*cf(0,0.5,0) | |
| 1058 | end | |
| 1059 | Part.Parent=nil | |
| 1060 | end),prt2,msh2) | |
| 1061 | end | |
| 1062 | for i=0,1,delay*2 do | |
| 1063 | wait() | |
| 1064 | Part.CFrame=Part.CFrame | |
| 1065 | Mesh.Scale=vt((x1+x3)-(x1+x3)*i,(y1+y3)-(y1+y3)*i,(z1+z3)-(z1+z3)*i) | |
| 1066 | end | |
| 1067 | Part.Parent=nil | |
| 1068 | end),prt,msh) | |
| 1069 | end | |
| 1070 | ||
| 1071 | function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
| 1072 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 1073 | prt.Anchored=true | |
| 1074 | prt.CFrame=cframe | |
| 1075 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
| |
| 1076 | game:GetService("Debris"):AddItem(prt,2)
| |
| 1077 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 1078 | for i=0,1,delay do | |
| 1079 | wait() | |
| 1080 | Part.CFrame=Part.CFrame | |
| 1081 | Part.Transparency=i | |
| 1082 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
| 1083 | end | |
| 1084 | Part.Parent=nil | |
| 1085 | end),prt,msh) | |
| 1086 | end | |
| 1087 | ||
| 1088 | function BreakEffect(brickcolor,cframe,x1,y1,z1) | |
| 1089 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 1090 | prt.Anchored=true | |
| 1091 | prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 1092 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
| |
| 1093 | game:GetService("Debris"):AddItem(prt,2)
| |
| 1094 | coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb) | |
| 1095 | CF=Part.CFrame | |
| 1096 | Numbb=0 | |
| 1097 | randnumb=math.random()/10 | |
| 1098 | rand1=math.random()/10 | |
| 1099 | for i=0,1,rand1 do | |
| 1100 | wait() | |
| 1101 | CF=CF*cf(0,math.random()/2,0) | |
| 1102 | --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0) | |
| 1103 | Part.CFrame=CF*euler(Numbb,0,0) | |
| 1104 | Part.Transparency=i | |
| 1105 | Numbb=Numbb+randnumb | |
| 1106 | end | |
| 1107 | Part.Parent=nil | |
| 1108 | end),prt,CF,Numbb,randnumb) | |
| 1109 | end | |
| 1110 | ||
| 1111 | function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
| 1112 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 1113 | prt.Anchored=true | |
| 1114 | prt.CFrame=cframe | |
| 1115 | msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1))
| |
| 1116 | game:GetService("Debris"):AddItem(prt,5)
| |
| 1117 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 1118 | for i=0,1,delay do | |
| 1119 | wait() | |
| 1120 | Part.CFrame=Part.CFrame*euler(0,0.7,0) | |
| 1121 | Part.Transparency=i | |
| 1122 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
| 1123 | end | |
| 1124 | Part.Parent=nil | |
| 1125 | end),prt,msh) | |
| 1126 | end | |
| 1127 | ||
| 1128 | function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
| 1129 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 1130 | prt.Anchored=true | |
| 1131 | prt.CFrame=cframe | |
| 1132 | msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
| |
| 1133 | game:GetService("Debris"):AddItem(prt,2)
| |
| 1134 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 1135 | for i=0,1,delay do | |
| 1136 | wait() | |
| 1137 | Part.CFrame=Part.CFrame*cf(0,y3/2,0) | |
| 1138 | Part.Transparency=i | |
| 1139 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
| 1140 | end | |
| 1141 | Part.Parent=nil | |
| 1142 | end),prt,msh) | |
| 1143 | end | |
| 1144 | ||
| 1145 | function StravEffect(brickcolor,cframe,x,y,z,x1,y1,z1,delay) | |
| 1146 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 1147 | prt.Anchored=true | |
| 1148 | prt.CFrame=cframe*cf(x,y,z) | |
| 1149 | msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://168892363",vt(0,0,0),vt(x1,y1,z1))
| |
| 1150 | game:GetService("Debris"):AddItem(prt,5)
| |
| 1151 | coroutine.resume(coroutine.create(function(Part,Mesh,ex,why,zee) | |
| 1152 | local num=math.random() | |
| 1153 | local num2=math.random(-3,2)+math.random() | |
| 1154 | local numm=0 | |
| 1155 | for i=0,1,delay*2 do | |
| 1156 | swait() | |
| 1157 | Part.CFrame=cframe*euler(0,numm*num*10,0)*cf(ex,why,zee)*cf(-i*10,num2,0) | |
| 1158 | Part.Transparency=i | |
| 1159 | numm=numm+0.01 | |
| 1160 | end | |
| 1161 | Part.Parent=nil | |
| 1162 | Mesh.Parent=nil | |
| 1163 | end),prt,msh,x,y,z) | |
| 1164 | end | |
| 1165 | ||
| 1166 | function dmgstart(dmg,what) | |
| 1167 | hitcon = what.Touched:connect(function(hit) | |
| 1168 | local hum = hit.Parent:FindFirstChild("Humanoid")
| |
| 1169 | if hum and not hum:IsDescendantOf(Character) then | |
| 1170 | hum:TakeDamage(dmg) | |
| 1171 | end | |
| 1172 | end) | |
| 1173 | end | |
| 1174 | ||
| 1175 | function dmgstop() | |
| 1176 | hitcon:disconnect() | |
| 1177 | end | |
| 1178 | ||
| 1179 | function Cloak() | |
| 1180 | Face.Parent=nil | |
| 1181 | cloaked=true | |
| 1182 | for _,v in pairs(Torso.Parent:children()) do | |
| 1183 | if v.className=="Part" and v.Name~="HumanoidRootPart" then | |
| 1184 | coroutine.resume(coroutine.create(function() | |
| 1185 | for i=0,1,0.2 do | |
| 1186 | wait() | |
| 1187 | v.Transparency=i | |
| 1188 | end | |
| 1189 | v.Transparency=1 | |
| 1190 | end)) | |
| 1191 | end | |
| 1192 | if v.className=="Hat" then | |
| 1193 | hatp=v.Handle | |
| 1194 | coroutine.resume(coroutine.create(function(derp) | |
| 1195 | for i=0,1,0.2 do | |
| 1196 | wait() | |
| 1197 | derp.Transparency=i | |
| 1198 | end | |
| 1199 | derp.Transparency=1 | |
| 1200 | end),hatp) | |
| 1201 | end | |
| 1202 | end | |
| 1203 | for _,v in pairs(m:children()) do | |
| 1204 | if v.className=="Part" then | |
| 1205 | coroutine.resume(coroutine.create(function() | |
| 1206 | for i=0,1,0.2 do | |
| 1207 | wait() | |
| 1208 | v.Transparency=i | |
| 1209 | end | |
| 1210 | v.Transparency=1 | |
| 1211 | end)) | |
| 1212 | end | |
| 1213 | end | |
| 1214 | end | |
| 1215 | ||
| 1216 | function UnCloak() | |
| 1217 | so("http://roblox.com/asset/?id=2767090",Torso,1,1.1)
| |
| 1218 | Face.Parent=Head | |
| 1219 | cloaked=false | |
| 1220 | for _,v in pairs(Torso.Parent:children()) do | |
| 1221 | if v.className=="Part" and v.Name~="HumanoidRootPart" then | |
| 1222 | coroutine.resume(coroutine.create(function() | |
| 1223 | for i=0,1,0.1 do | |
| 1224 | wait() | |
| 1225 | v.Transparency=v.Transparency-0.1 | |
| 1226 | end | |
| 1227 | v.Transparency=0 | |
| 1228 | end)) | |
| 1229 | end | |
| 1230 | if v.className=="Hat" then | |
| 1231 | hatp=v.Handle | |
| 1232 | coroutine.resume(coroutine.create(function(derp) | |
| 1233 | for i=0,1,0.1 do | |
| 1234 | wait() | |
| 1235 | derp.Transparency=derp.Transparency-0.1 | |
| 1236 | end | |
| 1237 | derp.Transparency=0 | |
| 1238 | end),hatp) | |
| 1239 | end | |
| 1240 | end | |
| 1241 | for _,v in pairs(m:children()) do | |
| 1242 | if v.className=="Part" and v.Name~="hitbox" and v.Name~='tip' then | |
| 1243 | coroutine.resume(coroutine.create(function() | |
| 1244 | for i=0,1,0.1 do | |
| 1245 | wait() | |
| 1246 | v.Transparency=v.Transparency-0.1 | |
| 1247 | end | |
| 1248 | v.Transparency=0 | |
| 1249 | end)) | |
| 1250 | v.Transparency=0 | |
| 1251 | end | |
| 1252 | end | |
| 1253 | end | |
| 1254 | ||
| 1255 | local jumped = false | |
| 1256 | function jump() | |
| 1257 | attack = true | |
| 1258 | jumped = true | |
| 1259 | hum.WalkSpeed = 0 | |
| 1260 | MagicBlock(bc("White"),root.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015)
| |
| 1261 | CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1)
| |
| 1262 | CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7)
| |
| 1263 | for i = 0,15,0.1 do | |
| 1264 | swait() | |
| 1265 | MagicBlock(bc("White"),sorb2.CFrame,3,3,3,0.05,0.05,0.05,0.05)
| |
| 1266 | MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
| |
| 1267 | RH.C0=clerp(RH.C0,cf(1,0.45,-0.75)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(50)),.05) | |
| 1268 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(15)),.05) | |
| 1269 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-1.5)* angles(math.rad(50),math.rad(0),math.rad(0)),0.05) | |
| 1270 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.05) | |
| 1271 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.05) | |
| 1272 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-20)), 0.05) | |
| 1273 | end | |
| 1274 | local bv = Instance.new("BodyVelocity")
| |
| 1275 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
| 1276 | bv.velocity = Vector3.new(0,500,0) | |
| 1277 | bv.Parent = root | |
| 1278 | game:GetService("Debris"):AddItem(bv, 0.5)
| |
| 1279 | local rng = Instance.new("Part", char)
| |
| 1280 | rng.Anchored = true | |
| 1281 | rng.BrickColor = BrickColor.new("White")
| |
| 1282 | rng.CanCollide = false | |
| 1283 | rng.FormFactor = 3 | |
| 1284 | rng.Name = "Ring" | |
| 1285 | rng.Size = Vector3.new(1, 1, 1) | |
| 1286 | rng.Transparency = 0 | |
| 1287 | rng.TopSurface = 0 | |
| 1288 | rng.BottomSurface = 0 | |
| 1289 | rng.Position = root.Position | |
| 1290 | rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) | |
| 1291 | local rngm = Instance.new("SpecialMesh", rng)
| |
| 1292 | rngm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
| 1293 | local rng2 = rng:Clone() | |
| 1294 | rng2.Parent = char | |
| 1295 | local rng2m = rng2.Mesh | |
| 1296 | local rng3 = rng:Clone() | |
| 1297 | rng3.Parent = char | |
| 1298 | local rng3m = rng3.Mesh | |
| 1299 | local rng4 = rng:Clone() | |
| 1300 | rng4.Parent = char | |
| 1301 | local rng4m = rng4.Mesh | |
| 1302 | local rng5 = rng:Clone() | |
| 1303 | rng5.Parent = char | |
| 1304 | local rng5m = rng5.Mesh | |
| 1305 | CFuncs["Sound"].Create("rbxassetid://324867021", rng, 10, 1)
| |
| 1306 | wait() | |
| 1307 | local scaler = 10 | |
| 1308 | local scaler2 = 10 | |
| 1309 | game:GetService("Debris"):AddItem(bv, 2.4)
| |
| 1310 | hum.WalkSpeed = 50 | |
| 1311 | MagicBlock(bc("White"),root.CFrame,15,15,15,10,10,10,0.015)
| |
| 1312 | for i = 0,10,0.1 do | |
| 1313 | swait() | |
| 1314 | rng.Transparency = rng.Transparency + 0.01 | |
| 1315 | rng2.Transparency = rng2.Transparency + 0.01 | |
| 1316 | rng3.Transparency = rng3.Transparency + 0.01 | |
| 1317 | rng4.Transparency = rng4.Transparency + 0.01 | |
| 1318 | rng5.Transparency = rng5.Transparency + 0.01 | |
| 1319 | scaler = scaler - 0.125 | |
| 1320 | scaler2 = scaler2 - 0.1 | |
| 1321 | rng2m.Scale = rng2m.Scale + Vector3.new(scaler/1.25, scaler/1.25, 20) | |
| 1322 | rng3m.Scale = rng3m.Scale + Vector3.new(scaler/1.5, scaler/1.5, 30) | |
| 1323 | rng4m.Scale = rng4m.Scale + Vector3.new(scaler/1.75, scaler/1.75, 40) | |
| 1324 | rng5m.Scale = rng5m.Scale + Vector3.new(scaler/2, scaler/2, 50) | |
| 1325 | rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0) | |
| 1326 | RH.C0=clerp(RH.C0,cf(1,-0.25,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(5)),.5) | |
| 1327 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(5)),.5) | |
| 1328 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-5),math.rad(0),math.rad(0)),0.5) | |
| 1329 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-5),math.rad(0),math.rad(0)),.5) | |
| 1330 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), 0.5) | |
| 1331 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), 0.5) | |
| 1332 | end | |
| 1333 | game:GetService("Debris"):AddItem(rng, 0.1)
| |
| 1334 | game:GetService("Debris"):AddItem(rng2, 0.1)
| |
| 1335 | game:GetService("Debris"):AddItem(rng3, 0.1)
| |
| 1336 | game:GetService("Debris"):AddItem(rng4, 0.1)
| |
| 1337 | game:GetService("Debris"):AddItem(rng5, 0.1)
| |
| 1338 | hum.WalkSpeed = 16 | |
| 1339 | attack = false | |
| 1340 | jumped = false | |
| 1341 | end | |
| 1342 | ||
| 1343 | function dash() | |
| 1344 | attack = true | |
| 1345 | jumped = true | |
| 1346 | hum.WalkSpeed = 0 | |
| 1347 | local bv = Instance.new("BodyVelocity")
| |
| 1348 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
| 1349 | bv.velocity = root.CFrame.lookVector*150 | |
| 1350 | bv.Parent = root | |
| 1351 | game:GetService("Debris"):AddItem(bv, 1)
| |
| 1352 | local rng = Instance.new("Part", char)
| |
| 1353 | rng.Anchored = true | |
| 1354 | rng.BrickColor = BrickColor.new("White")
| |
| 1355 | rng.CanCollide = false | |
| 1356 | rng.FormFactor = 3 | |
| 1357 | rng.Name = "Ring" | |
| 1358 | rng.Size = Vector3.new(1, 1, 1) | |
| 1359 | rng.Transparency = 0 | |
| 1360 | rng.TopSurface = 0 | |
| 1361 | rng.BottomSurface = 0 | |
| 1362 | rng.CFrame = root.CFrame | |
| 1363 | local rngm = Instance.new("SpecialMesh", rng)
| |
| 1364 | rngm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
| 1365 | local rng2 = rng:Clone() | |
| 1366 | rng2.Parent = char | |
| 1367 | rng2.CFrame = root.CFrame + root.CFrame.lookVector*10 | |
| 1368 | local rng2m = rng2.Mesh | |
| 1369 | local rng3 = rng:Clone() | |
| 1370 | rng3.Parent = char | |
| 1371 | rng3.CFrame = root.CFrame + root.CFrame.lookVector*20 | |
| 1372 | local rng3m = rng3.Mesh | |
| 1373 | local rng4 = rng:Clone() | |
| 1374 | rng4.Parent = char | |
| 1375 | rng4.CFrame = root.CFrame + root.CFrame.lookVector*30 | |
| 1376 | local rng4m = rng4.Mesh | |
| 1377 | local rng5 = rng:Clone() | |
| 1378 | rng5.Parent = char | |
| 1379 | rng5.CFrame = root.CFrame + root.CFrame.lookVector*40 | |
| 1380 | local rng5m = rng5.Mesh | |
| 1381 | CFuncs["Sound"].Create("rbxassetid://324867021", root, 1, 1)
| |
| 1382 | wait() | |
| 1383 | local scaler = 10/5 | |
| 1384 | local scaler2 = 10/5 | |
| 1385 | local hit = larm.Touched:connect(function(hit) | |
| 1386 | Damagefunc(hit,25,34,math.random(10,20),"Normal",root,.2,1) | |
| 1387 | end) | |
| 1388 | for i = 0,10,0.1 do | |
| 1389 | swait() | |
| 1390 | MagicBlock(bc("White"),sorb2.CFrame,3,3,3,0.05,0.05,0.05,0.05)
| |
| 1391 | rng.Transparency = rng.Transparency + 0.01 | |
| 1392 | rng2.Transparency = rng2.Transparency + 0.01 | |
| 1393 | rng3.Transparency = rng3.Transparency + 0.01 | |
| 1394 | rng4.Transparency = rng4.Transparency + 0.01 | |
| 1395 | rng5.Transparency = rng5.Transparency + 0.01 | |
| 1396 | scaler = scaler - 0.125/5 | |
| 1397 | scaler2 = scaler2 - 0.1/5 | |
| 1398 | rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/1.25, scaler2/1.25, 0) | |
| 1399 | rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0) | |
| 1400 | rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/1.75, scaler2/1.75, 0) | |
| 1401 | rng5m.Scale = rng5m.Scale + Vector3.new(scaler2/2, scaler2/2, 0) | |
| 1402 | rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0) | |
| 1403 | RH.C0=clerp(RH.C0,cf(1,-0.25,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(-25)),.5) | |
| 1404 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(5)),.5) | |
| 1405 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(-80)),0.5) | |
| 1406 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.5) | |
| 1407 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), 0.5) | |
| 1408 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-110)), 0.5) | |
| 1409 | end | |
| 1410 | game:GetService("Debris"):AddItem(rng, 0.1)
| |
| 1411 | game:GetService("Debris"):AddItem(rng2, 0.1)
| |
| 1412 | game:GetService("Debris"):AddItem(rng3, 0.1)
| |
| 1413 | game:GetService("Debris"):AddItem(rng4, 0.1)
| |
| 1414 | game:GetService("Debris"):AddItem(rng5, 0.1)
| |
| 1415 | hum.WalkSpeed = 16 | |
| 1416 | hit:disconnect() | |
| 1417 | attack = false | |
| 1418 | jumped = false | |
| 1419 | end | |
| 1420 | ||
| 1421 | function boom() | |
| 1422 | attack = true | |
| 1423 | jumped = true | |
| 1424 | hum.WalkSpeed = 0 | |
| 1425 | MagicBlock(bc("White"),sorb.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015)
| |
| 1426 | CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1)
| |
| 1427 | CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7)
| |
| 1428 | for i = 0,15,0.1 do | |
| 1429 | swait() | |
| 1430 | MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
| |
| 1431 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.05) | |
| 1432 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.05) | |
| 1433 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.05) | |
| 1434 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.05) | |
| 1435 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.05) | |
| 1436 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.05) | |
| 1437 | end | |
| 1438 | local rng = Instance.new("Part", char)
| |
| 1439 | rng.Anchored = true | |
| 1440 | rng.BrickColor = BrickColor.new("White")
| |
| 1441 | rng.CanCollide = false | |
| 1442 | rng.FormFactor = 3 | |
| 1443 | rng.Name = "Ring" | |
| 1444 | rng.Size = Vector3.new(1, 1, 1) | |
| 1445 | rng.Transparency = 0 | |
| 1446 | rng.TopSurface = 0 | |
| 1447 | rng.BottomSurface = 0 | |
| 1448 | rng.Position = root.Position | |
| 1449 | rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) | |
| 1450 | local rngm = Instance.new("SpecialMesh", rng)
| |
| 1451 | rngm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
| 1452 | local rng2 = rng:Clone() | |
| 1453 | rng2.Parent = char | |
| 1454 | local rng2m = rng2.Mesh | |
| 1455 | local rng3 = rng:Clone() | |
| 1456 | rng3.Parent = char | |
| 1457 | local rng3m = rng3.Mesh | |
| 1458 | local rng4 = rng:Clone() | |
| 1459 | rng4.Parent = char | |
| 1460 | local rng4m = rng4.Mesh | |
| 1461 | local rng5 = rng:Clone() | |
| 1462 | rng5.Parent = char | |
| 1463 | local rng5m = rng5.Mesh | |
| 1464 | local hit = rng5.Touched:connect(function(hit) | |
| 1465 | Damagefunc(hit,10,25,math.random(10,20),"Normal",root,.2,1) | |
| 1466 | end) | |
| 1467 | MagicBlock(bc("White"),root.CFrame,15,15,15,5,5,5,0.015)
| |
| 1468 | CFuncs["Sound"].Create("rbxassetid://187137517", rng, 10, 1)
| |
| 1469 | CFuncs["Sound"].Create("rbxassetid://597291504", rng, 5, 0.85)
| |
| 1470 | CFuncs["Sound"].Create("rbxassetid://144699494", rng, 10, 1)
| |
| 1471 | wait() | |
| 1472 | local scaler = 10 | |
| 1473 | local scaler2 = 10 | |
| 1474 | for i = 0,10,0.1 do | |
| 1475 | swait() | |
| 1476 | rng.Transparency = rng.Transparency + 0.01 | |
| 1477 | rng2.Transparency = rng2.Transparency + 0.01 | |
| 1478 | rng3.Transparency = rng3.Transparency + 0.01 | |
| 1479 | rng4.Transparency = rng4.Transparency + 0.01 | |
| 1480 | rng5.Transparency = rng5.Transparency + 0.01 | |
| 1481 | scaler = scaler - 0.125 | |
| 1482 | scaler2 = scaler2 - 0.1 | |
| 1483 | rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/1.75, scaler2/1.75, 4) | |
| 1484 | rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 3) | |
| 1485 | rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/1.25, scaler2/1.25, 2) | |
| 1486 | rng5m.Scale = rng5m.Scale + Vector3.new(scaler2, scaler2, 1) | |
| 1487 | rng5.Size = rng5m.Scale | |
| 1488 | rng5.CFrame = rng.CFrame | |
| 1489 | rngm.Scale = rngm.Scale + Vector3.new(scaler2/2, scaler2/2, 5) | |
| 1490 | RH.C0=clerp(RH.C0,cf(1,-0.25,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-30),math.rad(0),math.rad(0)),.5) | |
| 1491 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.5) | |
| 1492 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-1)* angles(math.rad(30),math.rad(0),math.rad(80)),0.5) | |
| 1493 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.5) | |
| 1494 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(40)), 0.5) | |
| 1495 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-50)), 0.5) | |
| 1496 | end | |
| 1497 | hit:disconnect() | |
| 1498 | game:GetService("Debris"):AddItem(rng, 1)
| |
| 1499 | game:GetService("Debris"):AddItem(rng2, 1)
| |
| 1500 | game:GetService("Debris"):AddItem(rng3, 1)
| |
| 1501 | game:GetService("Debris"):AddItem(rng4, 1)
| |
| 1502 | game:GetService("Debris"):AddItem(rng5, 1)
| |
| 1503 | hum.WalkSpeed = 16 | |
| 1504 | attack = false | |
| 1505 | jumped = false | |
| 1506 | end | |
| 1507 | ||
| 1508 | function shooty() | |
| 1509 | attack = true | |
| 1510 | MagicBlock(bc("White"),sorb.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015)
| |
| 1511 | CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1)
| |
| 1512 | CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7)
| |
| 1513 | for i = 0,15,0.1 do | |
| 1514 | swait() | |
| 1515 | MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
| |
| 1516 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.05) | |
| 1517 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.05) | |
| 1518 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.05) | |
| 1519 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.05) | |
| 1520 | end | |
| 1521 | CFuncs["Sound"].Create("rbxassetid://187137517", root, 1, 1)
| |
| 1522 | local a = Instance.new("Part",Character)
| |
| 1523 | a.Name = "Direction" | |
| 1524 | a.Anchored = true | |
| 1525 | a.BrickColor = bc("Bright red")
| |
| 1526 | a.Material = "Neon" | |
| 1527 | a.Transparency = 1 | |
| 1528 | a.CanCollide = false | |
| 1529 | local ray = Ray.new( | |
| 1530 | root.CFrame.p, -- origin | |
| 1531 | (mouse.Hit.p - root.CFrame.p).unit * 500 -- direction | |
| 1532 | ) | |
| 1533 | local ignore = Character | |
| 1534 | local hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
| 1535 | a.BottomSurface = 10 | |
| 1536 | a.TopSurface = 10 | |
| 1537 | local distance = (root.CFrame.p - position).magnitude | |
| 1538 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
| 1539 | a.CFrame = CFrame.new(root.CFrame.p, position) * CFrame.new(0, 0, 0) | |
| 1540 | local lb = Instance.new("Part")
| |
| 1541 | lb.Parent = char | |
| 1542 | lb.BrickColor = bc("White")
| |
| 1543 | lb.CanCollide = false | |
| 1544 | lb.Material = "Neon" | |
| 1545 | lb.Anchored = true | |
| 1546 | lb.TopSurface = 0 | |
| 1547 | lb.BottomSurface = 0 | |
| 1548 | lb.Transparency = 0 | |
| 1549 | lb.Size = vt(0.5,0.5,0.5) | |
| 1550 | lb.CFrame = sorb.CFrame | |
| 1551 | lb.Anchored = false | |
| 1552 | local thingery = Instance.new("SpecialMesh",lb)
| |
| 1553 | thingery.MeshType = "Sphere" | |
| 1554 | thingery.Scale = vt(25,25,25) | |
| 1555 | game:GetService("Debris"):AddItem(lb, 10)
| |
| 1556 | local bv = Instance.new("BodyVelocity")
| |
| 1557 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
| 1558 | bv.velocity = a.CFrame.lookVector*150 | |
| 1559 | bv.Parent = lb | |
| 1560 | game:GetService("Debris"):AddItem(a, 0.1)
| |
| 1561 | wait(0.05) | |
| 1562 | local hitted = false | |
| 1563 | lb.Touched:connect(function(hit) | |
| 1564 | if hitted == false then | |
| 1565 | hitted = true | |
| 1566 | lb.Anchored = true | |
| 1567 | lb.Transparency = 1 | |
| 1568 | local rng = Instance.new("Part", char)
| |
| 1569 | rng.Anchored = true | |
| 1570 | rng.BrickColor = BrickColor.new("White")
| |
| 1571 | rng.CanCollide = false | |
| 1572 | rng.FormFactor = 3 | |
| 1573 | rng.Name = "Ring" | |
| 1574 | rng.Size = Vector3.new(1, 1, 1) | |
| 1575 | rng.Transparency = 0 | |
| 1576 | rng.TopSurface = 0 | |
| 1577 | rng.BottomSurface = 0 | |
| 1578 | rng.CFrame = lb.CFrame | |
| 1579 | rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360))) | |
| 1580 | local rngm = Instance.new("SpecialMesh", rng)
| |
| 1581 | rngm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
| 1582 | local rng2 = rng:Clone() | |
| 1583 | rng2.Parent = char | |
| 1584 | local rng2m = rng2.Mesh | |
| 1585 | local rng3 = rng:Clone() | |
| 1586 | rng3.Parent = char | |
| 1587 | local rng3m = rng3.Mesh | |
| 1588 | local rng4 = rng:Clone() | |
| 1589 | rng4.Parent = char | |
| 1590 | local rng4m = rng4.Mesh | |
| 1591 | local rng5 = rng:Clone() | |
| 1592 | rng5.Parent = char | |
| 1593 | rng5.CFrame = rng5.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360))) | |
| 1594 | local rng5m = rng5.Mesh | |
| 1595 | rng2.CFrame = rng2.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360))) | |
| 1596 | rng3.CFrame = rng3.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360))) | |
| 1597 | rng4.CFrame = rng4.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360))) | |
| 1598 | MagicBlock(bc("White"),lb.CFrame,15,15,15,5,5,5,0.015)
| |
| 1599 | local rng6 = rng:Clone() | |
| 1600 | rng6.Material = "Neon" | |
| 1601 | rng6.Parent = char | |
| 1602 | local rng6m = rng6.Mesh | |
| 1603 | rng6m.Scale = vt(1,1,1) | |
| 1604 | rng6m.MeshType = "Sphere" | |
| 1605 | local hita = rng6.Touched:connect(function(hit) | |
| 1606 | Damagefunc(hit,10,25,math.random(10,20),"Normal",root,.2,1) | |
| 1607 | end) | |
| 1608 | CFuncs["Sound"].Create("rbxassetid://187137517", rng, 5, 1)
| |
| 1609 | CFuncs["Sound"].Create("rbxassetid://597291504", rng, 5, 0.75)
| |
| 1610 | CFuncs["Sound"].Create("rbxassetid://144699494", rng, 5, 1)
| |
| 1611 | local scaler = 5 | |
| 1612 | local scaler2 = 5 | |
| 1613 | for i = 0,20,0.1 do | |
| 1614 | swait() | |
| 1615 | rng.Transparency = rng.Transparency + 0.005 | |
| 1616 | rng2.Transparency = rng2.Transparency + 0.005 | |
| 1617 | rng3.Transparency = rng3.Transparency + 0.005 | |
| 1618 | rng4.Transparency = rng4.Transparency + 0.005 | |
| 1619 | rng5.Transparency = rng5.Transparency + 0.005 | |
| 1620 | rng6.Transparency = rng6.Transparency + 0.005 | |
| 1621 | scaler = scaler - 0.005/2 | |
| 1622 | scaler2 = scaler2 - 0.05/2 | |
| 1623 | rng6.Size = rng6.Size + Vector3.new(scaler2/3, scaler2/3, scaler2/3) | |
| 1624 | rng6.CFrame = rng.CFrame | |
| 1625 | rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0) | |
| 1626 | rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0) | |
| 1627 | rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/2, scaler2/2, 0) | |
| 1628 | rng5m.Scale = rng5m.Scale + Vector3.new(scaler2, scaler2, 0) | |
| 1629 | rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0) | |
| 1630 | end | |
| 1631 | hita:disconnect() | |
| 1632 | game:GetService("Debris"):AddItem(rng, 1)
| |
| 1633 | game:GetService("Debris"):AddItem(rng2, 1)
| |
| 1634 | game:GetService("Debris"):AddItem(rng3, 1)
| |
| 1635 | game:GetService("Debris"):AddItem(rng4, 1)
| |
| 1636 | game:GetService("Debris"):AddItem(rng5, 1)
| |
| 1637 | game:GetService("Debris"):AddItem(rng6, 1)
| |
| 1638 | end | |
| 1639 | end) | |
| 1640 | for i = 0,2,0.1 do | |
| 1641 | swait() | |
| 1642 | MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
| |
| 1643 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(80)),0.5) | |
| 1644 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.5) | |
| 1645 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.5) | |
| 1646 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.5) | |
| 1647 | end | |
| 1648 | attack = false | |
| 1649 | end | |
| 1650 | ||
| 1651 | function superpunch() | |
| 1652 | attack = true | |
| 1653 | jumped = true | |
| 1654 | hum.WalkSpeed = 0 | |
| 1655 | MagicBlock(bc("White"),sorb.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015)
| |
| 1656 | CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1)
| |
| 1657 | CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7)
| |
| 1658 | for i = 0,15,0.1 do | |
| 1659 | swait() | |
| 1660 | MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
| |
| 1661 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.05) | |
| 1662 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.05) | |
| 1663 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.05) | |
| 1664 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.05) | |
| 1665 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-20)), 0.05) | |
| 1666 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.05) | |
| 1667 | end | |
| 1668 | local rng = Instance.new("Part", char)
| |
| 1669 | rng.Anchored = true | |
| 1670 | rng.BrickColor = BrickColor.new("White")
| |
| 1671 | rng.CanCollide = false | |
| 1672 | rng.FormFactor = 3 | |
| 1673 | rng.Name = "Ring" | |
| 1674 | rng.Size = Vector3.new(1, 1, 1) | |
| 1675 | rng.Transparency = 0 | |
| 1676 | rng.TopSurface = 0 | |
| 1677 | rng.BottomSurface = 0 | |
| 1678 | rng.CFrame = root.CFrame | |
| 1679 | local rngm = Instance.new("SpecialMesh", rng)
| |
| 1680 | rngm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
| 1681 | local rng2 = rng:Clone() | |
| 1682 | rng2.Parent = char | |
| 1683 | local rng2m = rng2.Mesh | |
| 1684 | local rng3 = rng:Clone() | |
| 1685 | rng3.Parent = char | |
| 1686 | local rng3m = rng3.Mesh | |
| 1687 | local rng4 = rng:Clone() | |
| 1688 | rng4.Parent = char | |
| 1689 | local rng4m = rng4.Mesh | |
| 1690 | local rng5 = rng:Clone() | |
| 1691 | rng5.Parent = char | |
| 1692 | local rng5m = rng5.Mesh | |
| 1693 | local rng6 = rng:Clone() | |
| 1694 | rng6.Material = "Neon" | |
| 1695 | rng6.Parent = char | |
| 1696 | local rng6m = rng6.Mesh | |
| 1697 | rng6m.Scale = vt(1,1,1) | |
| 1698 | rng6m.MeshType = "Sphere" | |
| 1699 | local hita = rng6.Touched:connect(function(hit) | |
| 1700 | Damagefunc(hit,10,25,math.random(10,20),"Normal",root,.2,1) | |
| 1701 | end) | |
| 1702 | rng2.CFrame = root.CFrame | |
| 1703 | rng3.CFrame = root.CFrame | |
| 1704 | rng4.CFrame = root.CFrame | |
| 1705 | rng5.CFrame = root.CFrame | |
| 1706 | rng6.CFrame = root.CFrame | |
| 1707 | CFuncs["Sound"].Create("rbxassetid://260430117", rng, 5, 1)
| |
| 1708 | CFuncs["Sound"].Create("rbxassetid://187137517", rng, 5, 0.85)
| |
| 1709 | CFuncs["Sound"].Create("rbxassetid://169628396", rng, 5, 1)
| |
| 1710 | CFuncs["Sound"].Create("rbxassetid://137994058", rng, 5, 1)
| |
| 1711 | CFuncs["Sound"].Create("rbxassetid://138186576", rng, 5, 1)
| |
| 1712 | wait() | |
| 1713 | local scaler = 10/5 | |
| 1714 | local scaler2 = 10/5 | |
| 1715 | MagicBlock(bc("White"),root.CFrame,15,15,15,5,5,5,0.015)
| |
| 1716 | for i = 0,10,0.1 do | |
| 1717 | swait() | |
| 1718 | MagicBlock(bc("White"),rng6.CFrame,5,5,5,5,5,5,0.1)
| |
| 1719 | rng.CFrame = rng.CFrame + rng.CFrame.lookVector*scaler2 | |
| 1720 | rng2.CFrame = rng2.CFrame + rng2.CFrame.lookVector*scaler2/1.25 | |
| 1721 | rng3.CFrame = rng3.CFrame + rng3.CFrame.lookVector*scaler2/1.5 | |
| 1722 | rng4.CFrame = rng4.CFrame + rng4.CFrame.lookVector*scaler2/1.75 | |
| 1723 | rng5.CFrame = rng5.CFrame + rng5.CFrame.lookVector*scaler2/2 | |
| 1724 | rng6.Size = rng6.Size + Vector3.new(scaler2/3, scaler2/3, scaler2/3) | |
| 1725 | rng6.CFrame = rng.CFrame | |
| 1726 | rng.Transparency = rng.Transparency + 0.01 | |
| 1727 | rng2.Transparency = rng2.Transparency + 0.01 | |
| 1728 | rng3.Transparency = rng3.Transparency + 0.01 | |
| 1729 | rng4.Transparency = rng4.Transparency + 0.01 | |
| 1730 | rng5.Transparency = rng5.Transparency + 0.01 | |
| 1731 | rng6.Transparency = rng6.Transparency + 0.01 | |
| 1732 | scaler = scaler - 0.125/5 | |
| 1733 | scaler2 = scaler2 - 0.1/5 | |
| 1734 | rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/2.5, scaler2/2.5, 1.5) | |
| 1735 | rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/2, scaler2/2, 1) | |
| 1736 | rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0.5) | |
| 1737 | rng5m.Scale = rng5m.Scale + Vector3.new(scaler2, scaler2, 0) | |
| 1738 | rngm.Scale = rngm.Scale + Vector3.new(scaler2/3, scaler2/3, 2) | |
| 1739 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(80)),0.5) | |
| 1740 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.5) | |
| 1741 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.5) | |
| 1742 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.5) | |
| 1743 | end | |
| 1744 | hita:disconnect() | |
| 1745 | game:GetService("Debris"):AddItem(rng, 1)
| |
| 1746 | game:GetService("Debris"):AddItem(rng2, 1)
| |
| 1747 | game:GetService("Debris"):AddItem(rng3, 1)
| |
| 1748 | game:GetService("Debris"):AddItem(rng4, 1)
| |
| 1749 | game:GetService("Debris"):AddItem(rng5, 1)
| |
| 1750 | hum.WalkSpeed = 16 | |
| 1751 | attack = false | |
| 1752 | jumped = false | |
| 1753 | end | |
| 1754 | ||
| 1755 | ||
| 1756 | mouse.KeyDown:connect(function(k) | |
| 1757 | if k == "z" and attack == false and RootPart.Velocity.y == 0 and hitfloor~=nil then | |
| 1758 | jump() | |
| 1759 | end | |
| 1760 | if k == "x" and attack == false then | |
| 1761 | dash() | |
| 1762 | end | |
| 1763 | if k == "c" and attack == false and RootPart.Velocity.y == 0 and hitfloor~=nil then | |
| 1764 | boom() | |
| 1765 | end | |
| 1766 | if k == "v" and attack == false then | |
| 1767 | shooty() | |
| 1768 | end | |
| 1769 | if k == "b" and attack == false then | |
| 1770 | superpunch() | |
| 1771 | end | |
| 1772 | end) | |
| 1773 | Humanoid.Animator.Parent = nil | |
| 1774 | idleanim=.4 | |
| 1775 | while true do | |
| 1776 | swait() | |
| 1777 | sine = sine + change | |
| 1778 | local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
| 1779 | local velderp=RootPart.Velocity.y | |
| 1780 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
| 1781 | if equipped==true or equipped==false then | |
| 1782 | if attack==false then | |
| 1783 | idle=idle+1 | |
| 1784 | else | |
| 1785 | idle=0 | |
| 1786 | end | |
| 1787 | if idle>=500 then | |
| 1788 | if attack==false then | |
| 1789 | --Sheath() | |
| 1790 | end | |
| 1791 | end | |
| 1792 | if RootPart.Velocity.y > 1 and hitfloor==nil then | |
| 1793 | Anim="Jump" | |
| 1794 | if attack==false then | |
| 1795 | Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.3) | |
| 1796 | Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3) | |
| 1797 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0.25)*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
| 1798 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,0.5)*angles(math.rad(-25),math.rad(0),math.rad(0)),.3) | |
| 1799 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
| 1800 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-0.5),.3) | |
| 1801 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
| 1802 | RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2) | |
| 1803 | LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2) | |
| 1804 | end | |
| 1805 | elseif RootPart.Velocity.y < -1 and hitfloor==nil then | |
| 1806 | Anim="Fall" | |
| 1807 | if attack==false then | |
| 1808 | Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3) | |
| 1809 | Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3) | |
| 1810 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0.25)*angles(math.rad(5),math.rad(0),math.rad(0)),.3) | |
| 1811 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0.3,0,-0.2),.3) | |
| 1812 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
| 1813 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0.3,0,0.2)*angles(math.rad(-25),math.rad(0),math.rad(0)),.3) | |
| 1814 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
| 1815 | RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2) | |
| 1816 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2) | |
| 1817 | end | |
| 1818 | elseif torvel<1 and hitfloor~=nil then | |
| 1819 | Anim="Idle" | |
| 1820 | if jumped == false then | |
| 1821 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.15 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5 - 2.5 * math.cos(sine / 32)),math.rad(0),math.rad(0 + 7.5 * math.cos(sine / 32))),.3) | |
| 1822 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.15 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5 - 2.5 * math.cos(sine / 32)),math.rad(0),math.rad(0 + 7.5 * math.cos(sine / 32))),.3) | |
| 1823 | end | |
| 1824 | if attack==false then | |
| 1825 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))*angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
| 1826 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0 - 5 * math.cos(sine / 25)),math.rad(0),math.rad(0)),.3) | |
| 1827 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(5 + 2.5 * math.cos(sine / 25))),.3) | |
| 1828 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(-5 - 2.5 * math.cos(sine / 25))),.3) | |
| 1829 | end | |
| 1830 | elseif torvel>2 and torvel<22 and hitfloor~=nil then | |
| 1831 | Anim="Walk" | |
| 1832 | if jumped == false then | |
| 1833 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 4),-0.25 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 25 * math.cos(sine / 8))),.3) | |
| 1834 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 4),-0.25 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 25 * math.cos(sine / 8))),.3) | |
| 1835 | end | |
| 1836 | if attack==false then | |
| 1837 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 - 0.05 * math.cos(sine / 4))*angles(math.rad(15),math.rad(0),math.rad(0)),.3) | |
| 1838 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
| 1839 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0 - 25 * math.cos(sine / 8)),math.rad(0),math.rad(10 + 1.25 * math.cos(sine / 16))),.3) | |
| 1840 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0 + 25 * math.cos(sine / 8)),math.rad(0),math.rad(-10 - 1.25 * math.cos(sine / 16))),.3) | |
| 1841 | end | |
| 1842 | elseif torvel>=22 and hitfloor~=nil then | |
| 1843 | Anim="Run" | |
| 1844 | if jumped == false then | |
| 1845 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 32),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 75 * math.cos(sine / 3))),.3) | |
| 1846 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 32),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 75 * math.cos(sine / 3))),.3) | |
| 1847 | end | |
| 1848 | if attack==false then | |
| 1849 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-0.25 + 0.05 * math.cos(sine / 32))* angles(math.rad(35),math.rad(0),math.rad(0)),.3) | |
| 1850 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
| 1851 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-50),math.rad(-60),math.rad(25)),.3) | |
| 1852 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(-50),math.rad(0),math.rad(-25)),.3) | |
| 1853 | end | |
| 1854 | end | |
| 1855 | end | |
| 1856 | end |