SHOW:
|
|
- or go back to the newest paste.
| 1 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 2 | local Player,game,owner = owner,game | |
| 3 | local RealPlayer = Player | |
| 4 | do | |
| 5 | print("FE Compatibility code by Mokiros")
| |
| 6 | local rp = RealPlayer | |
| 7 | script.Parent = rp.Character | |
| 8 | ||
| 9 | --RemoteEvent for communicating | |
| 10 | local Event = Instance.new("RemoteEvent")
| |
| 11 | Event.Name = "UserInput_Event" | |
| 12 | ||
| 13 | --Fake event to make stuff like Mouse.KeyDown work | |
| 14 | local function fakeEvent() | |
| 15 | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
| |
| 16 | t.connect = t.Connect | |
| 17 | return t | |
| 18 | end | |
| 19 | ||
| 20 | --Creating fake input objects with fake variables | |
| 21 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
| |
| 22 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 23 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 24 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 25 | end} | |
| 26 | --Merged 2 functions into one by checking amount of arguments | |
| 27 | CAS.UnbindAction = CAS.BindAction | |
| 28 | ||
| 29 | --This function will trigger the events that have been :Connect()'ed | |
| 30 | local function te(self,ev,...) | |
| 31 | local t = m[ev] | |
| 32 | if t and t._fakeEvent then | |
| 33 | for _,f in pairs(t.Functions) do | |
| 34 | f(...) | |
| 35 | end | |
| 36 | end | |
| 37 | end | |
| 38 | m.TrigEvent = te | |
| 39 | UIS.TrigEvent = te | |
| 40 | ||
| 41 | Event.OnServerEvent:Connect(function(plr,io) | |
| 42 | if plr~=rp then return end | |
| 43 | m.Target = io.Target | |
| 44 | m.Hit = io.Hit | |
| 45 | if not io.isMouse then | |
| 46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
| 49 | end | |
| 50 | for _,t in pairs(CAS.Actions) do | |
| 51 | for _,k in pairs(t.Keys) do | |
| 52 | if k==io.KeyCode then | |
| 53 | t.Function(t.Name,io.UserInputState,io) | |
| 54 | end | |
| 55 | end | |
| 56 | end | |
| 57 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 59 | end | |
| 60 | end) | |
| 61 | Event.Parent = NLS([==[ | |
| 62 | local Player = game:GetService("Players").LocalPlayer
| |
| 63 | local Event = script:WaitForChild("UserInput_Event")
| |
| 64 | ||
| 65 | local Mouse = Player:GetMouse() | |
| 66 | local UIS = game:GetService("UserInputService")
| |
| 67 | local input = function(io,a) | |
| 68 | if a then return end | |
| 69 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 70 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
| |
| 71 | end | |
| 72 | UIS.InputBegan:Connect(input) | |
| 73 | UIS.InputEnded:Connect(input) | |
| 74 | ||
| 75 | local h,t | |
| 76 | --Give the server mouse data 30 times every second, but only if the values changed | |
| 77 | --If player is not moving their mouse, client won't fire events | |
| 78 | while wait(1/30) do | |
| 79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 80 | h,t=Mouse.Hit,Mouse.Target | |
| 81 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 82 | end | |
| 83 | end]==],Player.Character) | |
| 84 | ||
| 85 | ----Sandboxed game object that allows the usage of client-side methods and services | |
| 86 | --Real game object | |
| 87 | local _rg = game | |
| 88 | ||
| 89 | --Metatable for fake service | |
| 90 | local fsmt = {
| |
| 91 | __index = function(self,k) | |
| 92 | local s = rawget(self,"_RealService") | |
| 93 | if s then return s[k] end | |
| 94 | end, | |
| 95 | __newindex = function(self,k,v) | |
| 96 | local s = rawget(self,"_RealService") | |
| 97 | if s then s[k]=v end | |
| 98 | end, | |
| 99 | __call = function(self,...) | |
| 100 | local s = rawget(self,"_RealService") | |
| 101 | if s then return s(...) end | |
| 102 | end | |
| 103 | } | |
| 104 | local function FakeService(t,RealService) | |
| 105 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
| 106 | return setmetatable(t,fsmt) | |
| 107 | end | |
| 108 | ||
| 109 | --Fake game object | |
| 110 | local g = {
| |
| 111 | GetService = function(self,s) | |
| 112 | return self[s] | |
| 113 | end, | |
| 114 | Players = FakeService({
| |
| 115 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
| |
| 116 | },"Players"), | |
| 117 | UserInputService = FakeService(UIS,"UserInputService"), | |
| 118 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
| 119 | } | |
| 120 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
| 121 | g.service = g.GetService | |
| 122 | ||
| 123 | setmetatable(g,{
| |
| 124 | __index=function(self,s) | |
| 125 | return _rg:GetService(s) or typeof(_rg[s])=="function" | |
| 126 | and function(_,...)return _rg[s](_rg,...)end or _rg[s] | |
| 127 | end, | |
| 128 | __newindex = fsmt.__newindex, | |
| 129 | __call = fsmt.__call | |
| 130 | }) | |
| 131 | --Changing owner to fake player object to support owner:GetMouse() | |
| 132 | game,owner = g,g.Players.LocalPlayer | |
| 133 | end | |
| 134 | de=true | |
| 135 | Player=game:GetService("Players").LocalPlayer
| |
| 136 | Character=Player.Character | |
| 137 | PlayerGui=Player.PlayerGui | |
| 138 | Backpack=Player.Backpack | |
| 139 | Torso=Character.Torso | |
| 140 | Head=Character.Head | |
| 141 | Humanoid=Character.Humanoid | |
| 142 | LeftArm=Character["Left Arm"] | |
| 143 | LeftLeg=Character["Left Leg"] | |
| 144 | RightArm=Character["Right Arm"] | |
| 145 | RightLeg=Character["Right Leg"] | |
| 146 | LS=Torso["Left Shoulder"] | |
| 147 | LH=Torso["Left Hip"] | |
| 148 | RS=Torso["Right Shoulder"] | |
| 149 | Character=Player.Character | |
| 150 | PlayerGui=Player.PlayerGui | |
| 151 | Backpack=Player.Backpack | |
| 152 | Torso=Character.Torso | |
| 153 | Head=Character.Head | |
| 154 | Humanoid=Character.Humanoid | |
| 155 | LeftArm=Character["Left Arm"] | |
| 156 | LeftLeg=Character["Left Leg"] | |
| 157 | RightArm=Character["Right Arm"] | |
| 158 | RightLeg=Character["Right Leg"] | |
| 159 | LS=Torso["Left Shoulder"] | |
| 160 | LH=Torso["Left Hip"] | |
| 161 | RS=Torso["Right Shoulder"] | |
| 162 | RH=Torso["Right Hip"] | |
| 163 | Face = Head.face | |
| 164 | Neck=Torso.Neck | |
| 165 | it=Instance.new | |
| 166 | attacktype=1 | |
| 167 | vt=Vector3.new | |
| 168 | cf=CFrame.new | |
| 169 | euler=CFrame.fromEulerAnglesXYZ | |
| 170 | angles=CFrame.Angles | |
| 171 | cloaked=false | |
| 172 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 173 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 174 | LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
| 175 | LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) | |
| 176 | RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
| 177 | RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) | |
| 178 | RootPart=Character.HumanoidRootPart | |
| 179 | RootJoint=RootPart.RootJoint | |
| 180 | RootCF=euler(-1.57,0,3.14) | |
| 181 | attack = false | |
| 182 | attackdebounce = false | |
| 183 | deb=false | |
| 184 | equipped=true | |
| 185 | hand=false | |
| 186 | Mouse=nil | |
| 187 | combo=0 | |
| 188 | mana=0 | |
| 189 | trispeed=.2 | |
| 190 | attackmode='none' | |
| 191 | local idle=0 | |
| 192 | local Anim="Idle" | |
| 193 | local Effects={}
| |
| 194 | local gun=false | |
| 195 | local shoot=false | |
| 196 | player=nil | |
| 197 | mana=0 | |
| 198 | Mouse=Player:GetMouse() | |
| 199 | --save shoulders | |
| 200 | RSH, LSH=nil, nil | |
| 201 | --welds | |
| 202 | RW, LW=Instance.new("Weld"), Instance.new("Weld")
| |
| 203 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
| 204 | LH=Torso["Left Hip"] | |
| 205 | RH=Torso["Right Hip"] | |
| 206 | TorsoColor=Torso.BrickColor | |
| 207 | function NoOutline(Part) | |
| 208 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
| 209 | end | |
| 210 | player=Player | |
| 211 | ch=Character | |
| 212 | RSH=ch.Torso["Right Shoulder"] | |
| 213 | LSH=ch.Torso["Left Shoulder"] | |
| 214 | -- | |
| 215 | RSH.Parent=nil | |
| 216 | LSH.Parent=nil | |
| 217 | -- | |
| 218 | RW.Name="Right Shoulder" | |
| 219 | RW.Part0=ch.Torso | |
| 220 | RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
| 221 | RW.C1=cf(0, 0.5, 0) | |
| 222 | RW.Part1=ch["Right Arm"] | |
| 223 | RW.Parent=ch.Torso | |
| 224 | -- | |
| 225 | LW.Name="Left Shoulder" | |
| 226 | LW.Part0=ch.Torso | |
| 227 | LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
| 228 | LW.C1=cf(0, 0.5, 0) | |
| 229 | LW.Part1=ch["Left Arm"] | |
| 230 | LW.Parent=ch.Torso | |
| 231 | ||
| 232 | ||
| 233 | ||
| 234 | local function weldBetween(a, b) | |
| 235 | local weldd = Instance.new("ManualWeld")
| |
| 236 | weldd.Part0 = a | |
| 237 | weldd.Part1 = b | |
| 238 | weldd.C0 = CFrame.new() | |
| 239 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
| 240 | weldd.Parent = a | |
| 241 | return weldd | |
| 242 | end | |
| 243 | ||
| 244 | function swait(num) | |
| 245 | if num==0 or num==nil then | |
| 246 | game:service'RunService'.Heartbeat:wait(0) | |
| 247 | else | |
| 248 | for i=0,num do | |
| 249 | game:service'RunService'.Heartbeat:wait(0) | |
| 250 | end | |
| 251 | end | |
| 252 | end | |
| 253 | ||
| 254 | a = Instance.new("ScreenGui")
| |
| 255 | a.Name="CooldownGUI" | |
| 256 | a.Parent=Player.PlayerGui | |
| 257 | ||
| 258 | b = Instance.new("Frame")
| |
| 259 | b.Parent=a | |
| 260 | b.Visible=true | |
| 261 | b.BackgroundTransparency=0.3 | |
| 262 | b.BackgroundColor3=Color3.fromRGB(0, 0, 0) | |
| 263 | b.BorderColor3=Color3.fromRGB(255, 255, 255) | |
| 264 | b.BorderSizePixel=3 | |
| 265 | b.Position=UDim2.new(0.7, 0, 0.75, 0) | |
| 266 | b.Size=UDim2.new(0, 200, 0, 100) | |
| 267 | ||
| 268 | c = Instance.new("Frame")
| |
| 269 | c.Parent=a | |
| 270 | c.Visible=true | |
| 271 | c.BackgroundTransparency=0.3 | |
| 272 | c.BorderColor3=Color3.fromRGB(255, 255, 255) | |
| 273 | c.BorderSizePixel=3 | |
| 274 | c.BackgroundColor3=Color3.fromRGB(0, 0, 0) | |
| 275 | c.Position=UDim2.new(0.875, 0, 0.75, 0) | |
| 276 | c.Size=UDim2.new(0, 200, 0, 100) | |
| 277 | ||
| 278 | d = Instance.new("Frame")
| |
| 279 | d.Parent=a | |
| 280 | d.Visible=true | |
| 281 | d.BackgroundTransparency=0.3 | |
| 282 | d.BorderColor3=Color3.fromRGB(255, 255, 255) | |
| 283 | d.BorderSizePixel=3 | |
| 284 | d.BackgroundColor3=Color3.fromRGB(0, 0, 0) | |
| 285 | d.Position=UDim2.new(0.875, 0, 0.95, 0) | |
| 286 | d.Size=UDim2.new(0, 200, 0, 100) | |
| 287 | ||
| 288 | e = Instance.new("Frame")
| |
| 289 | e.Parent=a | |
| 290 | e.Visible=true | |
| 291 | e.BackgroundTransparency=0.3 | |
| 292 | e.BorderColor3=Color3.fromRGB(255, 255, 255) | |
| 293 | e.BorderSizePixel=3 | |
| 294 | e.BackgroundColor3=Color3.fromRGB(0, 0, 0) | |
| 295 | e.Position=UDim2.new(0.7, 0, 0.95, 0) | |
| 296 | e.Size=UDim2.new(0, 200, 0, 100) | |
| 297 | ||
| 298 | f = Instance.new("Frame")
| |
| 299 | f.Parent=a | |
| 300 | f.Visible=true | |
| 301 | f.BackgroundTransparency=0.3 | |
| 302 | f.BorderColor3=Color3.fromRGB(255, 255, 255) | |
| 303 | f.BorderSizePixel=3 | |
| 304 | f.BackgroundColor3=Color3.fromRGB(0, 0, 0) | |
| 305 | f.Position=UDim2.new(1.675, 0, 0.95, 0) | |
| 306 | f.Size=UDim2.new(0, 200, 0, 100) | |
| 307 | ||
| 308 | g = Instance.new("Frame")
| |
| 309 | g.Parent=a | |
| 310 | g.Visible=true | |
| 311 | g.BackgroundTransparency=0.3 | |
| 312 | g.BorderColor3=Color3.fromRGB(255, 255, 255) | |
| 313 | g.BorderSizePixel=3 | |
| 314 | g.BackgroundColor3=Color3.fromRGB(0, 0, 0) | |
| 315 | g.Position=UDim2.new(1.675, 0, 0.75, 0) | |
| 316 | g.Size=UDim2.new(0, 200, 0, 100) | |
| 317 | ||
| 318 | b2=Instance.new("TextLabel")
| |
| 319 | b2.Parent=a | |
| 320 | b2.BackgroundTransparency=1 | |
| 321 | b2.BorderColor3=Color3.fromRGB(139, 139, 139) | |
| 322 | b2.BorderSizePixel=3 | |
| 323 | b2.Position=b.Position | |
| 324 | b2.Size=UDim2.new(0, 200, 0, 100) | |
| 325 | b2.Visible=true | |
| 326 | b2.ZIndex=3 | |
| 327 | b2.Font="SourceSansItalic" | |
| 328 | b2.FontSize="Size32" | |
| 329 | b2.TextColor3=Color3.fromRGB(255, 255, 255) | |
| 330 | b2.TextScaled=false | |
| 331 | b2.TextStrokeColor3=Color3.fromRGB(139, 139, 139) | |
| 332 | b2.TextTransparency=0 | |
| 333 | b2.Text=[[ | |
| 334 | Shock | |
| 335 | (Z) | |
| 336 | ]] | |
| 337 | ||
| 338 | c2=Instance.new("TextLabel")
| |
| 339 | c2.Parent=a | |
| 340 | c2.BackgroundTransparency=1 | |
| 341 | c2.BorderColor3=Color3.fromRGB(139, 139, 139) | |
| 342 | c2.BorderSizePixel=3 | |
| 343 | c2.Position=c.Position | |
| 344 | c2.Size=UDim2.new(0, 200, 0, 100) | |
| 345 | c2.Visible=true | |
| 346 | c2.ZIndex=3 | |
| 347 | c2.Font="SourceSansItalic" | |
| 348 | c2.FontSize="Size32" | |
| 349 | c2.TextColor3=Color3.fromRGB(255, 255, 255) | |
| 350 | c2.TextScaled=false | |
| 351 | c2.TextStrokeColor3=Color3.fromRGB(139, 139, 139) | |
| 352 | c2.TextTransparency=0 | |
| 353 | c2.Text=[[ | |
| 354 | Dominator | |
| 355 | (X) | |
| 356 | ]] | |
| 357 | ||
| 358 | d2=Instance.new("TextLabel")
| |
| 359 | d2.Parent=a | |
| 360 | d2.BackgroundTransparency=1 | |
| 361 | d2.BorderColor3=Color3.fromRGB(139, 139, 139) | |
| 362 | d2.BorderSizePixel=3 | |
| 363 | d2.Position=d.Position | |
| 364 | d2.Size=UDim2.new(0, 200, 0, 100) | |
| 365 | d2.Visible=true | |
| 366 | d2.ZIndex=3 | |
| 367 | d2.Font="SourceSansItalic" | |
| 368 | d2.FontSize="Size32" | |
| 369 | d2.TextColor3=Color3.fromRGB(255, 255, 255) | |
| 370 | d2.TextScaled=false | |
| 371 | d2.TextStrokeColor3=Color3.fromRGB(139, 139, 139) | |
| 372 | d2.TextTransparency=0 | |
| 373 | d2.Text=[[ | |
| 374 | Eliminator | |
| 375 | (V) | |
| 376 | ]] | |
| 377 | ||
| 378 | e2=Instance.new("TextLabel")
| |
| 379 | e2.Parent=a | |
| 380 | e2.BackgroundTransparency=1 | |
| 381 | e2.BorderColor3=Color3.fromRGB(139, 139, 139) | |
| 382 | e2.BorderSizePixel=3 | |
| 383 | e2.Position=e.Position | |
| 384 | e2.Size=UDim2.new(0, 200, 0, 100) | |
| 385 | e2.Visible=true | |
| 386 | e2.ZIndex=3 | |
| 387 | e2.Font="SourceSansItalic" | |
| 388 | e2.FontSize="Size32" | |
| 389 | e2.TextColor3=Color3.fromRGB(255, 255, 255) | |
| 390 | e2.TextScaled=false | |
| 391 | e2.TextStrokeColor3=Color3.fromRGB(139, 139, 139) | |
| 392 | e2.TextTransparency=0 | |
| 393 | e2.Text=[[ | |
| 394 | Obliteration | |
| 395 | (C) | |
| 396 | ]] | |
| 397 | ||
| 398 | function NoOutline(Part) | |
| 399 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
| 400 | end | |
| 401 | ||
| 402 | function part(formfactor,parent,reflectance,transparency,brickcolor,name,size,material) | |
| 403 | local fp = it("Part")
| |
| 404 | fp.formFactor = formfactor | |
| 405 | fp.Parent = parent | |
| 406 | fp.Reflectance = reflectance | |
| 407 | fp.Transparency = transparency | |
| 408 | fp.CanCollide = false | |
| 409 | fp.Locked=true | |
| 410 | fp.BrickColor = brickcolor | |
| 411 | fp.Name = name | |
| 412 | fp.Size = size | |
| 413 | fp.Position = Torso.Position | |
| 414 | NoOutline(fp) | |
| 415 | fp.Material=material | |
| 416 | fp:BreakJoints() | |
| 417 | return fp | |
| 418 | end | |
| 419 | ||
| 420 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
| 421 | local mesh = it(Mesh) | |
| 422 | mesh.Parent = part | |
| 423 | if Mesh=="SpecialMesh" then | |
| 424 | mesh.MeshType = meshtype | |
| 425 | mesh.MeshId = meshid | |
| 426 | end | |
| 427 | mesh.Offset=offset | |
| 428 | mesh.Scale=scale | |
| 429 | return mesh | |
| 430 | end | |
| 431 | ||
| 432 | function weld(parent,part0,part1,c0) | |
| 433 | local weld = it("Weld")
| |
| 434 | weld.Parent = parent | |
| 435 | weld.Part0 = part0 | |
| 436 | weld.Part1 = part1 | |
| 437 | weld.C0 = c0 | |
| 438 | return weld | |
| 439 | end | |
| 440 | ||
| 441 | ||
| 442 | local function CFrameFromTopBack(at, top, back) | |
| 443 | local right = top:Cross(back) | |
| 444 | return CFrame.new(at.x, at.y, at.z, | |
| 445 | right.x, top.x, back.x, | |
| 446 | right.y, top.y, back.y, | |
| 447 | right.z, top.z, back.z) | |
| 448 | end | |
| 449 | ||
| 450 | function Triangle(a, b, c) | |
| 451 | local edg1 = (c-a):Dot((b-a).unit) | |
| 452 | local edg2 = (a-b):Dot((c-b).unit) | |
| 453 | local edg3 = (b-c):Dot((a-c).unit) | |
| 454 | if edg1 <= (b-a).magnitude and edg1 >= 0 then | |
| 455 | a, b, c = a, b, c | |
| 456 | elseif edg2 <= (c-b).magnitude and edg2 >= 0 then | |
| 457 | a, b, c = b, c, a | |
| 458 | elseif edg3 <= (a-c).magnitude and edg3 >= 0 then | |
| 459 | a, b, c = c, a, b | |
| 460 | else | |
| 461 | assert(false, "unreachable") | |
| 462 | end | |
| 463 | ||
| 464 | ||
| 465 | local len1 = (c-a):Dot((b-a).unit) | |
| 466 | local len2 = (b-a).magnitude - len1 | |
| 467 | local width = (a + (b-a).unit*len1 - c).magnitude | |
| 468 | ||
| 469 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
| 470 | ||
| 471 | local list = {}
| |
| 472 | ||
| 473 | local Color = BrickColor.new("Dark grey")
| |
| 474 | ||
| 475 | if len1 > 0.01 then | |
| 476 | local w1 = Instance.new('WedgePart', m)
| |
| 477 | game:GetService("Debris"):AddItem(w1,5)
| |
| 478 | w1.Material = "SmoothPlastic" | |
| 479 | w1.FormFactor = 'Custom' | |
| 480 | w1.BrickColor = BrickColor.new("Really black")
| |
| 481 | w1.Transparency = 0 | |
| 482 | w1.Reflectance = 0 | |
| 483 | w1.Material = "SmoothPlastic" | |
| 484 | w1.CanCollide = false | |
| 485 | NoOutline(w1) | |
| 486 | local sz = Vector3.new(0.2, width, len1) | |
| 487 | w1.Size = sz | |
| 488 | local sp = Instance.new("SpecialMesh",w1)
| |
| 489 | sp.MeshType = "Wedge" | |
| 490 | sp.Scale = Vector3.new(0,1,1) * sz/w1.Size | |
| 491 | w1:BreakJoints() | |
| 492 | w1.Anchored = true | |
| 493 | w1.Parent = workspace | |
| 494 | w1.Transparency = 0.7 | |
| 495 | table.insert(Effects,{w1,"Disappear",.01})
| |
| 496 | w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2) | |
| 497 | table.insert(list,w1) | |
| 498 | end | |
| 499 | ||
| 500 | if len2 > 0.01 then | |
| 501 | local w2 = Instance.new('WedgePart', m)
| |
| 502 | game:GetService("Debris"):AddItem(w2,5)
| |
| 503 | w2.Material = "SmoothPlastic" | |
| 504 | w2.FormFactor = 'Custom' | |
| 505 | w2.BrickColor = BrickColor.new("Really red")
| |
| 506 | w2.Transparency = 0 | |
| 507 | w2.Reflectance = 0 | |
| 508 | w2.Material = "SmoothPlastic" | |
| 509 | w2.CanCollide = false | |
| 510 | NoOutline(w2) | |
| 511 | local sz = Vector3.new(0.2, width, len2) | |
| 512 | w2.Size = sz | |
| 513 | local sp = Instance.new("SpecialMesh",w2)
| |
| 514 | sp.MeshType = "Wedge" | |
| 515 | sp.Scale = Vector3.new(0,1,1) * sz/w2.Size | |
| 516 | w2:BreakJoints() | |
| 517 | w2.Anchored = true | |
| 518 | w2.Parent = workspace | |
| 519 | w2.Transparency = 0.7 | |
| 520 | table.insert(Effects,{w2,"Disappear",.01})
| |
| 521 | w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2) | |
| 522 | table.insert(list,w2) | |
| 523 | end | |
| 524 | return unpack(list) | |
| 525 | end | |
| 526 | ||
| 527 | so = function(id,par,vol,pit) | |
| 528 | coroutine.resume(coroutine.create(function() | |
| 529 | local sou = Instance.new("Sound",par or workspace)
| |
| 530 | sou.Volume=vol | |
| 531 | sou.Pitch=pit or 1 | |
| 532 | sou.SoundId=id | |
| 533 | swait() | |
| 534 | sou:play() | |
| 535 | game:GetService("Debris"):AddItem(sou,6)
| |
| 536 | end)) | |
| 537 | end | |
| 538 | ||
| 539 | function clerp(a,b,t) | |
| 540 | local qa = {QuaternionFromCFrame(a)}
| |
| 541 | local qb = {QuaternionFromCFrame(b)}
| |
| 542 | local ax, ay, az = a.x, a.y, a.z | |
| 543 | local bx, by, bz = b.x, b.y, b.z | |
| 544 | local _t = 1-t | |
| 545 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
| 546 | end | |
| 547 | ||
| 548 | function QuaternionFromCFrame(cf) | |
| 549 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 550 | local trace = m00 + m11 + m22 | |
| 551 | if trace > 0 then | |
| 552 | local s = math.sqrt(1 + trace) | |
| 553 | local recip = 0.5/s | |
| 554 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
| 555 | else | |
| 556 | local i = 0 | |
| 557 | if m11 > m00 then | |
| 558 | i = 1 | |
| 559 | end | |
| 560 | if m22 > (i == 0 and m00 or m11) then | |
| 561 | i = 2 | |
| 562 | end | |
| 563 | if i == 0 then | |
| 564 | local s = math.sqrt(m00-m11-m22+1) | |
| 565 | local recip = 0.5/s | |
| 566 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
| 567 | elseif i == 1 then | |
| 568 | local s = math.sqrt(m11-m22-m00+1) | |
| 569 | local recip = 0.5/s | |
| 570 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
| 571 | elseif i == 2 then | |
| 572 | local s = math.sqrt(m22-m00-m11+1) | |
| 573 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
| 574 | end | |
| 575 | end | |
| 576 | end | |
| 577 | ||
| 578 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 579 | local xs, ys, zs = x + x, y + y, z + z | |
| 580 | local wx, wy, wz = w*xs, w*ys, w*zs | |
| 581 | local xx = x*xs | |
| 582 | local xy = x*ys | |
| 583 | local xz = x*zs | |
| 584 | local yy = y*ys | |
| 585 | local yz = y*zs | |
| 586 | local zz = z*zs | |
| 587 | 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)) | |
| 588 | end | |
| 589 | ||
| 590 | function QuaternionSlerp(a, b, t) | |
| 591 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
| 592 | local startInterp, finishInterp; | |
| 593 | if cosTheta >= 0.0001 then | |
| 594 | if (1 - cosTheta) > 0.0001 then | |
| 595 | local theta = math.acos(cosTheta) | |
| 596 | local invSinTheta = 1/math.sin(theta) | |
| 597 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
| 598 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 599 | else | |
| 600 | startInterp = 1-t | |
| 601 | finishInterp = t | |
| 602 | end | |
| 603 | else | |
| 604 | if (1+cosTheta) > 0.0001 then | |
| 605 | local theta = math.acos(-cosTheta) | |
| 606 | local invSinTheta = 1/math.sin(theta) | |
| 607 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
| 608 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 609 | else | |
| 610 | startInterp = t-1 | |
| 611 | finishInterp = t | |
| 612 | end | |
| 613 | end | |
| 614 | 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 | |
| 615 | end | |
| 616 | ||
| 617 | --Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
| 618 | ||
| 619 | ||
| 620 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
| 621 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
| |
| 622 | end | |
| 623 | ||
| 624 | Damagefunc=function(Part,hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock) | |
| 625 | if hit.Parent==nil then | |
| 626 | return | |
| 627 | end | |
| 628 | local h=hit.Parent:FindFirstChild("Humanoid")
| |
| 629 | for _,v in pairs(hit.Parent:children()) do | |
| 630 | if v:IsA("Humanoid") then
| |
| 631 | h=v | |
| 632 | end | |
| 633 | end | |
| 634 | if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
| |
| 635 | h=hit.Parent.Parent:FindFirstChild("Humanoid")
| |
| 636 | end | |
| 637 | if hit.Parent.className=="Hat" then | |
| 638 | hit=hit.Parent.Parent:findFirstChild("Head")
| |
| 639 | end | |
| 640 | if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
| |
| 641 | if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
| |
| 642 | --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then | |
| 643 | return | |
| 644 | end]] | |
| 645 | -- hs(hit,1.2) | |
| 646 | local c=Instance.new("ObjectValue")
| |
| 647 | c.Name="creator" | |
| 648 | c.Value=game:service("Players").LocalPlayer
| |
| 649 | c.Parent=h | |
| 650 | game:GetService("Debris"):AddItem(c,.5)
| |
| 651 | local Damage=math.random(minim,maxim) | |
| 652 | -- h:TakeDamage(Damage) | |
| 653 | local blocked=false | |
| 654 | local block=hit.Parent:findFirstChild("Block")
| |
| 655 | if block~=nil then | |
| 656 | print(block.className) | |
| 657 | if block.className=="NumberValue" then | |
| 658 | if block.Value>0 then | |
| 659 | blocked=true | |
| 660 | if decreaseblock==nil then | |
| 661 | block.Value=block.Value-1 | |
| 662 | end | |
| 663 | end | |
| 664 | end | |
| 665 | if block.className=="IntValue" then | |
| 666 | if block.Value>0 then | |
| 667 | blocked=true | |
| 668 | if decreaseblock~=nil then | |
| 669 | block.Value=block.Value-1 | |
| 670 | end | |
| 671 | end | |
| 672 | end | |
| 673 | end | |
| 674 | if blocked==false then | |
| 675 | -- h:TakeDamage(Damage) | |
| 676 | h.Health=h.Health-Damage | |
| 677 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, Part.BrickColor.Color) | |
| 678 | else | |
| 679 | h.Health=h.Health-(Damage/2) | |
| 680 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Bright blue").Color)
| |
| 681 | end | |
| 682 | if Type=="Knockdown" then | |
| 683 | local hum=hit.Parent.Humanoid | |
| 684 | hum.PlatformStand=true | |
| 685 | coroutine.resume(coroutine.create(function(HHumanoid) | |
| 686 | swait(1) | |
| 687 | HHumanoid.PlatformStand=false | |
| 688 | end),hum) | |
| 689 | local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit | |
| 690 | --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) | |
| 691 | local bodvol=Instance.new("BodyVelocity")
| |
| 692 | bodvol.velocity=angle*knockback | |
| 693 | bodvol.P=5000 | |
| 694 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
| 695 | bodvol.Parent=hit | |
| 696 | local rl=Instance.new("BodyAngularVelocity")
| |
| 697 | rl.P=3000 | |
| 698 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
| 699 | rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
| 700 | rl.Parent=hit | |
| 701 | game:GetService("Debris"):AddItem(bodvol,.5)
| |
| 702 | game:GetService("Debris"):AddItem(rl,.5)
| |
| 703 | elseif Type=="Normal" then | |
| 704 | local vp=Instance.new("BodyVelocity")
| |
| 705 | vp.P=500 | |
| 706 | vp.maxForce=Vector3.new(math.huge,0,math.huge) | |
| 707 | -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback | |
| 708 | if KnockbackType==1 then | |
| 709 | vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05 | |
| 710 | elseif KnockbackType==2 then | |
| 711 | vp.velocity=Property.CFrame.lookVector*knockback | |
| 712 | end | |
| 713 | if knockback>0 then | |
| 714 | vp.Parent=hit.Parent.Torso | |
| 715 | end | |
| 716 | game:GetService("Debris"):AddItem(vp,.5)
| |
| 717 | elseif Type=="Up" then | |
| 718 | local bodyVelocity=Instance.new("BodyVelocity")
| |
| 719 | bodyVelocity.velocity=vt(0,60,0) | |
| 720 | bodyVelocity.P=5000 | |
| 721 | bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
| 722 | bodyVelocity.Parent=hit | |
| 723 | game:GetService("Debris"):AddItem(bodyVelocity,1)
| |
| 724 | local rl=Instance.new("BodyAngularVelocity")
| |
| 725 | rl.P=3000 | |
| 726 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
| 727 | rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30)) | |
| 728 | rl.Parent=hit | |
| 729 | game:GetService("Debris"):AddItem(rl,.5)
| |
| 730 | elseif Type=="Snare" then | |
| 731 | local bp=Instance.new("BodyPosition")
| |
| 732 | bp.P=2000 | |
| 733 | bp.D=100 | |
| 734 | bp.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
| 735 | bp.position=hit.Parent.Torso.Position | |
| 736 | bp.Parent=hit.Parent.Torso | |
| 737 | game:GetService("Debris"):AddItem(bp,1)
| |
| 738 | elseif Type=="Target" then | |
| 739 | local Targetting = false | |
| 740 | if Targetting==false then | |
| 741 | ZTarget=hit.Parent.Torso | |
| 742 | coroutine.resume(coroutine.create(function(Part) | |
| 743 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
| |
| 744 | swait(5) | |
| 745 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
| |
| 746 | end),ZTarget) | |
| 747 | local TargHum=ZTarget.Parent:findFirstChild("Humanoid")
| |
| 748 | local targetgui=Instance.new("BillboardGui")
| |
| 749 | targetgui.Parent=ZTarget | |
| 750 | targetgui.Size=UDim2.new(10,100,10,100) | |
| 751 | local targ=Instance.new("ImageLabel")
| |
| 752 | targ.Parent=targetgui | |
| 753 | targ.BackgroundTransparency=1 | |
| 754 | targ.Image="rbxassetid://4834067" | |
| 755 | targ.Size=UDim2.new(1,0,1,0) | |
| 756 | local cam = game.Workspace.CurrentCamera | |
| 757 | cam.CameraType="Scriptable" | |
| 758 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
| 759 | local dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
| 760 | workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
| 761 | Targetting=true | |
| 762 | RocketTarget=ZTarget | |
| 763 | for i=1,Property do | |
| 764 | --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do | |
| 765 | if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then | |
| 766 | swait() | |
| 767 | end | |
| 768 | --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100) | |
| 769 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
| 770 | dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
| 771 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0) | |
| 772 | end | |
| 773 | Targetting=false | |
| 774 | RocketTarget=nil | |
| 775 | targetgui.Parent=nil | |
| 776 | cam.CameraType="Custom" | |
| 777 | end | |
| 778 | end | |
| 779 | local debounce=Instance.new("BoolValue")
| |
| 780 | debounce.Name="DebounceHit" | |
| 781 | debounce.Parent=hit.Parent | |
| 782 | debounce.Value=true | |
| 783 | game:GetService("Debris"):AddItem(debounce,Delay)
| |
| 784 | c=Instance.new("ObjectValue")
| |
| 785 | c.Name="creator" | |
| 786 | c.Value=Player | |
| 787 | c.Parent=h | |
| 788 | game:GetService("Debris"):AddItem(c,.5)
| |
| 789 | end | |
| 790 | end | |
| 791 | ||
| 792 | ||
| 793 | function ShowDamage(Pos, Text, Time, Color) | |
| 794 | local Rate = (1 / 30) | |
| 795 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
| 796 | local Text = (Text or "") | |
| 797 | local Time = (Time or 2) | |
| 798 | local Color = (Color or Color3.new(1, 0, 0)) | |
| 799 | local EffectPart=part(1,workspace,0,0,BrickColor.new("Really black"),"Effect",vt(0,0,0),"Granite")
| |
| 800 | EffectPart.Anchored = true | |
| 801 | local BillboardGui = Instance.new("BillboardGui")
| |
| 802 | BillboardGui.Size = UDim2.new(3, 0, 3, 0) | |
| 803 | BillboardGui.Adornee = EffectPart | |
| 804 | local TextLabel = Instance.new("TextLabel")
| |
| 805 | TextLabel.BackgroundTransparency = 1 | |
| 806 | TextLabel.Size = UDim2.new(1, 0, 1, 0) | |
| 807 | TextLabel.Text = Text | |
| 808 | TextLabel.TextColor3 = Color | |
| 809 | TextLabel.TextScaled = true | |
| 810 | TextLabel.Font = Enum.Font.ArialBold | |
| 811 | TextLabel.Parent = BillboardGui | |
| 812 | BillboardGui.Parent = EffectPart | |
| 813 | game.Debris:AddItem(EffectPart, (Time + 0.1)) | |
| 814 | EffectPart.Parent = game:GetService("Workspace")
| |
| 815 | Delay(0, function() | |
| 816 | local Frames = (Time / Rate) | |
| 817 | for Frame = 1, Frames do | |
| 818 | wait(Rate) | |
| 819 | local Percent = (Frame / Frames) | |
| 820 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
| 821 | TextLabel.TextTransparency = Percent | |
| 822 | end | |
| 823 | if EffectPart and EffectPart.Parent then | |
| 824 | EffectPart:Destroy() | |
| 825 | end | |
| 826 | end) | |
| 827 | end | |
| 828 | ||
| 829 | function MagniDamage(Hit,Part,magni,mindam,maxdam,knock,Type) | |
| 830 | for _,c in pairs(workspace:children()) do | |
| 831 | local hum=c:findFirstChild("Humanoid")
| |
| 832 | if hum~=nil then | |
| 833 | local head=c:findFirstChild("Torso")
| |
| 834 | if head~=nil then | |
| 835 | local targ=head.Position-Part.Position | |
| 836 | local mag=targ.magnitude | |
| 837 | if mag<=magni and c.Name~=Player.Name then | |
| 838 | Damagefunc(Hit,head,mindam,maxdam,knock,Type,RootPart,.2,1,3) | |
| 839 | end | |
| 840 | end | |
| 841 | end | |
| 842 | end | |
| 843 | end | |
| 844 | ||
| 845 | mod3 = Instance.new("Model",RightLeg)
| |
| 846 | ||
| 847 | function Stomp() | |
| 848 | local function fpart(formfactor,parent,reflectance,transparency,brickcolor,name,size,material) | |
| 849 | local fp = it("Part")
| |
| 850 | fp.formFactor = formfactor | |
| 851 | fp.Parent = parent | |
| 852 | fp.Reflectance = reflectance | |
| 853 | fp.Transparency = transparency | |
| 854 | fp.CanCollide = false | |
| 855 | fp.Locked=true | |
| 856 | fp.BrickColor = brickcolor | |
| 857 | fp.Name = name | |
| 858 | fp.Size = size | |
| 859 | fp.Position = Torso.Position | |
| 860 | NoOutline(fp) | |
| 861 | fp.Material=material | |
| 862 | fp:BreakJoints() | |
| 863 | return fp | |
| 864 | end | |
| 865 | local function fmesh(Mesh,part,meshtype,meshid,offset,scale) | |
| 866 | local mesh = it(Mesh) | |
| 867 | mesh.Parent = part | |
| 868 | if Mesh=="SpecialMesh" then | |
| 869 | mesh.MeshType = meshtype | |
| 870 | mesh.MeshId = meshid | |
| 871 | end | |
| 872 | mesh.Offset=offset | |
| 873 | mesh.Scale=scale | |
| 874 | return mesh | |
| 875 | end | |
| 876 | local part = fpart("Custom",mod3,0,0.7,BrickColor.new("Crimson"),"Wave",vt(0.2,0.2,0.2),"Neon")
| |
| 877 | part.Anchored = true | |
| 878 | local mesh = fmesh("SpecialMesh",part,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(25,25,25))
| |
| 879 | local part2 = fpart("Custom",mod3,0,0.7,BrickColor.new("Crimson"),"Wave",vt(0.2,0.2,0.2),"Neon")
| |
| 880 | part2.Anchored = true | |
| 881 | local mesh2 = fmesh("SpecialMesh",part2,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(15,15,15))
| |
| 882 | local part3 = fpart("Custom",mod3,0,0.7,BrickColor.new("Crimson"),"Wave",vt(0.2,0.2,0.2),"Neon")
| |
| 883 | part3.CFrame=RightLeg.CFrame*CFrame.new(0,-3,0) | |
| 884 | part3.Anchored = true | |
| 885 | local mesh3 = fmesh("SpecialMesh",part3,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(12,12,12))
| |
| 886 | MagniDamage(part,part,30,10,15,math.random(10,20),"Knockdown") | |
| 887 | coroutine.resume(coroutine.create(function() | |
| 888 | for i=0,3.8,0.05 do | |
| 889 | wait() | |
| 890 | part.CFrame=part.CFrame | |
| 891 | part.Transparency=i | |
| 892 | mesh.Scale=mesh.Scale+Vector3.new(2.8,2.8,2.8) | |
| 893 | part2.CFrame=part2.CFrame | |
| 894 | part2.Transparency=i | |
| 895 | mesh2.Scale=mesh2.Scale+Vector3.new(1,1,1) | |
| 896 | part3.CFrame=part3.CFrame | |
| 897 | part3.Transparency=i | |
| 898 | mesh3.Scale=mesh3.Scale+Vector3.new(1.5,1.5,1.5) | |
| 899 | end | |
| 900 | end)) | |
| 901 | end | |
| 902 | ||
| 903 | model = Instance.new("Model",Character)
| |
| 904 | model.Name = "Realm" | |
| 905 | ||
| 906 | local handle=part(1,model,0,0,BrickColor.new("Really black"),"Handle",vt(0.2, 1.5, 0.2),"Granite")
| |
| 907 | local prt1=part(1,model,0,0,BrickColor.new("Really black"),"Part1",vt(1.22, 7.2, 0.22),"Granite")
| |
| 908 | local prt2=part(1,model,0,0,BrickColor.new("Maroon"),"Part2",vt(0.22, 2.4, 0.22),"Neon")
| |
| 909 | local prt3=part(1,model,0,0,BrickColor.new("Maroon"),"Part3",vt(0.42, 0.85, 1.05),"Neon")
| |
| 910 | local prt4=part(1,model,0,0,BrickColor.new("Really black"),"Part4",vt(0.22, 1.5, 0.22),"Granite")
| |
| 911 | local prt5=part(1,model,0,0,BrickColor.new("Really black"),"Part5",vt(0.44, 0.6, 0.8),"Granite")
| |
| 912 | local prt6=part(1,model,0,0,BrickColor.new("Maroon"),"Part6",vt(1.6, 1.4, 0.2),"Neon")
| |
| 913 | local prt7=part(0,model,0,0,BrickColor.new("Really black"),"Part7",vt(0.4, 0.4, 0.4),"Granite")
| |
| 914 | local prt8=part(1,model,0,0,BrickColor.new("Really black"),"Part8",vt(0.4, 0.3, 0.22),"Granite")
| |
| 915 | local prt9=part(1,model,0,0,BrickColor.new("Really black"),"Part9",vt(0.4, 1.3, 1.5),"Granite")
| |
| 916 | local prt10=part(1,model,0,0,BrickColor.new("Maroon"),"Part10",vt(0.3, 1.5, 1.7),"Neon")
| |
| 917 | local prt11=part(1,model,0,0,BrickColor.new("Maroon"),"Part11",vt(0.4, 1.4, 0.22),"Neon")
| |
| 918 | local prt13=part(1,model,0,0,BrickColor.new("Maroon"),"Part13",vt(1.3, 7.3, 0.2),"Neon")
| |
| 919 | local prt15=part(1,model,0,0,BrickColor.new("Maroon"),"Part15",vt(1, 0.5, 0.22),"Neon")
| |
| 920 | local prt16=part(1,model,0,0,BrickColor.new("Maroon"),"Part16",vt(1, 0.5, 0.22),"Neon")
| |
| 921 | ||
| 922 | local handlemesh=mesh("SpecialMesh",handle,"FileMesh","http://www.roblox.com/asset/?id=1033714",vt(0,0,0),vt(0.2,5,0.2))
| |
| 923 | local msh2=mesh("SpecialMesh",prt2,"FileMesh","http://www.roblox.com/asset/?id=1033714",vt(0,0,0),vt(0.2, 5, 0.2))
| |
| 924 | local msh3=mesh("SpecialMesh",prt3,"Cylinder","",vt(0,0,0),vt(1,1,2))
| |
| 925 | local msh4=mesh("SpecialMesh",prt4,"FileMesh","http://www.roblox.com/asset/?id=1033714",vt(0,0,0),vt(0.2, 5, 0.2))
| |
| 926 | local msh5=mesh("SpecialMesh",prt5,"Cylinder","",vt(0,0,0),vt(1,1,1))
| |
| 927 | local msh6=mesh("SpecialMesh",prt6,"Sphere","",vt(0,0,0),vt(1,1,1))
| |
| 928 | local msh8=mesh("SpecialMesh",prt8,"FileMesh","http://www.roblox.com/asset/?id=192551369",vt(0,0,0),vt(0.5, 0.5, 0.2))
| |
| 929 | local msh9=mesh("SpecialMesh",prt9,"Cylinder","",vt(0,0,0),vt(1, 1, 2))
| |
| 930 | local msh10=mesh("SpecialMesh",prt10,"Cylinder","",vt(0,0,0),vt(1, 1, 2))
| |
| 931 | ||
| 932 | local handleweld=weld(handle,handle,RightArm,euler(89.75, 0, 0)*cf(0,1,0)) | |
| 933 | local wld1=weld(prt1,prt1,handle,euler(0, 80.1, 0)*cf(-0, 4.95, -0.02)) | |
| 934 | local wld2=weld(prt2,prt2,handle,euler(0, 80.1, 0)*cf(0.005, 0.15, -0.005)) | |
| 935 | local wld3=weld(prt3,prt3,handle,euler(0, 12.5, 0)*cf(-0, 1.303, -0.028)) | |
| 936 | local wld4=weld(prt4,prt4,handle,euler(0, 80.1, 0)*cf(0.005, 0.4, -0.005)) | |
| 937 | local wld5=weld(prt5,prt5,handle,euler(0, 12.5, 0)*cf(-0, 1.303, -0.028)) | |
| 938 | local wld6=weld(prt6,prt6,handle,euler(0, 80.1, 0)*cf(-0, 8.8, -0.02)) | |
| 939 | local wld7=weld(prt7,prt7,handle,euler(0, 80.1, 0)*cf(0.005, -1.8, -0.005)) | |
| 940 | local wld8=weld(prt8,prt8,handle,euler(0, -80.1, 0)*cf(-0, 1.6, -0.02)) | |
| 941 | local wld9=weld(prt9,prt9,handle,euler(0, 12.5, 0)*cf(-0, 1.303, -0.028)) | |
| 942 | local wld10=weld(prt10,prt10,handle,euler(0, 12.5, 0)*cf(-0, 1.303, -0.028)) | |
| 943 | local wld11=weld(prt11,prt11,handle,euler(0, 80.1, 0)*cf(-0.113, 8.501, -0.01)) | |
| 944 | local wld13=weld(prt13,prt13,handle,euler(0, 80.1, 0)*cf(-0, 4.95, -0.02)) | |
| 945 | local wld15=weld(prt15,prt15,handle,euler(0, 80.1, 0)*cf(-0.011, 3.903, 0)) | |
| 946 | local wld16=weld(prt16,prt16,handle,euler(0, 80.1, 0)*cf(-0.011, 5.903, 0)) | |
| 947 | ||
| 948 | function attackone() | |
| 949 | attack = true | |
| 950 | local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"}
| |
| 951 | local con=prt1.Touched:connect(function(hit) | |
| 952 | Damagefunc(prt1,hit,5,13,5,"Normal",RootPart,.2,1,3) | |
| 953 | end) | |
| 954 | local fx=prt1.Touched:connect(function(part) | |
| 955 | local human=part.Parent:findFirstChild("Humanoid")
| |
| 956 | if human~=nil and bounce==false then | |
| 957 | bounce=true | |
| 958 | local rndm=math.random(1,#hitsounds) | |
| 959 | local r=rndm | |
| 960 | so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,1)
| |
| 961 | end | |
| 962 | end) | |
| 963 | for i = 0,1,0.1 do | |
| 964 | swait() | |
| 965 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-50)),0.4) | |
| 966 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(50)),0.4) | |
| 967 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(10), math.rad(100)),0.4) | |
| 968 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)),0.4) | |
| 969 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(120),math.rad(0)),0.4) | |
| 970 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),0.4) | |
| 971 | end | |
| 972 | so("http://www.roblox.com/asset/?id=199145841",handle,1,.9)
| |
| 973 | for i = 0,1,0.1 do | |
| 974 | swait() | |
| 975 | local blcf = prt1.CFrame*CFrame.new(0,.5,0) | |
| 976 | if scfr and (prt1.Position-scfr.p).magnitude > .1 then | |
| 977 | local h = 10 | |
| 978 | local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) | |
| 979 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
| 980 | local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) | |
| 981 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
| 982 | scfr = blcf | |
| 983 | elseif not scfr then | |
| 984 | scfr = blcf | |
| 985 | end | |
| 986 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(80)),0.4) | |
| 987 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(-10),math.rad(-80)),0.4) | |
| 988 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(120), math.rad(90)),0.4) | |
| 989 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)),0.4) | |
| 990 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(50),math.rad(0)),0.4) | |
| 991 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),0.4) | |
| 992 | end | |
| 993 | attack = false | |
| 994 | bounce=false | |
| 995 | scfr=nil | |
| 996 | fx:disconnect() | |
| 997 | con:disconnect() | |
| 998 | end | |
| 999 | ||
| 1000 | function attacktwo() | |
| 1001 | attack=true | |
| 1002 | local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"}
| |
| 1003 | local con=prt1.Touched:connect(function(hit) | |
| 1004 | Damagefunc(prt1,hit,5,15,5,"Normal",RootPart,.2,1,3) end) | |
| 1005 | local fx=prt1.Touched:connect(function(part) | |
| 1006 | local human=part.Parent:findFirstChild("Humanoid")
| |
| 1007 | if human~=nil and bounce==false then | |
| 1008 | bounce=true | |
| 1009 | local rndm=math.random(1,#hitsounds) | |
| 1010 | local r=rndm | |
| 1011 | so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,1)
| |
| 1012 | end | |
| 1013 | end) | |
| 1014 | for i=0,1,.1 do | |
| 1015 | swait() | |
| 1016 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(70)),0.4) | |
| 1017 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(-10),math.rad(-70)),0.4) | |
| 1018 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(120), math.rad(90)),0.4) | |
| 1019 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)),0.4) | |
| 1020 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(40),math.rad(0)),0.4) | |
| 1021 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-140),math.rad(-10)),0.4) | |
| 1022 | end | |
| 1023 | so("http://www.roblox.com/asset/?id=199145887",handle,1,1)
| |
| 1024 | for i = 0,1,0.1 do | |
| 1025 | swait() | |
| 1026 | local blcf = prt1.CFrame*CFrame.new(0,.5,0) | |
| 1027 | if scfr and (prt1.Position-scfr.p).magnitude > .1 then | |
| 1028 | local h = 10 | |
| 1029 | local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) | |
| 1030 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
| 1031 | local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) | |
| 1032 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
| 1033 | scfr = blcf | |
| 1034 | elseif not scfr then | |
| 1035 | scfr = blcf | |
| 1036 | end | |
| 1037 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.4) | |
| 1038 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(80)),0.4) | |
| 1039 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(10), math.rad(90)),0.4) | |
| 1040 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-90)),0.4) | |
| 1041 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(140),math.rad(0)),0.4) | |
| 1042 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-40),math.rad(-10)),0.4) | |
| 1043 | end | |
| 1044 | scfr=nil | |
| 1045 | attack=false | |
| 1046 | bounce=false | |
| 1047 | con:disconnect() | |
| 1048 | fx:disconnect() | |
| 1049 | end | |
| 1050 | ||
| 1051 | function Wave() | |
| 1052 | local function wpart(formfactor,parent,material,reflectance,transparency,brickcolor,name,size) | |
| 1053 | local fp=it("Part")
| |
| 1054 | fp.formFactor=formfactor | |
| 1055 | fp.Parent=parent | |
| 1056 | fp.Reflectance=reflectance | |
| 1057 | fp.Transparency=transparency | |
| 1058 | fp.CanCollide=false | |
| 1059 | fp.Locked=true | |
| 1060 | fp.BrickColor=BrickColor.new(tostring(brickcolor)) | |
| 1061 | fp.Name=name | |
| 1062 | fp.Size=size | |
| 1063 | fp.Position=Character.Torso.Position | |
| 1064 | NoOutline(fp) | |
| 1065 | fp.Material=material | |
| 1066 | fp:BreakJoints() | |
| 1067 | return fp | |
| 1068 | end | |
| 1069 | attack=true | |
| 1070 | local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"}
| |
| 1071 | local con=prt1.Touched:connect(function(hit) | |
| 1072 | Damagefunc(prt1,hit,4,31,5,"Normal",RootPart,.2,1,3) end) | |
| 1073 | local fx=prt1.Touched:connect(function(part) | |
| 1074 | local human=part.Parent:findFirstChild("Humanoid")
| |
| 1075 | if human~=nil and bounce==false then | |
| 1076 | bounce=true | |
| 1077 | local rndm=math.random(1,#hitsounds) | |
| 1078 | local r=rndm | |
| 1079 | so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,1)
| |
| 1080 | end | |
| 1081 | end) | |
| 1082 | for i=0,1,.1 do | |
| 1083 | swait() | |
| 1084 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-30)),0.4) | |
| 1085 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(30)),.3) | |
| 1086 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(170), math.rad(0), math.rad(20)),0.4) | |
| 1087 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(25), math.rad(0), math.rad(-30)),0.4) | |
| 1088 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(105),math.rad(0)),0.4) | |
| 1089 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-75),math.rad(-10)),0.4) | |
| 1090 | end | |
| 1091 | so("http://www.roblox.com/asset/?id=199145913",handle,1,.9)
| |
| 1092 | local hit,pos=rayCast(prt1.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,100,Character) | |
| 1093 | if hit~=nil then | |
| 1094 | local ref=wpart(3,workspace,"SmoothPlastic",0,1,BrickColor.new("Black"),"Effect",vt())
| |
| 1095 | ref.Anchored=true | |
| 1096 | ref.CFrame=cf(pos) | |
| 1097 | game:GetService("Debris"):AddItem(ref,3)
| |
| 1098 | local function BlastEffect(brickcolor,cframe,x1,y1,z1,x2,y2,z2) | |
| 1099 | local prt=wpart(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 1100 | prt.Anchored=true | |
| 1101 | prt.CFrame = cframe | |
| 1102 | local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
| |
| 1103 | coroutine.resume(coroutine.create(function() | |
| 1104 | for i=0,1,0.05 do | |
| 1105 | wait() | |
| 1106 | prt.Transparency=i | |
| 1107 | msh.Scale=msh.Scale+vt(x2,y2,z2) | |
| 1108 | end | |
| 1109 | prt.Parent=nil | |
| 1110 | end)) | |
| 1111 | end | |
| 1112 | local function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
| 1113 | local prt=wpart(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt()) | |
| 1114 | prt.Anchored=true | |
| 1115 | prt.CFrame=cframe | |
| 1116 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
| |
| 1117 | game:GetService("Debris"):AddItem(prt,2)
| |
| 1118 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 1119 | local wld=nil | |
| 1120 | for i=0,1,delay do | |
| 1121 | wait() | |
| 1122 | Part.CFrame=Part.CFrame | |
| 1123 | Part.Transparency=i | |
| 1124 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
| 1125 | end | |
| 1126 | Part.Parent=nil | |
| 1127 | end),prt,msh) | |
| 1128 | end | |
| 1129 | for i = 5,1,-1 do | |
| 1130 | BlastEffect(BrickColor.new("Maroon"),cf(pos),1,1,1,1,1,1)
| |
| 1131 | MagicCircle(BrickColor.new("Maroon"),cf(pos),3,3,3,5,5,5,0.05)
| |
| 1132 | swait() | |
| 1133 | end | |
| 1134 | MagniDamage(ref,ref,13,15,25,math.random(10,20),"Knockdown") | |
| 1135 | end | |
| 1136 | for i = 0,1,0.1 do | |
| 1137 | swait() | |
| 1138 | local blcf = prt1.CFrame*CFrame.new(0,.5,0) | |
| 1139 | if scfr and (prt1.Position-scfr.p).magnitude > .1 then | |
| 1140 | local h = 5 | |
| 1141 | local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) | |
| 1142 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
| 1143 | local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) | |
| 1144 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
| 1145 | scfr = blcf | |
| 1146 | elseif not scfr then | |
| 1147 | scfr = blcf | |
| 1148 | end | |
| 1149 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),0.4) | |
| 1150 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-50)),.3) | |
| 1151 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)),0.4) | |
| 1152 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)),0.4) | |
| 1153 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(80),math.rad(0)),0.4) | |
| 1154 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-100),math.rad(-10)),0.4) | |
| 1155 | end | |
| 1156 | attack=false | |
| 1157 | bounce=false | |
| 1158 | scfr=nil | |
| 1159 | con:disconnect() | |
| 1160 | fx:disconnect() | |
| 1161 | end | |
| 1162 | ||
| 1163 | function Charge() | |
| 1164 | attack = true | |
| 1165 | local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"}
| |
| 1166 | local con=prt1.Touched:connect(function(hit) | |
| 1167 | Damagefunc(prt1,hit,10,40,50,"Normal",RootPart,.2,1,3) end) | |
| 1168 | local fx=prt1.Touched:connect(function(part) | |
| 1169 | local human=part.Parent:findFirstChild("Humanoid")
| |
| 1170 | if human~=nil and bounce==false then | |
| 1171 | bounce=true | |
| 1172 | local rndm=math.random(1,#hitsounds) | |
| 1173 | local r=rndm | |
| 1174 | so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,1)
| |
| 1175 | end | |
| 1176 | end) | |
| 1177 | for i = 0,1,0.1 do | |
| 1178 | swait() | |
| 1179 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(-5),math.rad(-60)),.3) | |
| 1180 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(60)),.3) | |
| 1181 | RW.C0=clerp(RW.C0,cf(1.5, 0.8, 0.2) * angles(math.rad(5), math.rad(-15), math.rad(112)), 0.3) | |
| 1182 | LW.C0=clerp(LW.C0,cf(-1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(-20)), 0.3) | |
| 1183 | RH.C0=clerp(RH.C0,cf(1.1,-1,0)*angles(math.rad(-5),math.rad(120),math.rad(-8)),.3) | |
| 1184 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(5),math.rad(-60),math.rad(0)),.3) | |
| 1185 | end | |
| 1186 | so("http://www.roblox.com/asset/?id=199145433",prt1,1,1.1)
| |
| 1187 | local v=it("BodyVelocity",Torso)
| |
| 1188 | v.maxForce=Vector3.new(4e+005,4e+005,4e+005)*1 | |
| 1189 | v.velocity=RootPart.CFrame.lookVector*100 | |
| 1190 | function ppart(formfactor,parent,material,reflectance,transparency,brickcolor,name,size) | |
| 1191 | local fp=it("Part")
| |
| 1192 | fp.formFactor=formfactor | |
| 1193 | fp.Parent=parent | |
| 1194 | fp.Reflectance=reflectance | |
| 1195 | fp.Transparency=transparency | |
| 1196 | fp.CanCollide=false | |
| 1197 | fp.Locked=true | |
| 1198 | fp.BrickColor=BrickColor.new(tostring(brickcolor)) | |
| 1199 | fp.Name=name | |
| 1200 | fp.Size=size | |
| 1201 | fp.Position=Character.Torso.Position | |
| 1202 | NoOutline(fp) | |
| 1203 | fp.Material=material | |
| 1204 | fp:BreakJoints() | |
| 1205 | return fp | |
| 1206 | end | |
| 1207 | for i=5,1,-1 do | |
| 1208 | for i=1,4 do | |
| 1209 | local prt=ppart(3,workspace,"SmoothPlastic",0,0,"Maroon","Effect",vt(0.5,0.5,0.5)) | |
| 1210 | prt.Anchored=true | |
| 1211 | prt.Position=prt1.Position | |
| 1212 | local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(1,1,1))
| |
| 1213 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
| 1214 | for i=0,1,0.03 do | |
| 1215 | wait() | |
| 1216 | Part.CFrame=Part.CFrame | |
| 1217 | Part.Transparency=i | |
| 1218 | Mesh.Scale=Mesh.Scale+vt(1,1,1) | |
| 1219 | end | |
| 1220 | Part.Parent=nil | |
| 1221 | end),prt,msh) | |
| 1222 | MagniDamage(prt,prt,15,5,15,-10,"Normal") | |
| 1223 | end | |
| 1224 | swait(3) | |
| 1225 | end | |
| 1226 | local hitbox = prt1.Touched:connect(function(hit) | |
| 1227 | Damagefunc(prt1,hit,5,10,15,"Normal",RootPart,.2,1,3) | |
| 1228 | end) | |
| 1229 | hitbox:disconnect() | |
| 1230 | for i = 0,1,0.1 do | |
| 1231 | swait() | |
| 1232 | local blcf = prt1.CFrame*cf(0,0,0) | |
| 1233 | if scfr and (prt1.Position-scfr.p).magnitude > .1 then | |
| 1234 | local h = 5 | |
| 1235 | local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) | |
| 1236 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
| 1237 | local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) | |
| 1238 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
| 1239 | scfr = blcf | |
| 1240 | elseif not scfr then | |
| 1241 | scfr = blcf | |
| 1242 | end | |
| 1243 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(5),math.rad(60)),.3) | |
| 1244 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-60)),.3) | |
| 1245 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(60), math.rad(100)), 0.3) | |
| 1246 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-15)), 0.3) | |
| 1247 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3) | |
| 1248 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3) | |
| 1249 | end | |
| 1250 | v.Parent=nil | |
| 1251 | scfr=nil | |
| 1252 | attack = false | |
| 1253 | bounce=false | |
| 1254 | con:disconnect() | |
| 1255 | fx:disconnect() | |
| 1256 | end | |
| 1257 | ||
| 1258 | function Execution() | |
| 1259 | local function spart(formfactor,parent,material,reflectance,transparency,brickcolor,name,size) | |
| 1260 | local fp=it("Part")
| |
| 1261 | fp.formFactor=formfactor | |
| 1262 | fp.Parent=parent | |
| 1263 | fp.Reflectance=reflectance | |
| 1264 | fp.Transparency=transparency | |
| 1265 | fp.CanCollide=false | |
| 1266 | fp.Locked=true | |
| 1267 | fp.BrickColor=BrickColor.new(tostring(brickcolor)) | |
| 1268 | fp.Name=name | |
| 1269 | fp.Size=size | |
| 1270 | fp.Position=Character.Torso.Position | |
| 1271 | NoOutline(fp) | |
| 1272 | fp.Material=material | |
| 1273 | fp:BreakJoints() | |
| 1274 | return fp | |
| 1275 | end | |
| 1276 | attack=true | |
| 1277 | local con1=prt1.Touched:connect(function(hit) | |
| 1278 | Damagefunc(prt1,hit,12,25,100,"Normal",RootPart,.2,1) | |
| 1279 | end) | |
| 1280 | for i=0,1,0.03 do | |
| 1281 | swait() | |
| 1282 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(60)),.1) | |
| 1283 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-60)),.1) | |
| 1284 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(90),math.rad(120)),.1) | |
| 1285 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(100), math.rad(0), math.rad(0)), 0.1) | |
| 1286 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10)),.1) | |
| 1287 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.2) | |
| 1288 | end | |
| 1289 | so("http://roblox.com/asset/?id=92597369",prt1,1,0.5)
| |
| 1290 | so("http://roblox.com/asset/?id=28144425",Torso,1,0.5)
| |
| 1291 | hitconasdf = prt1.Touched:connect(function(hit) | |
| 1292 | local hum12 = hit.Parent:FindFirstChild("Humanoid")
| |
| 1293 | if hum12 and not hum12:IsDescendantOf(Character) then | |
| 1294 | so('http://roblox.com/asset/?id=154965973',prt1,1,0.8)
| |
| 1295 | hitconasdf:disconnect() | |
| 1296 | end | |
| 1297 | end) | |
| 1298 | for i=0,1,0.03 do | |
| 1299 | swait() | |
| 1300 | local blcf = prt1.CFrame*CFrame.new(0,.5,0) | |
| 1301 | if scfr and (prt1.Position-scfr.p).magnitude > .1 then | |
| 1302 | local h = 5 | |
| 1303 | local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) | |
| 1304 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
| 1305 | local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) | |
| 1306 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
| 1307 | scfr = blcf | |
| 1308 | elseif not scfr then | |
| 1309 | scfr = blcf | |
| 1310 | end | |
| 1311 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-90)),.2) | |
| 1312 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(60)),.2) | |
| 1313 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(math.rad(0),math.rad(-20),math.rad(70)),.2) | |
| 1314 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-40)), 0.2) | |
| 1315 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10)),.2) | |
| 1316 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.2) | |
| 1317 | end | |
| 1318 | attack=false | |
| 1319 | con1:disconnect() | |
| 1320 | scfr = nil | |
| 1321 | pcall(function() | |
| 1322 | hitconasdf:disconnect() | |
| 1323 | end) | |
| 1324 | end | |
| 1325 | ||
| 1326 | function Destroyer() | |
| 1327 | attack=true | |
| 1328 | local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"}
| |
| 1329 | local con=prt1.Touched:connect(function(hit) | |
| 1330 | Damagefunc(prt1,hit,4,31,5,"Normal",RootPart,.2,1,3) end) | |
| 1331 | local fx=prt1.Touched:connect(function(part) | |
| 1332 | local human=part.Parent:findFirstChild("Humanoid")
| |
| 1333 | if human~=nil and bounce==false then | |
| 1334 | bounce=true | |
| 1335 | local rndm=math.random(1,#hitsounds) | |
| 1336 | local r=rndm | |
| 1337 | so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,1)
| |
| 1338 | end | |
| 1339 | end) | |
| 1340 | for i=0,1,.1 do | |
| 1341 | swait() | |
| 1342 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-30)),0.4) | |
| 1343 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(30)),.3) | |
| 1344 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(170), math.rad(0), math.rad(20)),0.4) | |
| 1345 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(25), math.rad(0), math.rad(-30)),0.4) | |
| 1346 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(105),math.rad(0)),0.4) | |
| 1347 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-75),math.rad(-10)),0.4) | |
| 1348 | end | |
| 1349 | Stomp() | |
| 1350 | for i = 0,1,0.1 do | |
| 1351 | swait() | |
| 1352 | local blcf = prt1.CFrame*CFrame.new(0,.5,0) | |
| 1353 | if scfr and (prt1.Position-scfr.p).magnitude > .1 then | |
| 1354 | local h = 5 | |
| 1355 | local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) | |
| 1356 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
| 1357 | local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) | |
| 1358 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
| 1359 | scfr = blcf | |
| 1360 | elseif not scfr then | |
| 1361 | scfr = blcf | |
| 1362 | end | |
| 1363 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),0.4) | |
| 1364 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-50)),.3) | |
| 1365 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)),0.4) | |
| 1366 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)),0.4) | |
| 1367 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(80),math.rad(0)),0.4) | |
| 1368 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-100),math.rad(-10)),0.4) | |
| 1369 | end | |
| 1370 | attack=false | |
| 1371 | bounce=false | |
| 1372 | scfr=nil | |
| 1373 | con:disconnect() | |
| 1374 | fx:disconnect() | |
| 1375 | end | |
| 1376 | ||
| 1377 | Mouse.Button1Down:connect(function() | |
| 1378 | if attack==false then | |
| 1379 | if attacktype==1 then | |
| 1380 | attack=true | |
| 1381 | attacktype=2 | |
| 1382 | attackone() | |
| 1383 | elseif attacktype==2 then | |
| 1384 | attack=true | |
| 1385 | attacktype=1 | |
| 1386 | attacktwo() | |
| 1387 | end | |
| 1388 | end | |
| 1389 | end) | |
| 1390 | ||
| 1391 | skillattack1 = false | |
| 1392 | skillattack2 = false | |
| 1393 | skillattack3 = false | |
| 1394 | skillattack4 = false | |
| 1395 | ||
| 1396 | Mouse.KeyDown:connect(function(k) | |
| 1397 | k=k:lower() | |
| 1398 | if skillattack1 == false and attack == false and k == 'z' then | |
| 1399 | b.Size=UDim2.new(0, 0, 0, 100) | |
| 1400 | Wave() | |
| 1401 | for i = 1, 50 do | |
| 1402 | skillattack1=true | |
| 1403 | b.Size=b.Size+UDim2.new(0, 4, 0, 0) | |
| 1404 | wait() | |
| 1405 | end | |
| 1406 | skillattack1=false | |
| 1407 | elseif skillattack2 == false and attack == false and k == 'v' then | |
| 1408 | d.Size=UDim2.new(0, 0, 0, 100) | |
| 1409 | Execution() | |
| 1410 | for i = 1, 200 do | |
| 1411 | skillattack2=true | |
| 1412 | d.Size=d.Size+UDim2.new(0, 1, 0, 0) | |
| 1413 | wait() | |
| 1414 | end | |
| 1415 | skillattack2=false | |
| 1416 | elseif skillattack3 == false and attack == false and k == 'c' then | |
| 1417 | e.Size=UDim2.new(0, 0, 0, 100) | |
| 1418 | Charge() | |
| 1419 | for i = 1, 50 do | |
| 1420 | skillattack3=true | |
| 1421 | e.Size=e.Size+UDim2.new(0, 4, 0, 0) | |
| 1422 | wait() | |
| 1423 | end | |
| 1424 | skillattack3=false | |
| 1425 | elseif skillattack4 == false and attack == false and k == 'x' then | |
| 1426 | c.Size=UDim2.new(0, 0, 0, 100) | |
| 1427 | Destroyer() | |
| 1428 | for i = 1, 100 do | |
| 1429 | skillattack4=true | |
| 1430 | c.Size=c.Size+UDim2.new(0, 2, 0, 0) | |
| 1431 | wait() | |
| 1432 | end | |
| 1433 | skillattack4=false | |
| 1434 | end | |
| 1435 | end) | |
| 1436 | ||
| 1437 | ||
| 1438 | local sine = 0 | |
| 1439 | local change = 1 | |
| 1440 | local val = 0 | |
| 1441 | ||
| 1442 | while true do | |
| 1443 | swait() | |
| 1444 | sine = sine + change | |
| 1445 | local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
| 1446 | local velderp=RootPart.Velocity.y | |
| 1447 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
| 1448 | if equipped==true or equipped==false then | |
| 1449 | if attack==false then | |
| 1450 | idle=idle+1 | |
| 1451 | else | |
| 1452 | idle=0 | |
| 1453 | end | |
| 1454 | if idle>=500 then | |
| 1455 | if attack==false then | |
| 1456 | --Sheath() | |
| 1457 | end | |
| 1458 | end | |
| 1459 | if RootPart.Velocity.y > 1 and hitfloor==nil then | |
| 1460 | Anim="Jump" | |
| 1461 | if attack==false then | |
| 1462 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
| 1463 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-1.5),math.rad(0),math.rad(0)),.3) | |
| 1464 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-15), math.rad(0), math.rad(15)), 0.3) | |
| 1465 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-15), math.rad(0), math.rad(-15)), 0.3) | |
| 1466 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(20),math.rad(90),math.rad(-20)),.3) | |
| 1467 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(-20),math.rad(-90),math.rad(20)),.3) | |
| 1468 | end | |
| 1469 | elseif RootPart.Velocity.y < -1 and hitfloor==nil then | |
| 1470 | Anim="Fall" | |
| 1471 | if attack==false then | |
| 1472 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
| 1473 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(20),math.rad(0),math.rad(0)),.3) | |
| 1474 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-15), math.rad(0), math.rad(25)), 0.3) | |
| 1475 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-15), math.rad(0), math.rad(-25)), 0.3) | |
| 1476 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(10),math.rad(90),math.rad(20)),.3) | |
| 1477 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(-10),math.rad(-90),math.rad(-20)),.3) | |
| 1478 | end | |
| 1479 | elseif torvel<1 and hitfloor~=nil then | |
| 1480 | Anim="Idle" | |
| 1481 | if attack==false then | |
| 1482 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(15),math.rad(0),math.rad(-10)),.3) | |
| 1483 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
| 1484 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(40), math.rad(10), math.rad(-10)), 0.3) | |
| 1485 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(5), math.rad(0), math.rad(-5)), 0.3) | |
| 1486 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(80),math.rad(10)),.3) | |
| 1487 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-70),math.rad(-20)),.3) | |
| 1488 | end | |
| 1489 | elseif torvel>2 and hitfloor~=nil then | |
| 1490 | Anim="Walk" | |
| 1491 | if attack==false then | |
| 1492 | change=3 | |
| 1493 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(00)),.3) | |
| 1494 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3) | |
| 1495 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(20)), 0.3) | |
| 1496 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-10)), 0.3) | |
| 1497 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(10)),.3) | |
| 1498 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-10)),.3) | |
| 1499 | end | |
| 1500 | end | |
| 1501 | end | |
| 1502 | if #Effects>0 then | |
| 1503 | --table.insert(Effects,{prt,"Block1",delay})
| |
| 1504 | for e=1,#Effects do | |
| 1505 | if Effects[e]~=nil then | |
| 1506 | --for j=1,#Effects[e] do | |
| 1507 | local Thing=Effects[e] | |
| 1508 | if Thing~=nil then | |
| 1509 | local Part=Thing[1] | |
| 1510 | local Mode=Thing[2] | |
| 1511 | local Delay=Thing[3] | |
| 1512 | local IncX=Thing[4] | |
| 1513 | local IncY=Thing[5] | |
| 1514 | local IncZ=Thing[6] | |
| 1515 | if Thing[1].Transparency<=1 then | |
| 1516 | if Thing[2]=="Block1" then | |
| 1517 | Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 1518 | Mesh=Thing[1].Mesh | |
| 1519 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
| 1520 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 1521 | elseif Thing[2]=="Cylinder" then | |
| 1522 | --local TheCF=Thing[1].CFrame | |
| 1523 | --Thing[1].CFrame=TheCF | |
| 1524 | Mesh=Thing[1].Mesh | |
| 1525 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
| 1526 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 1527 | elseif Thing[2]=="Elec" then | |
| 1528 | Mesh=Thing[1].Mesh | |
| 1529 | Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9]) | |
| 1530 | --Thing[3]=Thing[3]+Delay | |
| 1531 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 1532 | --print(Thing[1].Transparency) | |
| 1533 | ||
| 1534 | --[[local prt=part(3,workspace,0,0,BrickColor.new("White"),"Part",vt(1,1,1))
| |
| 1535 | prt.Anchored=true | |
| 1536 | game:GetService("Debris"):AddItem(prt,2)
| |
| 1537 | xval=math.random() | |
| 1538 | yval=math.random() | |
| 1539 | zval=math.random() | |
| 1540 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(xval,yval,zval))
| |
| 1541 | Effects[#Effects+1]={prt,"Elec",0.05,x,y,z,xval,yval,zval}]]
| |
| 1542 | --[[coroutine.resume(coroutine.create(function(Part,Mesh,Frame,xvaal,yvaal,zvaal) | |
| 1543 | Part.CFrame=cf(Frame)*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z)) | |
| 1544 | for i=0,1,0.05 do | |
| 1545 | swait() | |
| 1546 | xvaal=xvaal-0.1 | |
| 1547 | yvaal=yvaal-0.1 | |
| 1548 | zvaal=zvaal-0.1 | |
| 1549 | Mesh.Scale=vt(xvaal,yvaal,zvaal) | |
| 1550 | Part.Transparency=i | |
| 1551 | end | |
| 1552 | Part.Parent=nil | |
| 1553 | end),prt,msh,cff,xval,yval,zval)]] | |
| 1554 | end | |
| 1555 | else | |
| 1556 | Part.Parent=nil | |
| 1557 | table.remove(Effects,e) | |
| 1558 | end | |
| 1559 | end | |
| 1560 | --end | |
| 1561 | end | |
| 1562 | end | |
| 1563 | end | |
| 1564 | end |