SHOW:
|
|
- or go back to the newest paste.
| 1 | - | if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
|
| 1 | + | --https://github.com/Mokiros/roblox-FE-compatibility |
| 2 | - | do |
| 2 | + | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
|
| 3 | - | script.Parent = owner.Character |
| 3 | + | local Player,game,owner = owner,game |
| 4 | - | local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
|
| 4 | + | local RealPlayer = Player |
| 5 | - | local function NewFakeEvent() |
| 5 | + | do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
|
| 6 | - | local Bind = Instance.new("BindableEvent")
|
| 6 | + | |
| 7 | - | local Fake;Fake = {Connections = {},
|
| 7 | + | |
| 8 | - | fakeEvent=true; |
| 8 | + | |
| 9 | - | Connect=function(self,Func) |
| 9 | + | |
| 10 | - | Bind.Event:connect(Func) |
| 10 | + | |
| 11 | - | self.Connections[Bind] = true |
| 11 | + | |
| 12 | - | return setmetatable({Connected = true},{
|
| 12 | + | |
| 13 | - | __index = function (self,Index) |
| 13 | + | |
| 14 | - | if Index:lower() == "disconnect" then |
| 14 | + | |
| 15 | - | return function() Fake.Connections[Bind] = false;self.Connected = false end |
| 15 | + | |
| 16 | Player = game:GetService("Players").LocalPlayer
| |
| 17 | - | return Fake[Index] |
| 17 | + | |
| 18 | - | end; |
| 18 | + | |
| 19 | - | __tostring = function() return "Connection" end; |
| 19 | + | |
| 20 | - | }) |
| 20 | + | |
| 21 | - | end} |
| 21 | + | |
| 22 | - | Fake.connect = Fake.Connect;return Fake; |
| 22 | + | |
| 23 | Humanoid = Character.Humanoid | |
| 24 | - | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
|
| 24 | + | |
| 25 | - | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
|
| 25 | + | |
| 26 | - | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
|
| 26 | + | |
| 27 | - | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
|
| 27 | + | |
| 28 | - | end};ContextActionService.UnBindAction = ContextActionService.BindAction |
| 28 | + | |
| 29 | - | local function TriggerEvent(self,Event,...) |
| 29 | + | |
| 30 | - | local Trigger = Mouse[Event] |
| 30 | + | |
| 31 | - | if Trigger and Trigger.fakeEvent and Trigger.Connections then |
| 31 | + | |
| 32 | - | for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end |
| 32 | + | |
| 33 | cf=CFrame.new | |
| 34 | euler=CFrame.fromEulerAnglesXYZ | |
| 35 | - | Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent |
| 35 | + | |
| 36 | - | Event.OnServerEvent:Connect(function(FiredBy,Input) |
| 36 | + | |
| 37 | - | if FiredBy.Name ~= owner.Name then return end |
| 37 | + | |
| 38 | - | if Input.MouseEvent then |
| 38 | + | |
| 39 | - | Mouse.Target = Input.Target;Mouse.Hit = Input.Hit |
| 39 | + | |
| 40 | local Effects={}
| |
| 41 | - | local Begin = Input.UserInputState == Enum.UserInputState.Begin |
| 41 | + | |
| 42 | - | if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end |
| 42 | + | |
| 43 | - | for _,Action in pairs(ContextActionService.Actions) do |
| 43 | + | |
| 44 | - | for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end |
| 44 | + | |
| 45 | local necko=euler(0,0,0)*cf(0,3,0) | |
| 46 | - | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) |
| 46 | + | |
| 47 | - | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) |
| 47 | + | |
| 48 | local hitfloor,posfloor=nil,nil | |
| 49 | - | end) |
| 49 | + | |
| 50 | - | InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService |
| 50 | + | |
| 51 | - | Event.Parent = NLS([[ |
| 51 | + | |
| 52 | - | local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
|
| 52 | + | |
| 53 | - | local Input = function(Input,gameProcessedEvent) |
| 53 | + | |
| 54 | - | if gameProcessedEvent then return end |
| 54 | + | |
| 55 | - | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
|
| 55 | + | |
| 56 | if workspace:findFirstChild("Neflhelm",true) ~= nil then
| |
| 57 | - | UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input) |
| 57 | + | |
| 58 | - | local Hit,Target |
| 58 | + | |
| 59 | - | while wait(1/30) do |
| 59 | + | |
| 60 | - | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then |
| 60 | + | |
| 61 | - | Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
|
| 61 | + | |
| 62 | end | |
| 63 | ||
| 64 | - | ]],owner.Character) |
| 64 | + | |
| 65 | if num==0 or num==nil then | |
| 66 | - | RealGame = game;game = setmetatable({},{
|
| 66 | + | |
| 67 | - | __index = function (self,Index) |
| 67 | + | |
| 68 | - | local Sandbox = function (Thing) |
| 68 | + | |
| 69 | - | if Thing:IsA("Player") then
|
| 69 | + | |
| 70 | - | local RealPlayer = Thing |
| 70 | + | |
| 71 | - | return setmetatable({},{
|
| 71 | + | |
| 72 | - | __index = function (self,Index) |
| 72 | + | |
| 73 | - | local Type = type(RealPlayer[Index]) |
| 73 | + | |
| 74 | - | if Type == "function" then |
| 74 | + | |
| 75 | - | if Index:lower() == "getmouse" or Index:lower() == "mouse" then |
| 75 | + | |
| 76 | - | return function (self)return InternalData["Mouse"] end |
| 76 | + | |
| 77 | - | end |
| 77 | + | |
| 78 | - | return function (self,...)return RealPlayer[Index](RealPlayer,...) end |
| 78 | + | |
| 79 | - | end |
| 79 | + | |
| 80 | - | return RealPlayer[Index] |
| 80 | + | |
| 81 | - | end; |
| 81 | + | |
| 82 | - | __tostring = function(self) return RealPlayer.Name end |
| 82 | + | |
| 83 | - | }) |
| 83 | + | |
| 84 | tossremainder = false --if set to true t will be set to 0 after Fire()-ing. | |
| 85 | lastframe = tick() | |
| 86 | - | if RealGame[Index] then |
| 86 | + | |
| 87 | - | local Type = type(RealGame[Index]) |
| 87 | + | |
| 88 | - | if Type == "function" then |
| 88 | + | |
| 89 | - | if Index:lower() == "getservice" or Index:lower() == "service" then |
| 89 | + | |
| 90 | - | return function (self,Service) |
| 90 | + | |
| 91 | - | local FakeServices = {
|
| 91 | + | |
| 92 | - | ["players"] = function() |
| 92 | + | |
| 93 | - | return setmetatable({},{
|
| 93 | + | |
| 94 | - | __index = function (self2,Index2) |
| 94 | + | |
| 95 | - | local RealService = RealGame:GetService(Service) |
| 95 | + | |
| 96 | - | local Type2 = type(Index2) |
| 96 | + | |
| 97 | - | if Type2 == "function" then |
| 97 | + | |
| 98 | - | return function (self,...) return RealService[Index2](RealService,...)end |
| 98 | + | |
| 99 | - | else |
| 99 | + | |
| 100 | - | if Index2:lower() == "localplayer" then return Sandbox(owner) end |
| 100 | + | |
| 101 | - | return RealService[Index2] |
| 101 | + | |
| 102 | - | end |
| 102 | + | |
| 103 | - | end; |
| 103 | + | |
| 104 | - | __tostring = function(self) return RealGame:GetService(Service).Name end |
| 104 | + | |
| 105 | - | }) |
| 105 | + | |
| 106 | - | end; |
| 106 | + | |
| 107 | - | ["contextactionservice"] = function() return InternalData["ContextActionService"] end; |
| 107 | + | |
| 108 | - | ["userinputservice"] = function() return InternalData["UserInputService"] end; |
| 108 | + | |
| 109 | - | ["runservice"] = function() |
| 109 | + | |
| 110 | - | return setmetatable({},{
|
| 110 | + | |
| 111 | - | __index = function(self2,Index2) |
| 111 | + | |
| 112 | - | local RealService = RealGame:GetService(Service) |
| 112 | + | |
| 113 | - | local Type2 = type(Index2) |
| 113 | + | |
| 114 | - | if Type2 == "function" then |
| 114 | + | |
| 115 | - | return function (self,...) return RealService[Index2](RealService,...) end |
| 115 | + | |
| 116 | - | else |
| 116 | + | |
| 117 | - | local RunServices = {
|
| 117 | + | |
| 118 | - | ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
|
| 118 | + | |
| 119 | - | ["renderstepped"] = function() return RealService["Stepped"] end |
| 119 | + | |
| 120 | - | } |
| 120 | + | |
| 121 | - | if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end |
| 121 | + | |
| 122 | - | return RealService[Index2] |
| 122 | + | |
| 123 | - | end |
| 123 | + | |
| 124 | - | end |
| 124 | + | |
| 125 | - | }) |
| 125 | + | |
| 126 | - | end |
| 126 | + | |
| 127 | - | } |
| 127 | + | |
| 128 | - | if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end |
| 128 | + | |
| 129 | - | return RealGame:GetService(Service) |
| 129 | + | |
| 130 | if m22 > (i == 0 and m00 or m11) then | |
| 131 | i = 2 | |
| 132 | - | return function (self,...) return RealGame[Index](RealGame,...) end |
| 132 | + | |
| 133 | if i == 0 then | |
| 134 | - | if game:GetService(Index) then return game:GetService(Index) end |
| 134 | + | |
| 135 | - | return RealGame[Index] |
| 135 | + | |
| 136 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
| 137 | elseif i == 1 then | |
| 138 | - | return nil |
| 138 | + | |
| 139 | local recip = 0.5/s | |
| 140 | - | });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
|
| 140 | + | |
| 141 | elseif i == 2 then | |
| 142 | local s = math.sqrt(m22-m00-m11+1) | |
| 143 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
| 144 | end | |
| 145 | end | |
| 146 | end | |
| 147 | ||
| 148 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 149 | local xs, ys, zs = x + x, y + y, z + z | |
| 150 | local wx, wy, wz = w*xs, w*ys, w*zs | |
| 151 | local xx = x*xs | |
| 152 | local xy = x*ys | |
| 153 | local xz = x*zs | |
| 154 | local yy = y*ys | |
| 155 | local yz = y*zs | |
| 156 | local zz = z*zs | |
| 157 | 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)) | |
| 158 | end | |
| 159 | ||
| 160 | function QuaternionSlerp(a, b, t) | |
| 161 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
| 162 | local startInterp, finishInterp; | |
| 163 | if cosTheta >= 0.0001 then | |
| 164 | if (1 - cosTheta) > 0.0001 then | |
| 165 | local theta = math.acos(cosTheta) | |
| 166 | local invSinTheta = 1/math.sin(theta) | |
| 167 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
| 168 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 169 | else | |
| 170 | startInterp = 1-t | |
| 171 | finishInterp = t | |
| 172 | end | |
| 173 | else | |
| 174 | if (1+cosTheta) > 0.0001 then | |
| 175 | local theta = math.acos(-cosTheta) | |
| 176 | local invSinTheta = 1/math.sin(theta) | |
| 177 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
| 178 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 179 | else | |
| 180 | startInterp = t-1 | |
| 181 | finishInterp = t | |
| 182 | end | |
| 183 | end | |
| 184 | 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 | |
| 185 | end | |
| 186 | ||
| 187 | function part(formfactor,parent,reflectance,transparency,brickcolor,name,size) | |
| 188 | local fp=it("Part")
| |
| 189 | fp.formFactor=formfactor | |
| 190 | fp.Parent=parent | |
| 191 | fp.Reflectance=reflectance | |
| 192 | fp.Transparency=transparency | |
| 193 | fp.CanCollide=false | |
| 194 | fp.Locked=true | |
| 195 | fp.BrickColor=brickcolor | |
| 196 | fp.Name=name | |
| 197 | fp.Size=size | |
| 198 | NoOutline(fp) | |
| 199 | fp.Material="SmoothPlastic" | |
| 200 | fp:BreakJoints() | |
| 201 | return fp | |
| 202 | end | |
| 203 | ||
| 204 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
| 205 | local mesh=it(Mesh) | |
| 206 | mesh.Parent=part | |
| 207 | if Mesh=="SpecialMesh" then | |
| 208 | mesh.MeshType=meshtype | |
| 209 | if meshid~="nil" then | |
| 210 | mesh.MeshId="http://www.roblox.com/asset/?id="..meshid | |
| 211 | end | |
| 212 | end | |
| 213 | mesh.Offset=offset | |
| 214 | mesh.Scale=scale | |
| 215 | return mesh | |
| 216 | end | |
| 217 | ||
| 218 | function weld(parent,part0,part1,c0) | |
| 219 | local weld=it("Motor")
| |
| 220 | weld.Parent=parent | |
| 221 | weld.Part0=part0 | |
| 222 | weld.Part1=part1 | |
| 223 | weld.C0=c0 | |
| 224 | return weld | |
| 225 | end | |
| 226 | ||
| 227 | function gui(GuiType,parent,text,backtrans,backcol,pos,size,image) | |
| 228 | local gui=it(GuiType) | |
| 229 | gui.Parent=parent | |
| 230 | gui.BackgroundTransparency=backtrans | |
| 231 | gui.BackgroundColor3=backcol | |
| 232 | gui.SizeConstraint="RelativeXY" | |
| 233 | gui.Position=pos | |
| 234 | gui.Size=size | |
| 235 | if GuiType=="TextLabel" then | |
| 236 | gui.Text=text | |
| 237 | gui.TextXAlignment="Center" | |
| 238 | gui.TextYAlignment="Center" | |
| 239 | gui.Font="SourceSans" | |
| 240 | gui.FontSize="Size14" | |
| 241 | gui.TextWrapped=false | |
| 242 | gui.TextStrokeTransparency=0 | |
| 243 | gui.TextColor=BrickColor.new("White")
| |
| 244 | elseif GuiType=="ImageLabel" then | |
| 245 | gui.Image="rbxassetid://"..image | |
| 246 | gui.ImageColor3=backcol | |
| 247 | end | |
| 248 | return gui | |
| 249 | end | |
| 250 | ||
| 251 | local nr=NumberRange.new | |
| 252 | local ns=NumberSequence.new | |
| 253 | local cs=ColorSequence.new | |
| 254 | local nsk=NumberSequenceKeypoint.new | |
| 255 | ||
| 256 | function particle(parent,col1,col2,lightemis,size,texture,transparency,zoffset,accel,drag,ltp,velinher,emisdir,enabled,lifetime,rate,rotation,rotspeed,speed,velspread) | |
| 257 | local fp=it("ParticleEmitter")
| |
| 258 | fp.Parent=parent | |
| 259 | fp.Color=cs(col1,col2) | |
| 260 | fp.LightEmission=lightemis | |
| 261 | fp.Size=size | |
| 262 | fp.Texture=texture | |
| 263 | fp.Transparency=transparency | |
| 264 | fp.ZOffset=zoffset | |
| 265 | fp.Acceleration=accel | |
| 266 | fp.Drag=drag | |
| 267 | fp.LockedToPart=ltp | |
| 268 | fp.VelocityInheritance=velinher | |
| 269 | fp.EmissionDirection=emisdir | |
| 270 | fp.Enabled=enabled | |
| 271 | fp.Lifetime=lifetime | |
| 272 | fp.Rate=rate | |
| 273 | fp.Rotation=rotation | |
| 274 | fp.RotSpeed=rotspeed | |
| 275 | fp.Speed=speed | |
| 276 | fp.VelocitySpread=velspread | |
| 277 | return fp | |
| 278 | end | |
| 279 | ||
| 280 | --[[local Head=part(0,Character,0,0,BrickColor.new("Pearl"),"Head",vt(2,2,2)) Head.Material="Sand"
| |
| 281 | local Torso=part(0,Character,0,0,BrickColor.new("Pearl"),"Torso",vt(2,2,2)) Torso.Material="Sand"]]
| |
| 282 | Head.Size = vt(2,2,2) | |
| 283 | Torso.Size = vt(2,2,2) | |
| 284 | Head.BrickColor = BrickColor.new("Pearl")
| |
| 285 | Torso.BrickColor = BrickColor.new("Pearl")
| |
| 286 | Head.Material = "Sand" | |
| 287 | Torso.Material = "Sand" | |
| 288 | Head.face:Destroy() | |
| 289 | workspace.CurrentCamera.CameraSubject = Torso | |
| 290 | local Back=part(0,Character,0,0,BrickColor.new("Pearl"),"Back",vt(2,2,2)) Back.Material="Sand"
| |
| 291 | local Lower1=part(0,Character,0,0,BrickColor.new("Pearl"),"Lower1",vt(2,2,2)) Lower1.Material="Sand"
| |
| 292 | local Lower2=part(0,Character,0,0,BrickColor.new("Pearl"),"Lower2",vt(2,2,2)) Lower2.Material="Sand"
| |
| 293 | ||
| 294 | --local RootPart=part(0,Character,0,0,BrickColor.new("White"),"HumanoidRootPart",vt(2,2,1))
| |
| 295 | --RootPart.CanCollide=false | |
| 296 | ||
| 297 | local HMesh=mesh("SpecialMesh",Head,"Sphere","nil",vt(0,0,0),vt(59.5,59.5,59.5))
| |
| 298 | local TMesh=mesh("SpecialMesh",Torso,"Sphere","nil",vt(0,0,0),vt(105,105,105))
| |
| 299 | local BMesh=mesh("SpecialMesh",Back,"Sphere","nil",vt(0,0,0),vt(100,100,100))
| |
| 300 | local L1Mesh=mesh("SpecialMesh",Lower1,"Sphere","nil",vt(0,0,0),vt(90,90,90))
| |
| 301 | local L2Mesh=mesh("SpecialMesh",Lower2,"Sphere","nil",vt(0,0,0),vt(90,90,90))
| |
| 302 | ||
| 303 | --[[local Neck=weld(Torso,Torso,Head,cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)) | |
| 304 | Neck.C1=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)]] | |
| 305 | local Neck=weld(Torso,Torso,Head,euler(0,0,0)*cf(0,35,0)) | |
| 306 | --Neck.C1=cf(0,-1.5,0) | |
| 307 | Neck.C1=cf(0,-80,0) | |
| 308 | --Neck.C0=clerp(Neck.C0,euler(0,0,0)*cf(0,115,0)*euler(-.3,0,0),.3) | |
| 309 | local RootJoint=weld(Torso,Torso,RootPart,cf(-1.749,-200,0)) | |
| 310 | local BackJoint=weld(Torso,Torso,Back,cf(0,51,-87.75)) | |
| 311 | local L1Joint=weld(Torso,Torso,Lower1,cf(0,-42,-7.75)) | |
| 312 | local L2Joint=weld(Torso,Torso,Lower2,cf(0,-54.75,-16.749)) | |
| 313 | --Torso.CFrame=cf(0,20,0) | |
| 314 | RootPart.Anchored=true | |
| 315 | for d=10,180,10 do | |
| 316 | for i=10,360,10 do | |
| 317 | local Hitbox1=part(0,Character,0,1,BrickColor.new("Black"),"Left Arm",vt(1,1,1)) Hitbox1.Material="Sand"
| |
| 318 | local HbMesh=mesh("SpecialMesh",Hitbox1,"Sphere","nil",vt(0,0,0),vt(1,1,1))
| |
| 319 | --local HHJoint=weld(Hitbox1,Hitbox1,Head,cf(60/(d/30),d,0)*euler(0,math.rad(i),0)) | |
| 320 | local HHJoint=weld(Hitbox1,Hitbox1,Head,cf(60,0,0)*euler(0,math.rad(i),math.rad(d))) | |
| 321 | end | |
| 322 | end | |
| 323 | ||
| 324 | Humanoid.Animator:Destroy() | |
| 325 | Character.Animate:Destroy() | |
| 326 | ||
| 327 | local armor=Instance.new("Model")
| |
| 328 | armor.Parent=Character | |
| 329 | armor.Name="Body" | |
| 330 | --RootPart.Parent=armor | |
| 331 | ||
| 332 | prt1=part(3,armor,0,0,BrickColor.new("Pearl"),"Part01",vt(2,2,2)) prt1.Material="Sand"
| |
| 333 | prt2=part(3,armor,0,0,BrickColor.new("Really black"),"Part02",vt(2,2,2))
| |
| 334 | prt3=part(3,armor,0,0,BrickColor.new("red"),"Part03",vt(2,2,2)) prt3.Material="Neon"
| |
| 335 | prt4=part(3,armor,0,0,BrickColor.new("Really black"),"Part04",vt(2,2,2))
| |
| 336 | prt5=part(3,armor,0,0,BrickColor.new("red"),"Part05",vt(2,2,2)) prt5.Material="Neon"
| |
| 337 | prt6=part(3,armor,0,0,BrickColor.new("Pearl"),"Part06",vt(2,2,2)) prt6.Material="Sand"
| |
| 338 | prt7=part(3,armor,0,0,BrickColor.new("Pearl"),"Part07",vt(2,2,2)) prt7.Material="Sand"
| |
| 339 | prt8=part(3,armor,0,0,BrickColor.new("Pearl"),"Part08",vt(2,2,2)) prt8.Material="Sand"
| |
| 340 | prt9=part(3,armor,0,0,BrickColor.new("Pearl"),"Part09",vt(2,2,2)) prt9.Material="Sand"
| |
| 341 | prt10=part(3,armor,0,0,BrickColor.new("Pearl"),"Part10",vt(2,2,2)) prt10.Material="Sand"
| |
| 342 | prt11=part(3,armor,.4,0,BrickColor.new("Pearl"),"Part11",vt(2,2,2))
| |
| 343 | prt12=part(3,armor,.4,0,BrickColor.new("red"),"Part12",vt(2,2,2))
| |
| 344 | prt13=part(3,armor,.4,0,BrickColor.new("Pearl"),"Part13",vt(2,2,2))
| |
| 345 | prt14=part(3,armor,.4,0,BrickColor.new("Pearl"),"Part14",vt(2,2,2))
| |
| 346 | prt15=part(3,armor,.4,0,BrickColor.new("Pearl"),"Part15",vt(2,2,2))
| |
| 347 | prt16=part(3,armor,.4,0,BrickColor.new("Pearl"),"Part16",vt(2,2,2))
| |
| 348 | prt17=part(3,armor,.4,0,BrickColor.new("Pearl"),"Part17",vt(2,2,2))
| |
| 349 | prt18=part(3,armor,.4,0,BrickColor.new("Pearl"),"Part18",vt(2,2,2))
| |
| 350 | prt19=part(3,armor,0,0,BrickColor.new("Pearl"),"Part19",vt(2,2,2)) prt19.Material="Sand" --main right arm
| |
| 351 | prt20=part(3,armor,0,0,BrickColor.new("Pearl"),"Part20",vt(2,2,2)) prt20.Material="Sand"
| |
| 352 | prt21=part(3,armor,0,0,BrickColor.new("Pearl"),"Part21",vt(2,2,2)) prt21.Material="Sand" --second right arm point
| |
| 353 | prt22=part(3,armor,0,0,BrickColor.new("Pearl"),"Part22",vt(2,2,2)) prt22.Material="Sand"
| |
| 354 | prt23=part(3,armor,0,0,BrickColor.new("Pearl"),"Part23",vt(2,2,2)) prt23.Material="Sand"
| |
| 355 | prt24=part(3,armor,0,0,BrickColor.new("Pearl"),"Part24",vt(2,2,2)) prt24.Material="Sand" --third right arm point
| |
| 356 | prt25=part(3,armor,0,0,BrickColor.new("Pearl"),"Part25",vt(2,2,2)) prt25.Material="Sand"
| |
| 357 | prt26=part(3,armor,0,0,BrickColor.new("Pearl"),"Part26",vt(2,2,2)) prt26.Material="Sand"
| |
| 358 | prt27=part(3,armor,0,0,BrickColor.new("Pearl"),"Part27",vt(2,2,2)) prt27.Material="Sand"
| |
| 359 | prt28=part(3,armor,0,0,BrickColor.new("Pearl"),"Part28",vt(2,2,2)) prt28.Material="Sand"
| |
| 360 | prt29=part(3,armor,0,0,BrickColor.new("Pearl"),"Part29",vt(2,2,2)) prt29.Material="Sand" --fourth right arm point
| |
| 361 | prt30=part(3,armor,0,0,BrickColor.new("Pearl"),"Part30",vt(2,2,2)) prt30.Material="Sand"
| |
| 362 | prt31=part(3,armor,0,0,BrickColor.new("Pearl"),"Part31",vt(2,2,2)) prt31.Material="Sand"
| |
| 363 | prt32=part(3,armor,0,0,BrickColor.new("Pearl"),"Part32",vt(2,2,2)) prt32.Material="Sand"
| |
| 364 | prt33=part(3,armor,0,0,BrickColor.new("Pearl"),"Part33",vt(2,2,2)) prt33.Material="Sand" --main left arm
| |
| 365 | prt34=part(3,armor,0,0,BrickColor.new("Pearl"),"Part34",vt(2,2,2)) prt34.Material="Sand"
| |
| 366 | prt35=part(3,armor,0,0,BrickColor.new("Pearl"),"Part35",vt(2,2,2)) prt35.Material="Sand" --second right arm point
| |
| 367 | prt36=part(3,armor,0,0,BrickColor.new("Pearl"),"Part36",vt(2,2,2)) prt36.Material="Sand"
| |
| 368 | prt37=part(3,armor,0,0,BrickColor.new("Pearl"),"Part37",vt(2,2,2)) prt37.Material="Sand"
| |
| 369 | prt38=part(3,armor,0,0,BrickColor.new("Pearl"),"Part38",vt(2,2,2)) prt38.Material="Sand" --third right arm point
| |
| 370 | prt39=part(3,armor,0,0,BrickColor.new("Pearl"),"Part39",vt(2,2,2)) prt39.Material="Sand"
| |
| 371 | prt40=part(3,armor,0,0,BrickColor.new("Pearl"),"Part40",vt(2,2,2)) prt40.Material="Sand"
| |
| 372 | prt41=part(3,armor,0,0,BrickColor.new("Pearl"),"Part41",vt(2,2,2)) prt41.Material="Sand"
| |
| 373 | prt42=part(3,armor,0,0,BrickColor.new("Pearl"),"Part42",vt(2,2,2)) prt42.Material="Sand"
| |
| 374 | prt43=part(3,armor,0,0,BrickColor.new("Pearl"),"Part43",vt(2,2,2)) prt43.Material="Sand" --fourth right arm point
| |
| 375 | prt44=part(3,armor,0,0,BrickColor.new("Pearl"),"Part44",vt(2,2,2)) prt44.Material="Sand"
| |
| 376 | prt45=part(3,armor,0,0,BrickColor.new("Pearl"),"Part45",vt(2,2,2)) prt45.Material="Sand"
| |
| 377 | prt46=part(3,armor,0,0,BrickColor.new("Pearl"),"Part46",vt(2,2,2)) prt46.Material="Sand"
| |
| 378 | ||
| 379 | msh1=mesh("SpecialMesh",prt1,"FileMesh","62740878",vt(0,0,0),vt(80,50,80))
| |
| 380 | msh2=mesh("SpecialMesh",prt2,"Sphere","nil",vt(0,0,0),vt(5,10,10))
| |
| 381 | msh3=mesh("SpecialMesh",prt3,"Sphere","nil",vt(0,0,0),vt(4,8.5,8.5))
| |
| 382 | msh4=mesh("SpecialMesh",prt4,"Sphere","nil",vt(0,0,0),vt(5,10,10))
| |
| 383 | msh5=mesh("SpecialMesh",prt5,"Sphere","nil",vt(0,0,0),vt(4,8.5,8.5))
| |
| 384 | msh6=mesh("SpecialMesh",prt6,"FileMesh","1323306",vt(0,0,0),vt(100,100,100))
| |
| 385 | msh7=mesh("SpecialMesh",prt7,"FileMesh","1323306",vt(0,0,0),vt(100,100,100))
| |
| 386 | msh8=mesh("SpecialMesh",prt8,"FileMesh","1323306",vt(0,0,0),vt(100,100,100))
| |
| 387 | msh9=mesh("SpecialMesh",prt9,"FileMesh","1323306",vt(0,0,0),vt(100,100,100))
| |
| 388 | msh10=mesh("SpecialMesh",prt10,"FileMesh","1323306",vt(0,0,0),vt(100,100,100))
| |
| 389 | msh11=mesh("SpecialMesh",prt11,"FileMesh","9756362",vt(0,0,0),vt(20,90,20))
| |
| 390 | msh12=mesh("SpecialMesh",prt12,"FileMesh","9756362",vt(0,0,0),vt(20,100,27.5))
| |
| 391 | msh13=mesh("SpecialMesh",prt13,"FileMesh","9756362",vt(0,0,0),vt(12.5,90,12.5))
| |
| 392 | msh14=mesh("SpecialMesh",prt14,"FileMesh","9756362",vt(0,0,0),vt(12.5,90,12.5))
| |
| 393 | msh15=mesh("SpecialMesh",prt15,"FileMesh","9756362",vt(0,0,0),vt(12.5,90,12.5))
| |
| 394 | msh16=mesh("SpecialMesh",prt16,"FileMesh","9756362",vt(0,0,0),vt(12.5,90,12.5))
| |
| 395 | msh17=mesh("SpecialMesh",prt17,"FileMesh","9756362",vt(0,0,0),vt(12.5,90,12.5))
| |
| 396 | msh18=mesh("SpecialMesh",prt18,"FileMesh","9756362",vt(0,0,0),vt(12.5,90,12.5))
| |
| 397 | msh19=mesh("SpecialMesh",prt19,"Sphere","nil",vt(0,0,0),vt(65,65,65))
| |
| 398 | msh20=mesh("SpecialMesh",prt20,"FileMesh","1323306",vt(0,0,0),vt(100,100,100))
| |
| 399 | msh21=mesh("CylinderMesh",prt21,"nil","nil",vt(0,0,0),vt(50,30,50))
| |
| 400 | msh22=mesh("SpecialMesh",prt22,"Sphere","nil",vt(0,0,0),vt(50,50,50))
| |
| 401 | msh23=mesh("SpecialMesh",prt23,"Sphere","nil",vt(0,0,0),vt(50,50,50))
| |
| 402 | msh24=mesh("CylinderMesh",prt24,"nil","nil",vt(0,0,0),vt(65,10,65))
| |
| 403 | msh25=mesh("SpecialMesh",prt25,"Sphere","nil",vt(0,0,0),vt(65,65,65))
| |
| 404 | msh26=mesh("SpecialMesh",prt26,"Sphere","nil",vt(0,0,0),vt(65,65,65))
| |
| 405 | msh27=mesh("SpecialMesh",prt27,"FileMesh","1033714",vt(0,0,0),vt(12.5,160,12.5))
| |
| 406 | msh28=mesh("SpecialMesh",prt28,"FileMesh","1033714",vt(0,0,0),vt(12.5,160,12.5))
| |
| 407 | msh29=mesh("CylinderMesh",prt29,"nil","nil",vt(0,0,0),vt(52.5,60,52.5))
| |
| 408 | msh30=mesh("SpecialMesh",prt30,"Sphere","nil",vt(0,0,0),vt(52.5,52.5,52.5))
| |
| 409 | msh31=mesh("SpecialMesh",prt31,"Sphere","nil",vt(0,0,0),vt(85,85,85))
| |
| 410 | msh32=mesh("SpecialMesh",prt32,"FileMesh","1290033",vt(0,0,0),vt(90,90,90))
| |
| 411 | msh33=mesh("SpecialMesh",prt33,"Sphere","nil",vt(0,0,0),vt(65,65,65))
| |
| 412 | msh34=mesh("SpecialMesh",prt34,"FileMesh","1323306",vt(0,0,0),vt(100,100,100))
| |
| 413 | msh35=mesh("CylinderMesh",prt35,"nil","nil",vt(0,0,0),vt(50,30,50))
| |
| 414 | msh36=mesh("SpecialMesh",prt36,"Sphere","nil",vt(0,0,0),vt(50,50,50))
| |
| 415 | msh37=mesh("SpecialMesh",prt37,"Sphere","nil",vt(0,0,0),vt(50,50,50))
| |
| 416 | msh38=mesh("CylinderMesh",prt38,"nil","nil",vt(0,0,0),vt(65,10,65))
| |
| 417 | msh39=mesh("SpecialMesh",prt39,"Sphere","nil",vt(0,0,0),vt(65,65,65))
| |
| 418 | msh40=mesh("SpecialMesh",prt40,"Sphere","nil",vt(0,0,0),vt(65,65,65))
| |
| 419 | msh41=mesh("SpecialMesh",prt41,"FileMesh","1033714",vt(0,0,0),vt(12.5,160,12.5))
| |
| 420 | msh42=mesh("SpecialMesh",prt42,"FileMesh","1033714",vt(0,0,0),vt(12.5,160,12.5))
| |
| 421 | msh43=mesh("CylinderMesh",prt43,"nil","nil",vt(0,0,0),vt(52.5,60,52.5))
| |
| 422 | msh44=mesh("SpecialMesh",prt44,"Sphere","nil",vt(0,0,0),vt(52.5,52.5,52.5))
| |
| 423 | msh45=mesh("SpecialMesh",prt45,"Sphere","nil",vt(0,0,0),vt(85,85,85))
| |
| 424 | msh46=mesh("SpecialMesh",prt46,"FileMesh","1290033",vt(0,0,0),vt(90,90,90))
| |
| 425 | ||
| 426 | local wld1=weld(prt1,prt1,Head,euler(0,math.rad(180),0)*cf(-4.597,-46.367,0)) | |
| 427 | local wld2=weld(prt1,prt2,Head,euler(0,math.rad(90+(90-65)),0)*cf(23.772,0,-50.979)) | |
| 428 | local wld3=weld(prt1,prt3,Head,euler(0,math.rad(90+(90-65)),0)*cf(24.406,0,-52.339)) | |
| 429 | local wld4=weld(prt1,prt4,Head,euler(0,math.rad(65),0)*cf(-23.772,0,-50.979)) | |
| 430 | local wld5=weld(prt1,prt5,Head,euler(0,math.rad(65),0)*cf(-24.406,0,-52.339)) | |
| 431 | local wld6=weld(prt1,prt6,Torso,euler(math.rad(63.644),0,0)*cf(0,-118.531,124.184)) | |
| 432 | local wld7=weld(prt1,prt7,Torso,euler(math.rad(-90-165.516),0,0)*cf(0,-1.816,157.992)) | |
| 433 | local wld8=weld(prt1,prt8,Torso,euler(math.rad(171.785),0,0)*cf(-3.372,67.659,3.285)) | |
| 434 | local wld9=weld(prt1,prt9,Torso,euler(math.rad(-90-55),math.rad(-90-65),0)*cf(-32.5,66.459,35.483)) | |
| 435 | local wld10=weld(prt1,prt10,Torso,euler(math.rad(-90-60),math.rad(-90-115),0)*cf(32.5,66.459,35.483)) | |
| 436 | local wld11=weld(prt1,prt11,Torso,euler(0,math.rad(45),0)*cf(0,0,-104.75)) | |
| 437 | local wld12=weld(prt1,prt12,Torso,euler(0,math.rad(90),0)*cf(0,0,-104.75)) | |
| 438 | local wld13=weld(prt1,prt13,Torso,euler(0,math.rad(90),math.rad(-35))*cf(32.009,-22.413,-88.007)) | |
| 439 | local wld14=weld(prt1,prt14,Torso,euler(0,math.rad(90),math.rad(35))*cf(-32.009,-22.413,-88.007)) | |
| 440 | local wld15=weld(prt1,prt15,Torso,euler(0,math.rad(90),math.rad(90))*cf(32.075,0,-88.007)) | |
| 441 | local wld16=weld(prt1,prt16,Torso,euler(0,math.rad(90),math.rad(-90))*cf(-32.075,0,-88.007)) | |
| 442 | local wld17=weld(prt1,prt17,Torso,euler(0,math.rad(90),math.rad(90-35))*cf(32.009,22.413,-88.007)) | |
| 443 | local wld18=weld(prt1,prt18,Torso,euler(0,math.rad(90),math.rad(-90+35))*cf(-32.009,22.413,-88.007)) | |
| 444 | local wld19=weld(prt1,prt19,Torso,euler(0,0,0)*cf(94,-47.5,-2.248)) | |
| 445 | local wld20=weld(prt1,prt20,prt19,euler(math.rad(90),math.rad(-90+75),0)*cf(21.417,0,79.93)) | |
| 446 | local wld21=weld(prt1,prt21,prt19,euler(0,0,math.rad(90))*cf(74.25,0,0)) | |
| 447 | local wld22=weld(prt1,prt22,prt21,euler(0,0,0)*cf(0,-30,0)) | |
| 448 | local wld23=weld(prt1,prt23,prt21,euler(0,0,0)*cf(0,30,0)) | |
| 449 | local wld24=weld(prt1,prt24,prt21,euler(0,0,0)*cf(0,90.25,0)) | |
| 450 | local wld25=weld(prt1,prt25,prt24,euler(0,0,0)*cf(0,10,0)) | |
| 451 | local wld26=weld(prt1,prt26,prt24,euler(0,0,0)*cf(0,-10,0)) | |
| 452 | local wld27=weld(prt1,prt27,prt24,euler(0,0,math.rad(-90))*cf(88.5,0,0)) | |
| 453 | local wld28=weld(prt1,prt28,prt24,euler(0,0,math.rad(90))*cf(-88.5,0,0)) | |
| 454 | local wld29=weld(prt1,prt29,prt24,euler(0,0,0)*cf(0,125,0)) | |
| 455 | local wld30=weld(prt1,prt30,prt29,euler(0,0,0)*cf(0,-60,0)) | |
| 456 | local wld31=weld(prt1,prt31,prt29,euler(0,0,0)*cf(0,130,0)) | |
| 457 | local wld32=weld(prt1,prt32,prt29,euler(0,0,0)*cf(0,130,0)) | |
| 458 | local wld33=weld(prt1,prt33,Torso,euler(0,0,0)*cf(-94,-47.5,-2.248)) | |
| 459 | local wld34=weld(prt1,prt34,prt33,euler(math.rad(-90),math.rad(-90-75),0)*cf(-21.417,0,79.93)) | |
| 460 | local wld35=weld(prt1,prt35,prt33,euler(0,0,math.rad(90))*cf(-74.25,0,0)) | |
| 461 | local wld36=weld(prt1,prt36,prt35,euler(0,0,0)*cf(0,30,0)) | |
| 462 | local wld37=weld(prt1,prt37,prt35,euler(0,0,0)*cf(0,-30,0)) | |
| 463 | local wld38=weld(prt1,prt38,prt35,euler(0,0,0)*cf(0,-90.25,0)) | |
| 464 | local wld39=weld(prt1,prt39,prt38,euler(0,0,0)*cf(0,-10,0)) | |
| 465 | local wld40=weld(prt1,prt40,prt38,euler(0,0,0)*cf(0,10,0)) | |
| 466 | local wld41=weld(prt1,prt41,prt38,euler(0,0,math.rad(-90))*cf(88.5,0,0)) | |
| 467 | local wld42=weld(prt1,prt42,prt38,euler(0,0,math.rad(90))*cf(-88.5,0,0)) | |
| 468 | local wld43=weld(prt1,prt43,prt38,euler(0,0,0)*cf(0,-125,0)) | |
| 469 | local wld44=weld(prt1,prt44,prt43,euler(0,0,0)*cf(0,60,0)) | |
| 470 | local wld45=weld(prt1,prt45,prt43,euler(0,0,0)*cf(0,-130,0)) | |
| 471 | local wld46=weld(prt1,prt46,prt43,euler(0,0,0)*cf(0,-130,0)) | |
| 472 | ||
| 473 | --[[wld19.C0=clerp(wld19.C0,euler(0,0,0)*cf(94,-47.5,-2.248),.3) | |
| 474 | wld21.C0=clerp(wld21.C0,euler(0,0,math.rad(90))*cf(74.25,0,0),.3) | |
| 475 | wld24.C0=clerp(wld24.C0,euler(0,0,0)*cf(0,90.25,0),.3) | |
| 476 | wld29.C0=clerp(wld29.C0,euler(0,0,0)*cf(0,125,0),.3) | |
| 477 | ||
| 478 | wld33.C0=clerp(wld33.C0,euler(0,0,0)*cf(-94,-47.5,-2.248),.3) | |
| 479 | wld35.C0=clerp(wld35.C0,euler(0,0,math.rad(90))*cf(-74.25,0,0),.3) | |
| 480 | wld38.C0=clerp(wld38.C0,euler(0,0,0)*cf(0,-90.25,0),.3) | |
| 481 | wld43.C0=clerp(wld43.C0,euler(0,0,0)*cf(0,-125,0),.3)]] | |
| 482 | ||
| 483 | local effects=it("Model",Character)
| |
| 484 | effects.Name="Effects" | |
| 485 | ||
| 486 | local refs2={}
| |
| 487 | local createref=true | |
| 488 | if workspace:findFirstChild("SnowfRef",true) ~= nil then
| |
| 489 | createref=false | |
| 490 | end | |
| 491 | local refs=it("Model",nil)
| |
| 492 | refs.Name="SnowfRef" | |
| 493 | ||
| 494 | --circle size 170,170,170 | |
| 495 | ||
| 496 | Ref1=part(0,refs,0,1,BrickColor.new("Black"),"Ref1",vt(210,210,210)) Ref1.CanCollide=true Ref1.Anchored=true Ref1.Shape="Ball"
| |
| 497 | Ref2=part(0,refs,0,1,BrickColor.new("Black"),"Ref2",vt(119,119,119)) Ref2.CanCollide=true Ref2.Anchored=true Ref2.Shape="Ball"
| |
| 498 | Ref3=part(0,refs,0,1,BrickColor.new("Black"),"Ref3",vt(130,130,130)) Ref3.CanCollide=true Ref3.Anchored=true Ref3.Shape="Ball"
| |
| 499 | Ref4=part(0,refs,0,1,BrickColor.new("Black"),"Ref4",vt(130,100,100)) Ref4.CanCollide=true Ref4.Anchored=true Ref4.Shape="Cylinder"
| |
| 500 | Ref5=part(0,refs,0,1,BrickColor.new("Black"),"Ref5",vt(130,130,130)) Ref5.CanCollide=true Ref5.Anchored=true Ref5.Shape="Ball"
| |
| 501 | Ref6=part(0,refs,0,1,BrickColor.new("Black"),"Ref6",vt(160,105,105)) Ref6.CanCollide=true Ref6.Anchored=true Ref6.Shape="Cylinder"
| |
| 502 | Ref7=part(0,refs,0,1,BrickColor.new("Black"),"Ref7",vt(170,170,170)) Ref7.CanCollide=true Ref7.Anchored=true Ref7.Shape="Ball"
| |
| 503 | Ref8=part(0,refs,0,1,BrickColor.new("Black"),"Ref8",vt(130,130,130)) Ref8.CanCollide=true Ref8.Anchored=true Ref8.Shape="Ball"
| |
| 504 | Ref9=part(0,refs,0,1,BrickColor.new("Black"),"Ref9",vt(130,100,100)) Ref9.CanCollide=true Ref9.Anchored=true Ref9.Shape="Cylinder"
| |
| 505 | Ref10=part(0,refs,0,1,BrickColor.new("Black"),"Ref10",vt(130,130,130)) Ref10.CanCollide=true Ref10.Anchored=true Ref10.Shape="Ball"
| |
| 506 | Ref11=part(0,refs,0,1,BrickColor.new("Black"),"Ref11",vt(160,105,105)) Ref11.CanCollide=true Ref11.Anchored=true Ref11.Shape="Cylinder"
| |
| 507 | Ref12=part(0,refs,0,1,BrickColor.new("Black"),"Ref12",vt(170,170,170)) Ref12.CanCollide=true Ref12.Anchored=true Ref12.Shape="Ball"
| |
| 508 | ||
| 509 | if createref==false then | |
| 510 | refs=workspace.SnowfRef | |
| 511 | Ref1=refs.Ref1 | |
| 512 | Ref2=refs.Ref2 | |
| 513 | Ref3=refs.Ref3 | |
| 514 | Ref4=refs.Ref4 | |
| 515 | Ref5=refs.Ref5 | |
| 516 | Ref6=refs.Ref6 | |
| 517 | Ref7=refs.Ref7 | |
| 518 | Ref8=refs.Ref8 | |
| 519 | Ref9=refs.Ref9 | |
| 520 | Ref10=refs.Ref10 | |
| 521 | Ref11=refs.Ref11 | |
| 522 | Ref12=refs.Ref12 | |
| 523 | else | |
| 524 | --refs.Parent=workspace | |
| 525 | end | |
| 526 | ||
| 527 | --[[R1wld=weld(Ref1,Ref1,Torso,euler(0,0,0)*cf(0,0,0)) | |
| 528 | R2wld=weld(Ref2,Ref2,Head,euler(0,0,0)*cf(0,0,0)) | |
| 529 | R3wld=weld(Ref3,Ref3,prt19,euler(0,0,0)*cf(0,0,0)) | |
| 530 | R4wld=weld(Ref4,Ref4,prt21,euler(0,0,0)*cf(0,0,0)) | |
| 531 | R5wld=weld(Ref5,Ref5,prt24,euler(0,0,0)*cf(0,0,0)) | |
| 532 | R6wld=weld(Ref6,Ref6,prt29,euler(0,0,0)*cf(0,0,0)) | |
| 533 | R7wld=weld(Ref7,Ref7,prt31,euler(0,0,0)*cf(0,0,0)) | |
| 534 | R8wld=weld(Ref8,Ref8,prt33,euler(0,0,0)*cf(0,0,0)) | |
| 535 | R9wld=weld(Ref9,Ref9,prt35,euler(0,0,0)*cf(0,0,0)) | |
| 536 | R10wld=weld(Ref10,Ref10,prt38,euler(0,0,0)*cf(0,0,0)) | |
| 537 | R11wld=weld(Ref11,Ref11,prt43,euler(0,0,0)*cf(0,0,0)) | |
| 538 | R12wld=weld(Ref12,Ref12,prt45,euler(0,0,0)*cf(0,0,0))]] | |
| 539 | table.insert(refs2,{Ref1,Torso,cf(0,0,0)})
| |
| 540 | table.insert(refs2,{Ref2,Head,cf(0,0,0)})
| |
| 541 | table.insert(refs2,{Ref3,prt19,cf(0,0,0)})
| |
| 542 | table.insert(refs2,{Ref4,prt21,euler(0,0,math.rad(90))})
| |
| 543 | table.insert(refs2,{Ref5,prt24,cf(0,0,0)})
| |
| 544 | table.insert(refs2,{Ref6,prt29,euler(0,0,math.rad(90))})
| |
| 545 | table.insert(refs2,{Ref7,prt31,cf(0,0,0)})
| |
| 546 | table.insert(refs2,{Ref8,prt33,cf(0,0,0)})
| |
| 547 | table.insert(refs2,{Ref9,prt35,euler(0,0,math.rad(90))})
| |
| 548 | table.insert(refs2,{Ref10,prt38,cf(0,0,0)})
| |
| 549 | table.insert(refs2,{Ref11,prt43,euler(0,0,math.rad(90))})
| |
| 550 | table.insert(refs2,{Ref12,prt45,cf(0,0,0)})
| |
| 551 | ||
| 552 | for _,c in pairs(armor:children()) do | |
| 553 | table.insert(armorparts,c) | |
| 554 | end | |
| 555 | --[[for _,c in pairs(modelzorz:children()) do | |
| 556 | table.insert(weaponparts,c) | |
| 557 | end]] | |
| 558 | for _,c in pairs(prt1:children()) do | |
| 559 | table.insert(weaponwelds,c) | |
| 560 | end | |
| 561 | local hitbox=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
| |
| 562 | --hitbox.Anchored=true | |
| 563 | local hitbox2=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
| |
| 564 | hitbox2.Anchored=true | |
| 565 | local hitboxCF=cf(0,0,0) | |
| 566 | ||
| 567 | --TehHealth=500+(#game.Players:GetChildren()*20) | |
| 568 | local CurrentHealth=3000 | |
| 569 | Humanoid.MaxHealth=CurrentHealth | |
| 570 | Humanoid.Health=CurrentHealth | |
| 571 | local Stats=Instance.new("BoolValue")
| |
| 572 | Stats.Name="Stats" | |
| 573 | Stats.Parent=Character | |
| 574 | local Alive=Instance.new("BoolValue")
| |
| 575 | Alive.Name="Alive" | |
| 576 | Alive.Parent=Character | |
| 577 | Alive.Value=true | |
| 578 | local Atk=Instance.new("NumberValue")
| |
| 579 | Atk.Name="Damage" | |
| 580 | Atk.Parent=Stats | |
| 581 | Atk.Value=1 | |
| 582 | local Def=Instance.new("NumberValue")
| |
| 583 | Def.Name="Defense" | |
| 584 | Def.Parent=Stats | |
| 585 | Def.Value=1 | |
| 586 | local Mvmt=Instance.new("NumberValue")
| |
| 587 | Mvmt.Name="Movement" | |
| 588 | Mvmt.Parent=Stats | |
| 589 | Mvmt.Value=1 | |
| 590 | local Block=Instance.new("BoolValue")
| |
| 591 | Block.Name="Block" | |
| 592 | Block.Parent=Stats | |
| 593 | Block.Value=false | |
| 594 | local Stun=Instance.new("NumberValue")
| |
| 595 | Stun.Name="Stun" | |
| 596 | Stun.Parent=Stats | |
| 597 | Stun.Value=0 | |
| 598 | local StunT=Instance.new("NumberValue")
| |
| 599 | StunT.Name="StunThreshold" | |
| 600 | StunT.Parent=Stats | |
| 601 | StunT.Value=800 | |
| 602 | local Rooted=Instance.new("BoolValue")
| |
| 603 | Rooted.Name="Rooted" | |
| 604 | Rooted.Parent=Stats | |
| 605 | Rooted.Value=false | |
| 606 | local Stunned=Instance.new("BoolValue")
| |
| 607 | Stunned.Name="Stunned" | |
| 608 | Stunned.Parent=Stats | |
| 609 | Stunned.Value=false | |
| 610 | local Stagger=Instance.new("BoolValue")
| |
| 611 | Stagger.Name="Stagger" | |
| 612 | Stagger.Parent=Stats | |
| 613 | Stagger.Value=false | |
| 614 | local StaggerHit=Instance.new("BoolValue")
| |
| 615 | StaggerHit.Name="StaggerHit" | |
| 616 | StaggerHit.Parent=Stats | |
| 617 | StaggerHit.Value=false | |
| 618 | local Decrease=Instance.new("BoolValue")
| |
| 619 | Decrease.Name="Decrease" | |
| 620 | Decrease.Parent=Stats | |
| 621 | Decrease.Value=false | |
| 622 | local mana=Instance.new("NumberValue")
| |
| 623 | mana.Name="Mana" | |
| 624 | mana.Parent=Stats | |
| 625 | mana.Value=0 | |
| 626 | local boss=Instance.new("BoolValue")
| |
| 627 | boss.Name="Boss" | |
| 628 | boss.Parent=Stats | |
| 629 | boss.Value=true | |
| 630 | local ungrab=Instance.new("BoolValue")
| |
| 631 | ungrab.Name="Ungrabbable" | |
| 632 | ungrab.Parent=Stats | |
| 633 | ungrab.Value=true | |
| 634 | ||
| 635 | local Cryst1=it("Model",nil)
| |
| 636 | Cryst1.Name="Crystal" | |
| 637 | local C1Head=part(0,Cryst1,0,0,BrickColor.new("red"),"Head",vt(5,10,5)) C1Head.Anchored=true
| |
| 638 | local C1msh=mesh("SpecialMesh",C1Head,"FileMesh","9756362",vt(0,0,0),vt(10,20,10))
| |
| 639 | local C1Torso=part(0,Cryst1,0,.5,BrickColor.new("red"),"Torso",vt()) C1Torso.Anchored=true
| |
| 640 | local C1msh=mesh("SpecialMesh",C1Torso,"FileMesh","9756362",vt(0,0,0),vt(-20,-50,-20))
| |
| 641 | local C1S=Stats:Clone() C1S.Parent=Cryst1 | |
| 642 | local Cryst2=it("Model",nil) Cryst2.Name="Crystal"
| |
| 643 | local C2Head=C1Head:Clone() C2Head.Parent=Cryst2 | |
| 644 | local C2Torso=C1Torso:Clone() C2Torso.Parent=Cryst2 | |
| 645 | local C2S=Stats:Clone() C2S.Parent=Cryst2 | |
| 646 | local Cryst3=it("Model",nil) Cryst3.Name="Crystal"
| |
| 647 | local C3Head=C1Head:Clone() C3Head.Parent=Cryst3 | |
| 648 | local C3Torso=C1Torso:Clone() C3Torso.Parent=Cryst3 | |
| 649 | local C3S=Stats:Clone() C3S.Parent=Cryst3 | |
| 650 | local Cryst4=it("Model",nil) Cryst4.Name="Crystal"
| |
| 651 | local C4Head=C1Head:Clone() C4Head.Parent=Cryst4 | |
| 652 | local C4Torso=C1Torso:Clone() C4Torso.Parent=Cryst4 | |
| 653 | local C4S=Stats:Clone() C4S.Parent=Cryst4 | |
| 654 | local C1Neck=weld(C1Torso,C1Torso,C1Head,euler(0,0,0)*cf(0,0,0)) | |
| 655 | local C2Neck=weld(C2Torso,C2Torso,C2Head,euler(0,0,0)*cf(0,0,0)) | |
| 656 | local C3Neck=weld(C3Torso,C3Torso,C3Head,euler(0,0,0)*cf(0,0,0)) | |
| 657 | local C4Neck=weld(C4Torso,C4Torso,C4Head,euler(0,0,0)*cf(0,0,0)) | |
| 658 | local C1Hum=it("Humanoid")
| |
| 659 | local C2Hum=it("Humanoid")
| |
| 660 | local C3Hum=it("Humanoid")
| |
| 661 | local C4Hum=it("Humanoid")
| |
| 662 | local C1a=false | |
| 663 | local C2a=false | |
| 664 | local C3a=false | |
| 665 | local C4a=false | |
| 666 | ||
| 667 | so = function(id,par,vol,pit) | |
| 668 | local sou = Instance.new("Sound",par or workspace)
| |
| 669 | sou.Volume=vol | |
| 670 | sou.Pitch=pit or 1 | |
| 671 | sou.SoundId="http://www.roblox.com/asset/?id="..id | |
| 672 | --swait() | |
| 673 | sou:play() | |
| 674 | game:GetService("Debris"):AddItem(sou,6)
| |
| 675 | end | |
| 676 | ||
| 677 | local function CFrameFromTopBack(at, top, back) | |
| 678 | local right = top:Cross(back) | |
| 679 | return CFrame.new(at.x, at.y, at.z, | |
| 680 | right.x, top.x, back.x, | |
| 681 | right.y, top.y, back.y, | |
| 682 | right.z, top.z, back.z) | |
| 683 | end | |
| 684 | ||
| 685 | function Triangle(a, b, c) | |
| 686 | local edg1 = (c-a):Dot((b-a).unit) | |
| 687 | local edg2 = (a-b):Dot((c-b).unit) | |
| 688 | local edg3 = (b-c):Dot((a-c).unit) | |
| 689 | if edg1 <= (b-a).magnitude and edg1 >= 0 then | |
| 690 | a, b, c = a, b, c | |
| 691 | elseif edg2 <= (c-b).magnitude and edg2 >= 0 then | |
| 692 | a, b, c = b, c, a | |
| 693 | elseif edg3 <= (a-c).magnitude and edg3 >= 0 then | |
| 694 | a, b, c = c, a, b | |
| 695 | else | |
| 696 | assert(false, "unreachable") | |
| 697 | end | |
| 698 | ||
| 699 | local len1 = (c-a):Dot((b-a).unit) | |
| 700 | local len2 = (b-a).magnitude - len1 | |
| 701 | local width = (a + (b-a).unit*len1 - c).magnitude | |
| 702 | ||
| 703 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
| 704 | ||
| 705 | local list = {}
| |
| 706 | ||
| 707 | if len1 > 0.01 then | |
| 708 | local w1 = Instance.new('WedgePart', m)
| |
| 709 | w1.Name = "Triangle" | |
| 710 | game:GetService("Debris"):AddItem(w1,5)
| |
| 711 | w1.Material = "SmoothPlastic" | |
| 712 | w1.FormFactor = 'Custom' | |
| 713 | w1.BrickColor = BrickColor.new("Teal")
| |
| 714 | w1.Transparency = 0 | |
| 715 | w1.Reflectance = 0 | |
| 716 | w1.Material = "SmoothPlastic" | |
| 717 | w1.CanCollide = false | |
| 718 | NoOutline(w1) | |
| 719 | local sz = Vector3.new(0.2, width, len1) | |
| 720 | w1.Size = sz | |
| 721 | local sp = Instance.new("SpecialMesh",w1)
| |
| 722 | sp.MeshType = "Wedge" | |
| 723 | sp.Scale = Vector3.new(0,1,1) * sz/w1.Size | |
| 724 | w1:BreakJoints() | |
| 725 | w1.Anchored = true | |
| 726 | w1.Parent = workspace | |
| 727 | w1.Transparency = 0.7 | |
| 728 | table.insert(Effects,{w1,"Disappear",.05})
| |
| 729 | w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2) | |
| 730 | table.insert(list,w1) | |
| 731 | end | |
| 732 | ||
| 733 | if len2 > 0.01 then | |
| 734 | local w2 = Instance.new('WedgePart', m)
| |
| 735 | w2.Name = "Triangle" | |
| 736 | game:GetService("Debris"):AddItem(w2,5)
| |
| 737 | w2.Material = "SmoothPlastic" | |
| 738 | w2.FormFactor = 'Custom' | |
| 739 | w2.BrickColor = BrickColor.new("Teal")
| |
| 740 | w2.Transparency = 0 | |
| 741 | w2.Reflectance = 0 | |
| 742 | w2.Material = "SmoothPlastic" | |
| 743 | w2.CanCollide = false | |
| 744 | NoOutline(w2) | |
| 745 | local sz = Vector3.new(0.2, width, len2) | |
| 746 | w2.Size = sz | |
| 747 | local sp = Instance.new("SpecialMesh",w2)
| |
| 748 | sp.MeshType = "Wedge" | |
| 749 | sp.Scale = Vector3.new(0,1,1) * sz/w2.Size | |
| 750 | w2:BreakJoints() | |
| 751 | w2.Anchored = true | |
| 752 | w2.Parent = workspace | |
| 753 | w2.Transparency = 0.7 | |
| 754 | table.insert(Effects,{w2,"Disappear",.05})
| |
| 755 | w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2) | |
| 756 | table.insert(list,w2) | |
| 757 | end | |
| 758 | return unpack(list) | |
| 759 | end | |
| 760 | ||
| 761 | function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type) | |
| 762 | local prt=part(3,effects,0,0,brickcolor,"Effect",vt()) | |
| 763 | prt.Anchored=true | |
| 764 | prt.CFrame=cframe | |
| 765 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
| |
| 766 | game:GetService("Debris"):AddItem(prt,10)
| |
| 767 | if Type==1 or Type==nil then | |
| 768 | table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
| |
| 769 | elseif Type==2 then | |
| 770 | table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh})
| |
| 771 | end | |
| 772 | end | |
| 773 | ||
| 774 | function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
| 775 | local prt=part(3,effects,0,0,brickcolor,"Effect",vt()) | |
| 776 | prt.Anchored=true | |
| 777 | prt.CFrame=cframe | |
| 778 | local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
| |
| 779 | game:GetService("Debris"):AddItem(prt,10)
| |
| 780 | table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
| |
| 781 | end | |
| 782 | ||
| 783 | function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,push) | |
| 784 | local prt=part(3,effects,0,0,brickcolor,"Effect",vt()) | |
| 785 | prt.Anchored=true | |
| 786 | prt.CFrame=cframe | |
| 787 | local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
| |
| 788 | game:GetService("Debris"):AddItem(prt,10)
| |
| 789 | table.insert(Effects,{prt,"Blood",delay,x3,y3,z3,msh,push})
| |
| 790 | end | |
| 791 | ||
| 792 | function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
| 793 | local prt=part(3,effects,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 794 | prt.Anchored=true | |
| 795 | prt.CFrame=cframe*cf(x2,y2,z2) | |
| 796 | local msh=mesh("SpecialMesh",prt,"FileMesh","3270017",vt(0,0,0),vt(x1,y1,z1))
| |
| 797 | game:GetService("Debris"):AddItem(prt,10)
| |
| 798 | table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
| |
| 799 | end | |
| 800 | ||
| 801 | function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
| 802 | local prt=part(3,effects,0,0,brickcolor,"Effect",vt()) | |
| 803 | prt.Anchored=true | |
| 804 | prt.CFrame=cframe | |
| 805 | local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
| |
| 806 | game:GetService("Debris"):AddItem(prt,10)
| |
| 807 | table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
| |
| 808 | end | |
| 809 | ||
| 810 | function MagicHead(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
| 811 | local prt=part(3,effects,0,0,brickcolor,"Effect",vt()) | |
| 812 | prt.Anchored=true | |
| 813 | prt.CFrame=cframe | |
| 814 | local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
| |
| 815 | game:GetService("Debris"):AddItem(prt,10)
| |
| 816 | table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
| |
| 817 | end | |
| 818 | ||
| 819 | function ClangEffect(brickcolor,cframe,duration,decrease,size,power) | |
| 820 | local prt=part(3,effects,0,1,brickcolor,"Effect",vt()) | |
| 821 | prt.Anchored=true | |
| 822 | prt.CFrame=cframe | |
| 823 | local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(5,5,5))
| |
| 824 | game:GetService("Debris"):AddItem(prt,10)
| |
| 825 | table.insert(Effects,{prt,"CylinderClang",duration,decrease,size,power,prt.CFrame,nil})
| |
| 826 | end | |
| 827 | ||
| 828 | function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
| 829 | local prt=part(3,effects,0,0,brickcolor,"Effect",vt()) | |
| 830 | prt.Anchored=true | |
| 831 | prt.CFrame=cframe | |
| 832 | local msh=mesh("SpecialMesh",prt,"FileMesh","20329976",vt(0,0,0),vt(x1,y1,z1))
| |
| 833 | game:GetService("Debris"):AddItem(prt,10)
| |
| 834 | table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
| |
| 835 | end | |
| 836 | ||
| 837 | function MagicWave2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
| 838 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt()) | |
| 839 | prt.Anchored=true | |
| 840 | prt.CFrame=cframe | |
| 841 | local msh=mesh("SpecialMesh",prt,"FileMesh","1323306",vt(0,0,0),vt(x1,y1,z1))
| |
| 842 | game:GetService("Debris"):AddItem(prt,10)
| |
| 843 | table.insert(Effects,{prt,"Cylinder2",delay,x3,y3,z3,msh,0})
| |
| 844 | end | |
| 845 | ||
| 846 | function MagicCrystal(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
| 847 | local prt=part(3,effects,0,0,brickcolor,"Effect",vt()) | |
| 848 | prt.Anchored=true | |
| 849 | prt.CFrame=cframe | |
| 850 | local msh=mesh("SpecialMesh",prt,"FileMesh","9756362",vt(0,0,0),vt(x1,y1,z1))
| |
| 851 | game:GetService("Debris"):AddItem(prt,10)
| |
| 852 | table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
| |
| 853 | end | |
| 854 | ||
| 855 | function BreakEffect(brickcolor,cframe,x1,y1,z1) | |
| 856 | local prt=part(3,effects,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 857 | prt.Anchored=true | |
| 858 | prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 859 | game:GetService("Debris"):AddItem(prt,10)
| |
| 860 | local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
| |
| 861 | local num=math.random(10,50)/1000 | |
| 862 | table.insert(Effects,{prt,"Shatter",num,prt.CFrame,math.random()-math.random(),0,math.random(50,100)/100})
| |
| 863 | --table.insert(Effects,{prt,"Shatter",.02,msh})
| |
| 864 | --[[ | |
| 865 | 1=prt | |
| 866 | 2=Shatter | |
| 867 | 3=.02 | |
| 868 | 4=Thing[1].CFrame | |
| 869 | 5=randnum | |
| 870 | 6=Numbb | |
| 871 | coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb) | |
| 872 | CF=Part.CFrame | |
| 873 | Numbb=0 | |
| 874 | randnumb=math.random()-math.random() | |
| 875 | for i=0,1,0.05 do | |
| 876 | wait() | |
| 877 | CF=CF*cf(0,1,0) | |
| 878 | --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0) | |
| 879 | Part.CFrame=CF*euler(Numbb,0,0) | |
| 880 | Part.Transparency=i | |
| 881 | Numbb=Numbb+randnumb | |
| 882 | end | |
| 883 | Part.Parent=nil | |
| 884 | end),prt,CF,Numbb,randnumb)]] | |
| 885 | end | |
| 886 | ||
| 887 | function BreakEffect2(brickcolor,cframe,x1,y1,z1) | |
| 888 | local prt=part(3,effects,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
| 889 | prt.Anchored=true | |
| 890 | prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 891 | game:GetService("Debris"):AddItem(prt,10)
| |
| 892 | local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
| |
| 893 | local num=math.random(10,50)/1000 | |
| 894 | table.insert(Effects,{prt,"Shatter",num,prt.CFrame,math.random()-math.random(),0,math.random(300,1000)/100})
| |
| 895 | end | |
| 896 | ||
| 897 | ||
| 898 | --Break effect. Credits to whoever made it | |
| 899 | local MaxPieces = 10 | |
| 900 | local Explode = true | |
| 901 | local Connection = nil | |
| 902 | function IsWhole(Number) | |
| 903 | return math.ceil(Number) == Number | |
| 904 | end | |
| 905 | function ChangeAxis(Vector,Axis,Value) | |
| 906 | if(Axis == "x")then | |
| 907 | return Vector3.new(Value,Vector.y,Vector.z) | |
| 908 | end | |
| 909 | if(Axis == "y")then | |
| 910 | return Vector3.new(Vector.x,Value,Vector.z) | |
| 911 | end | |
| 912 | if(Axis == "z")then | |
| 913 | return Vector3.new(Vector.x,Vector.y,Value) | |
| 914 | end | |
| 915 | end | |
| 916 | function Break(mouse) | |
| 917 | local Targ = mouse | |
| 918 | local oldParent = mouse.Parent | |
| 919 | local FF = 1 | |
| 920 | if(Targ.formFactor == Enum.FormFactor.Symmetric)then | |
| 921 | FF = 1 | |
| 922 | end | |
| 923 | if(Targ.formFactor == Enum.FormFactor.Brick)then | |
| 924 | FF = 1.2 | |
| 925 | end | |
| 926 | if(Targ.formFactor == Enum.FormFactor.Plate)then | |
| 927 | FF = 0.4 | |
| 928 | end | |
| 929 | local New = Targ:Clone() | |
| 930 | local Rotation = Targ.CFrame - Targ.CFrame.p | |
| 931 | local SizeFactorX = 1 | |
| 932 | local SizeFactorY = FF | |
| 933 | local SizeFactorZ = 1 | |
| 934 | local Extra = (Targ.Size.x*Targ.Size.y*Targ.Size.z/(SizeFactorX*SizeFactorY*SizeFactorZ))/MaxPieces | |
| 935 | while Extra > 1 do | |
| 936 | SizeFactorX = SizeFactorX * 2 | |
| 937 | SizeFactorY = SizeFactorY * 2 | |
| 938 | SizeFactorZ = SizeFactorZ * 2 | |
| 939 | if(SizeFactorX > Targ.Size.x)then | |
| 940 | SizeFactorX = Targ.Size.x | |
| 941 | end | |
| 942 | if(SizeFactorY > Targ.Size.y)then | |
| 943 | SizeFactorY = Targ.Size.y | |
| 944 | end | |
| 945 | if(SizeFactorZ > Targ.Size.z)then | |
| 946 | SizeFactorZ = Targ.Size.z | |
| 947 | end | |
| 948 | Extra = (Targ.Size.x*Targ.Size.y*Targ.Size.z/(SizeFactorX*SizeFactorY*SizeFactorZ))/MaxPieces | |
| 949 | end | |
| 950 | local Start = Targ.Position - (Targ.CFrame.lookVector * (Targ.Size.z/2 + (SizeFactorZ / 2)))-((Targ.CFrame * CFrame.fromEulerAnglesXYZ(0,math.pi/2,0)).lookVector * (Targ.Size.x/2 + (SizeFactorX / 2)))-((Targ.CFrame * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)).lookVector * (Targ.Size.y/2 + (SizeFactorY/2))) | |
| 951 | New.Size = Vector3.new(SizeFactorX,SizeFactorY,SizeFactorZ) | |
| 952 | New.Anchored = false | |
| 953 | local OverShootZ = (Targ.Size.z/SizeFactorZ) - math.floor(Targ.Size.z/SizeFactorZ) | |
| 954 | local OverShootX = (Targ.Size.x/SizeFactorX) - math.floor(Targ.Size.x/SizeFactorX) | |
| 955 | local OverShootY = (Targ.Size.y/SizeFactorY) - math.floor(Targ.Size.y/SizeFactorY) | |
| 956 | ----print("SizeFactor",SizeFactorX,SizeFactorY,SizeFactorZ)
| |
| 957 | ----print("OverShoot",OverShootX,OverShootY,OverShootZ)
| |
| 958 | for z = 1,math.ceil(Targ.Size.z/SizeFactorZ) do | |
| 959 | if(OverShootZ > 0)then | |
| 960 | if(z == math.ceil(Targ.Size.z/SizeFactorZ))then | |
| 961 | z = z - ((1 - OverShootZ) / 2) | |
| 962 | New.Size = ChangeAxis(New.Size,"z",OverShootZ * SizeFactorZ) | |
| 963 | else | |
| 964 | New.Size = ChangeAxis(New.Size,"z",SizeFactorZ) | |
| 965 | end | |
| 966 | end | |
| 967 | for y = 1,math.ceil(Targ.Size.y/SizeFactorY) do | |
| 968 | if(OverShootY > 0)then | |
| 969 | if(y == math.ceil(Targ.Size.y/SizeFactorY))then | |
| 970 | y = y - ((1 - OverShootY) / 2) | |
| 971 | New.Size = ChangeAxis(New.Size,"y",OverShootY * SizeFactorY) | |
| 972 | else | |
| 973 | New.Size = ChangeAxis(New.Size,"y",SizeFactorY) | |
| 974 | end | |
| 975 | end | |
| 976 | for x = 1,math.ceil(Targ.Size.x/SizeFactorX) do | |
| 977 | if(OverShootX > 0)then | |
| 978 | if(x == math.ceil(Targ.Size.x/SizeFactorX))then | |
| 979 | x = x - ((1 - OverShootX) / 2) | |
| 980 | New.Size = ChangeAxis(New.Size,"x",OverShootX * SizeFactorX) | |
| 981 | else | |
| 982 | New.Size = ChangeAxis(New.Size,"x",SizeFactorX) | |
| 983 | end | |
| 984 | end | |
| 985 | local N = New:Clone() | |
| 986 | N.CFrame = CFrame.new(Start + (Targ.CFrame.lookVector * z * SizeFactorZ)+((Targ.CFrame * CFrame.fromEulerAnglesXYZ(0,math.pi/2,0)).lookVector * x * SizeFactorX)+((Targ.CFrame * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0)).lookVector * y * SizeFactorY))*Rotation | |
| 987 | --N.Parent = oldParent | |
| 988 | N.Parent = workspace | |
| 989 | N.CanCollide = false | |
| 990 | N.Velocity = vt(math.random(-300,300),math.random(-20,40),math.random(-300,300)) | |
| 991 | N.RotVelocity = vt(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100) | |
| 992 | game:GetService("Debris"):AddItem(N,5)
| |
| 993 | end | |
| 994 | end | |
| 995 | end | |
| 996 | Targ:Remove() | |
| 997 | end | |
| 998 | ||
| 999 | ||
| 1000 | ||
| 1001 | local BodGy=Instance.new("BodyGyro")
| |
| 1002 | BodGy.maxTorque=Vector3.new(0,4e+005,0) | |
| 1003 | BodGy.P=2000 | |
| 1004 | BodGy.D=100 | |
| 1005 | BodGy.Name="SiegmundGyro" | |
| 1006 | CF=RootPart.CFrame | |
| 1007 | BodGy.Parent=RootPart | |
| 1008 | BodGy.cframe=CF | |
| 1009 | ||
| 1010 | sizeseq=ns({nsk(0,4),nsk(.027,8.5),nsk(.184,9),nsk(1,10)})
| |
| 1011 | transseq=ns({nsk(0,.375),nsk(.4,1),nsk(1,1)})
| |
| 1012 | local icicleparti1=particle(Torso,Color3.new(255/255,255/255,255/255),Color3.new(100/255,100/255,255/255),.2,sizeseq,"http://www.roblox.com/asset/?id=329766994",transseq,0,vt(0,-.5,0),0,false,0,"Bottom",false,nr(7,10),15,nr(-360,360),nr(-30,30),nr(3),20) | |
| 1013 | sizeseq=ns({nsk(0,5),nsk(.025,7.7),nsk(.192,9),nsk(1,10)})
| |
| 1014 | transseq=ns({nsk(0,.8),nsk(.3,1),nsk(1,1)})
| |
| 1015 | local icicleparti2=particle(Torso,Color3.new(255/255,255/255,255/255),Color3.new(100/255,100/255,255/255),.3,sizeseq,"http://www.roblox.com/asset/?id=241594419",transseq,0,vt(0,-.5,0),0,false,0,"Bottom",false,nr(7,10),80,nr(-360,360),nr(-30,30),nr(3),20) | |
| 1016 | sizeseq=ns({nsk(0,.328),nsk(.075,3.11),nsk(.206,4.97),nsk(1,10)})
| |
| 1017 | transseq=ns({nsk(0,.363),nsk(.107,1),nsk(1,1)})
| |
| 1018 | ||
| 1019 | --[[Neck.C0=euler(0,0,0)*cf(0,3,0)*euler(0,.6,0)*euler(-.2,0,0) | |
| 1020 | RootJoint.C0=cf(0,-2,0)*euler(0,.6,0) | |
| 1021 | RW.C0=cf(4.5,1.5,0)*euler(-.4,0,.5)*euler(0,0,0) | |
| 1022 | RW.C1=cf(0,1.5,0)*euler(0,0,0) | |
| 1023 | LW.C0=cf(-4.5,1.5,0)*euler(.2,0,-.5) | |
| 1024 | LW.C1=cf(0,1.5,0)*euler(0,0,0) | |
| 1025 | RH.C0=cf(1.5,-3,0)*euler(0,-.6,0)*euler(0,0,.1) | |
| 1026 | RH.C1=cf(0,3,0)*euler(0,0,0) | |
| 1027 | LH.C0=cf(-1.5,-3,0)*euler(0,.6,0)*euler(.1,0,0) | |
| 1028 | LH.C1=cf(0,3,0)*euler(0,0,0)]] | |
| 1029 | -- idle pose | |
| 1030 | --[[Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.4,0,0),1) | |
| 1031 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-200,0),1) | |
| 1032 | wld19.C0=wld19.C0:lerp(euler(-.4,.3,0)*cf(94,-47.5,-2.248),1) | |
| 1033 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,-.1,-.6)*euler(0,-.4,0),1) | |
| 1034 | wld24.C0=wld24.C0:lerp(euler(.8,.1,0)*cf(0,90.25,0),1) | |
| 1035 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),1) | |
| 1036 | ||
| 1037 | wld33.C0=wld33.C0:lerp(euler(-.4,-.3,0)*cf(-94,-47.5,-2.248),1) | |
| 1038 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,.1,.6)*euler(0,.4,0),1) | |
| 1039 | wld38.C0=wld38.C0:lerp(euler(-.8,.1,0)*cf(0,-90.25,0),1) | |
| 1040 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),1)]] | |
| 1041 | ||
| 1042 | --[[ old idle | |
| 1043 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-200,0),1) | |
| 1044 | wld19.C0=wld19.C0:lerp(euler(-.4,.3,0)*cf(94,-47.5,-2.248),1) | |
| 1045 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,-.2,-.8),1) | |
| 1046 | wld24.C0=wld24.C0:lerp(euler(1.4,-.2,0)*cf(0,90.25,0),1) | |
| 1047 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),1) | |
| 1048 | ||
| 1049 | wld33.C0=wld33.C0:lerp(euler(-.4,-.3,0)*cf(-94,-47.5,-2.248),1) | |
| 1050 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,.2,.8),1) | |
| 1051 | wld38.C0=wld38.C0:lerp(euler(-1.4,-.2,0)*cf(0,-90.25,0),1) | |
| 1052 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),1) | |
| 1053 | ]] | |
| 1054 | ||
| 1055 | --[[RootJoint.C0=clerp(RootJoint.C0,cf(-1.749,-200,0),1) | |
| 1056 | wld19.C0=clerp(wld19.C0,euler(-.4,.3,0)*cf(94,-47.5,-2.248),1) | |
| 1057 | wld21.C0=clerp(wld21.C0,euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,-.2,-.8),1) | |
| 1058 | wld24.C0=clerp(wld24.C0,euler(1.4,-.2,0)*cf(0,90.25,0),1) | |
| 1059 | wld29.C0=clerp(wld29.C0,euler(0,0,0)*cf(0,125,0),1) | |
| 1060 | ||
| 1061 | wld33.C0=clerp(wld33.C0,euler(-.4,-.3,0)*cf(-94,-47.5,-2.248),1) | |
| 1062 | wld35.C0=clerp(wld35.C0,euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,.2,.8),1) | |
| 1063 | wld38.C0=clerp(wld38.C0,euler(-1.4,-.2,0)*cf(0,-90.25,0),1) | |
| 1064 | wld43.C0=clerp(wld43.C0,euler(0,0,0)*cf(0,-125,0),1)]] | |
| 1065 | msh3.Scale=vt(4,0,8.5) | |
| 1066 | msh5.Scale=vt(4,0,8.5) | |
| 1067 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.4,0,0),1) | |
| 1068 | RootJoint.C0=RootJoint.C0:lerp(euler(-.2,0,.1)*cf(-1.749,-60,-30),1) | |
| 1069 | wld19.C0=wld19.C0:lerp(euler(-.4,.3,0)*cf(94,-47.5,-2.248),1) | |
| 1070 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,0,-.6)*euler(0,-.8,0)*euler(0,0,0),1) | |
| 1071 | wld24.C0=wld24.C0:lerp(euler(1.4,.5,0)*cf(0,90.25,0),1) | |
| 1072 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),1) | |
| 1073 | ||
| 1074 | wld33.C0=wld33.C0:lerp(euler(-.4,-.3,0)*cf(-94,-47.5,-2.248),1) | |
| 1075 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,0,.8)*euler(0,.8,0)*euler(.8,0,0),1) | |
| 1076 | wld38.C0=wld38.C0:lerp(euler(-.6,1,0)*cf(0,-90.25,0),1) | |
| 1077 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),1) | |
| 1078 | --[[local Ice1=part(0,armor,.2,0,BrickColor.new("Fog"),"Ice",vt(57.75,136.17,57.77))
| |
| 1079 | Ice1.Material="Ice" | |
| 1080 | Ice1.Anchored=true | |
| 1081 | Ice1.CFrame=workspace.BossSpawn.CFrame*cf(144.341,286.773,15.162) | |
| 1082 | local Ice2=part(0,armor,.2,0,BrickColor.new("Fog"),"Ice",vt(89.99,35.13,77.57)) Ice2.Material="Ice" Ice2.Anchored=true
| |
| 1083 | Ice2.CFrame=workspace.BossSpawn.CFrame*cf(-53.887,-10.726,-155.145) | |
| 1084 | local Ice3=part(0,armor,.2,0,BrickColor.new("Fog"),"Ice",vt(164.4,63.01,89.76)) Ice3.Material="Ice" Ice3.Anchored=true
| |
| 1085 | Ice3.CFrame=workspace.BossSpawn.CFrame*cf(-107.848,12.137,-93.992) | |
| 1086 | local Ice4=part(0,armor,.2,0,BrickColor.new("Fog"),"Ice",vt(25.2,179.13,34.57))
| |
| 1087 | Ice4.Material="Ice" | |
| 1088 | Ice4.Anchored=true | |
| 1089 | Ice4.CFrame=workspace.BossSpawn.CFrame*cf(319.875,454.041,179.418)]] | |
| 1090 | --I1wld=weld(Ice1,RootPart,Ice1,euler(0,0,0)*cf(144.341,286.773,15.162)) | |
| 1091 | --I1wld=weld(Ice1,RootPart,Ice1,euler(0,0,0)*cf(15.162,286.773)) | |
| 1092 | --local HMesh=mesh("SpecialMesh",Head,"Sphere","nil",vt(0,0,0),vt(59.5,59.5,59.5))
| |
| 1093 | ||
| 1094 | --[[local Neck=weld(Torso,Torso,Head,cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)) | |
| 1095 | Neck.C1=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)]] | |
| 1096 | --local Neck=weld(Torso,Torso,Head,euler(0,0,0)*cf(0,35,0)) | |
| 1097 | for i=0,1,0.05 do | |
| 1098 | swait() | |
| 1099 | msh3.Scale=vt(4,1+7.5*i,8.5) | |
| 1100 | msh5.Scale=vt(4,1+7.5*i,8.5) | |
| 1101 | end | |
| 1102 | msh3.Scale=vt(4,8.5,8.5) | |
| 1103 | msh5.Scale=vt(4,8.5,8.5) | |
| 1104 | stunanim=true | |
| 1105 | attack=true | |
| 1106 | stunanim=false | |
| 1107 | attack=false | |
| 1108 | --[[for i=0,1,0.02 do | |
| 1109 | swait() | |
| 1110 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.4,0,0),.1) | |
| 1111 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-200,0),.1) | |
| 1112 | wld19.C0=wld19.C0:lerp(euler(-.4,.3,0)*cf(94,-47.5,-2.248),.1) | |
| 1113 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,-.1,-.6)*euler(0,-.4,0),.1) | |
| 1114 | wld24.C0=wld24.C0:lerp(euler(.8,.1,0)*cf(0,90.25,0),.1) | |
| 1115 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.1) | |
| 1116 | ||
| 1117 | wld33.C0=wld33.C0:lerp(euler(-.4,-.3,0)*cf(-94,-47.5,-2.248),.1) | |
| 1118 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,.1,.6)*euler(0,.4,0),.1) | |
| 1119 | wld38.C0=wld38.C0:lerp(euler(-.8,.1,0)*cf(0,-90.25,0),.1) | |
| 1120 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.1) | |
| 1121 | end]] | |
| 1122 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.4,0,0),1) | |
| 1123 | --print("START BOSS BATTLE")
| |
| 1124 | ||
| 1125 | function TriIceShards() | |
| 1126 | --for i=1,math.random(1,4) do | |
| 1127 | local dacfm=Torso.CFrame*euler(-1.57+math.random(60,120)/100,0,math.random(-80,80)/100) | |
| 1128 | local dacf=Torso.CFrame*euler(-1.57+math.random(60,120)/100,0,math.random(-80,80)/100) | |
| 1129 | local dacf2=Torso.CFrame*euler(-1.57+math.random(60,120)/100,0,math.random(-80,80)/100) | |
| 1130 | local dacf3=Torso.CFrame*euler(-1.57+math.random(60,120)/100,0,math.random(-80,80)/100) | |
| 1131 | local icepart1=part(3,effects,.5,0,BrickColor.new("Pearl"),"Ice",vt()) icepart1.Anchored=true
| |
| 1132 | i1msh=mesh("SpecialMesh",icepart1,"FileMesh","1778999",vt(0,0,0),vt(6,18,6))
| |
| 1133 | icepart1.CFrame=dacf | |
| 1134 | local icepart2=part(3,effects,.5,0,BrickColor.new("Pearl"),"Ice",vt()) icepart2.Anchored=true
| |
| 1135 | i2msh=mesh("SpecialMesh",icepart2,"FileMesh","1778999",vt(0,0,0),vt(6,18,6))
| |
| 1136 | icepart2.CFrame=dacf2 | |
| 1137 | local icepart3=part(3,effects,.5,0,BrickColor.new("Pearl"),"Ice",vt()) icepart3.Anchored=true
| |
| 1138 | i3msh=mesh("SpecialMesh",icepart3,"FileMesh","1778999",vt(0,0,0),vt(6,18,6))
| |
| 1139 | icepart3.CFrame=dacf3 | |
| 1140 | local partic1=icicleparti1:Clone() partic1.Parent=icepart1 partic1.Enabled=true | |
| 1141 | local partic2=icicleparti2:Clone() partic2.Parent=icepart1 partic2.Enabled=true | |
| 1142 | local partic3=icicleparti1:Clone() partic3.Parent=icepart2 partic3.Enabled=true | |
| 1143 | local partic4=icicleparti2:Clone() partic4.Parent=icepart2 partic4.Enabled=true | |
| 1144 | local partic5=icicleparti1:Clone() partic5.Parent=icepart3 partic5.Enabled=true | |
| 1145 | local partic6=icicleparti2:Clone() partic6.Parent=icepart3 partic6.Enabled=true | |
| 1146 | for i=0,1,0.1 do | |
| 1147 | swait() | |
| 1148 | icepart1.CFrame=dacf | |
| 1149 | icepart2.CFrame=dacf2 | |
| 1150 | icepart3.CFrame=dacf3 | |
| 1151 | dacf=dacf*cf(0,math.random(500,1000)/10,0) | |
| 1152 | dacf2=dacf2*cf(0,math.random(500,1000)/10,0) | |
| 1153 | dacf3=dacf3*cf(0,math.random(500,1000)/10,0) | |
| 1154 | end | |
| 1155 | local target1,distance1=findRandomTorso(icepart1.Position) | |
| 1156 | local target2,distance2=findRandomTorso(icepart2.Position) | |
| 1157 | local target3,distance3=findRandomTorso(icepart3.Position) | |
| 1158 | MagicBlock(BrickColor.new("Cyan"),cf(icepart1.Position),60,60,60,20,20,20,.1,1)
| |
| 1159 | MagicBlock(BrickColor.new("Cyan"),cf(icepart2.Position),60,60,60,20,20,20,.1,1)
| |
| 1160 | MagicBlock(BrickColor.new("Cyan"),cf(icepart3.Position),60,60,60,20,20,20,.1,1)
| |
| 1161 | if target1~=nil then | |
| 1162 | so("333475957",icepart1,1,.9)
| |
| 1163 | local MouseLook=cf((icepart1.Position+target1.Position)/2,target1.Position+vt(math.random(-1000,1000)/100,math.random(-1000,1000)/100,math.random(-1000,1000)/100)) | |
| 1164 | table.insert(Effects,{MouseLook,"ShootIce",200,icepart1.Position,5,7,0,icepart1,10,1,partic1,partic2})
| |
| 1165 | else | |
| 1166 | icepart1.Parent=nil | |
| 1167 | end | |
| 1168 | if target2~=nil then | |
| 1169 | so("333475957",icepart2,1,.9)
| |
| 1170 | local MouseLook=cf((icepart2.Position+target2.Position)/2,target2.Position+vt(math.random(-1000,1000)/100,math.random(-1000,1000)/100,math.random(-1000,1000)/100)) | |
| 1171 | table.insert(Effects,{MouseLook,"ShootIce",200,icepart2.Position,5,7,0,icepart2,10,1,partic3,partic4})
| |
| 1172 | else | |
| 1173 | icepart2.Parent=nil | |
| 1174 | end | |
| 1175 | if target3~=nil then | |
| 1176 | so("333475957",icepart3,1,.9)
| |
| 1177 | local MouseLook=cf((icepart3.Position+target3.Position)/2,target3.Position+vt(math.random(-200,200)/100,math.random(-200,200)/100,math.random(-200,200)/100)) | |
| 1178 | table.insert(Effects,{MouseLook,"ShootIce",200,icepart3.Position,8,10,0,icepart3,10,1,partic5,partic6})
| |
| 1179 | else | |
| 1180 | icepart3.Parent=nil | |
| 1181 | end | |
| 1182 | --end | |
| 1183 | end | |
| 1184 | ||
| 1185 | function TriIceShards2() | |
| 1186 | --for i=1,math.random(1,4) do | |
| 1187 | local dacfm=Torso.CFrame*euler(-1.57+math.random(60,120)/100,0,math.random(-80,80)/100) | |
| 1188 | --[[eul1=math.random(0,800)/1000 eul2=math.random(400,1200)/1000 | |
| 1189 | eul3=math.random(200,1000)/1000 | |
| 1190 | eul4=math.random(0,800)/1000 eul5=math.random(400,1200)/1000 | |
| 1191 | local dacf=Torso.CFrame*euler(-eul1,0,eul2) | |
| 1192 | local dacf2=Torso.CFrame*euler(-eul3,0,0) | |
| 1193 | local dacf3=Torso.CFrame*euler(-eul4,0,-eul5)]] | |
| 1194 | local dacf=Torso.CFrame*euler(-1.57+math.random(60,120)/100,0,math.random(-80,80)/100) | |
| 1195 | local dacf2=Torso.CFrame*euler(-1.57+math.random(60,120)/100,0,math.random(-80,80)/100) | |
| 1196 | local dacf3=Torso.CFrame*euler(-1.57+math.random(60,120)/100,0,math.random(-80,80)/100) | |
| 1197 | local icepart1=part(3,effects,.5,0,BrickColor.new("Pearl"),"Ice",vt()) icepart1.Anchored=true
| |
| 1198 | i1msh=mesh("SpecialMesh",icepart1,"FileMesh","1778999",vt(0,0,0),vt(6,18,6))
| |
| 1199 | icepart1.CFrame=dacf | |
| 1200 | local icepart2=part(3,effects,.5,0,BrickColor.new("Pearl"),"Ice",vt()) icepart2.Anchored=true
| |
| 1201 | i2msh=mesh("SpecialMesh",icepart2,"FileMesh","1778999",vt(0,0,0),vt(6,18,6))
| |
| 1202 | icepart2.CFrame=dacf2 | |
| 1203 | local icepart3=part(3,effects,.5,0,BrickColor.new("Pearl"),"Ice",vt()) icepart3.Anchored=true
| |
| 1204 | i3msh=mesh("SpecialMesh",icepart3,"FileMesh","1778999",vt(0,0,0),vt(6,18,6))
| |
| 1205 | icepart3.CFrame=dacf3 | |
| 1206 | local partic1=icicleparti1:Clone() partic1.Parent=icepart1 partic1.Enabled=true | |
| 1207 | local partic2=icicleparti2:Clone() partic2.Parent=icepart1 partic2.Enabled=true | |
| 1208 | local partic3=icicleparti1:Clone() partic3.Parent=icepart2 partic3.Enabled=true | |
| 1209 | local partic4=icicleparti2:Clone() partic4.Parent=icepart2 partic4.Enabled=true | |
| 1210 | local partic5=icicleparti1:Clone() partic5.Parent=icepart3 partic5.Enabled=true | |
| 1211 | local partic6=icicleparti2:Clone() partic6.Parent=icepart3 partic6.Enabled=true | |
| 1212 | for i=0,1,0.1 do | |
| 1213 | swait() | |
| 1214 | icepart1.CFrame=dacf | |
| 1215 | icepart2.CFrame=dacf2 | |
| 1216 | icepart3.CFrame=dacf3 | |
| 1217 | dacf=dacf*cf(0,math.random(500,1000)/10,0) | |
| 1218 | dacf2=dacf2*cf(0,math.random(500,1000)/10,0) | |
| 1219 | dacf3=dacf3*cf(0,math.random(500,1000)/10,0) | |
| 1220 | end | |
| 1221 | local target1,distance1=findNearestTorso(Head.Position) | |
| 1222 | local target2,distance2=findNearestTorso(Head.Position) | |
| 1223 | local target3,distance3=findNearestTorso(Head.Position) | |
| 1224 | MagicBlock(BrickColor.new("Cyan"),cf(icepart1.Position),60,60,60,20,20,20,.1,1)
| |
| 1225 | MagicBlock(BrickColor.new("Cyan"),cf(icepart2.Position),60,60,60,20,20,20,.1,1)
| |
| 1226 | MagicBlock(BrickColor.new("Cyan"),cf(icepart3.Position),60,60,60,20,20,20,.1,1)
| |
| 1227 | if target1~=nil then | |
| 1228 | so("333475957",icepart1,1,.9)
| |
| 1229 | local MouseLook=cf((icepart1.Position+target1.Position)/2,target1.Position+vt(math.random(-1000,1000)/100,math.random(-1000,1000)/100,math.random(-1000,1000)/100)) | |
| 1230 | table.insert(Effects,{MouseLook,"ShootIce",200,icepart1.Position,5,7,0,icepart1,10,1,partic1,partic2})
| |
| 1231 | else | |
| 1232 | icepart1.Parent=nil | |
| 1233 | end | |
| 1234 | if target2~=nil then | |
| 1235 | so("333475957",icepart2,1,.9)
| |
| 1236 | local MouseLook=cf((icepart2.Position+target2.Position)/2,target2.Position+vt(math.random(-1000,1000)/100,math.random(-1000,1000)/100,math.random(-1000,1000)/100)) | |
| 1237 | table.insert(Effects,{MouseLook,"ShootIce",200,icepart2.Position,5,7,0,icepart2,10,1,partic3,partic4})
| |
| 1238 | else | |
| 1239 | icepart2.Parent=nil | |
| 1240 | end | |
| 1241 | if target3~=nil then | |
| 1242 | so("333475957",icepart3,1,.9)
| |
| 1243 | local MouseLook=cf((icepart3.Position+target3.Position)/2,target3.Position+vt(math.random(-200,200)/100,math.random(-200,200)/100,math.random(-200,200)/100)) | |
| 1244 | table.insert(Effects,{MouseLook,"ShootIce",200,icepart3.Position,8,10,0,icepart3,10,1,partic5,partic6})
| |
| 1245 | else | |
| 1246 | icepart3.Parent=nil | |
| 1247 | end | |
| 1248 | --end | |
| 1249 | end | |
| 1250 | ||
| 1251 | function TriOrbs() | |
| 1252 | --for i=1,math.random(1,4) do | |
| 1253 | local dacf=Torso.CFrame*euler(-1.57+math.random(100,150)/100,0,math.random(-80,80)/100) | |
| 1254 | local dacf2=Torso.CFrame*euler(-1.57+math.random(100,150)/100,0,math.random(-80,80)/100) | |
| 1255 | local dacf3=Torso.CFrame*euler(-1.57+math.random(100,150)/100,0,math.random(-80,80)/100) | |
| 1256 | local icepart1=part(3,effects,0,0,BrickColor.new("Cyan"),"Ice",vt()) icepart1.Anchored=true
| |
| 1257 | i1msh=mesh("SpecialMesh",icepart1,"Sphere","nil",vt(0,0,0),vt(100,100,100))
| |
| 1258 | icepart1.CFrame=dacf | |
| 1259 | local icepart2=part(3,effects,0,0,BrickColor.new("Cyan"),"Ice",vt()) icepart2.Anchored=true
| |
| 1260 | i2msh=mesh("SpecialMesh",icepart2,"Sphere","nil",vt(0,0,0),vt(100,100,100))
| |
| 1261 | icepart2.CFrame=dacf2 | |
| 1262 | local icepart3=part(3,effects,0,0,BrickColor.new("Cyan"),"Ice",vt()) icepart3.Anchored=true
| |
| 1263 | i3msh=mesh("SpecialMesh",icepart3,"Sphere","nil",vt(0,0,0),vt(100,100,100))
| |
| 1264 | icepart3.CFrame=dacf3 | |
| 1265 | local partic1=icicleparti2:Clone() partic1.Parent=icepart1 partic1.Enabled=true | |
| 1266 | local partic3=icicleparti2:Clone() partic3.Parent=icepart2 partic3.Enabled=true | |
| 1267 | local partic5=icicleparti2:Clone() partic5.Parent=icepart3 partic5.Enabled=true | |
| 1268 | for i=0,1,0.1 do | |
| 1269 | swait() | |
| 1270 | icepart1.CFrame=dacf | |
| 1271 | icepart2.CFrame=dacf2 | |
| 1272 | icepart3.CFrame=dacf3 | |
| 1273 | dacf=dacf*cf(0,math.random(400,800)/10,0) | |
| 1274 | dacf2=dacf2*cf(0,math.random(400,800)/10,0) | |
| 1275 | dacf3=dacf3*cf(0,math.random(400,800)/10,0) | |
| 1276 | end | |
| 1277 | local target1,distance1=findRandomTorso(icepart1.Position) | |
| 1278 | local target2,distance2=findRandomTorso(icepart2.Position) | |
| 1279 | local target3,distance3=findRandomTorso(icepart3.Position) | |
| 1280 | local test1,dist1=findNearestTorso(Head.Position) | |
| 1281 | local pos1,pos2,pos3=nil,nil,nil | |
| 1282 | local refpart1=part(3,effects,0,1,BrickColor.new("Cyan"),"Ref",vt()) refpart1.Anchored=true
| |
| 1283 | local refpart2=part(3,effects,0,1,BrickColor.new("Cyan"),"Ref",vt()) refpart2.Anchored=true
| |
| 1284 | local refpart3=part(3,effects,0,1,BrickColor.new("Cyan"),"Ref",vt()) refpart3.Anchored=true
| |
| 1285 | if target1~=nil then | |
| 1286 | pos1=target1.Position | |
| 1287 | refpart1.CFrame=cf(pos1)*cf(math.random(-3000,3000)/100,math.random(-3000,3000)/100,math.random(-3000,3000)/100) | |
| 1288 | end | |
| 1289 | if target2~=nil then | |
| 1290 | pos2=target2.Position | |
| 1291 | refpart2.CFrame=cf(pos2)*cf(math.random(-3000,3000)/100,math.random(-3000,3000)/100,math.random(-3000,3000)/100) | |
| 1292 | end | |
| 1293 | if target3~=nil then | |
| 1294 | pos3=target3.Position | |
| 1295 | refpart3.CFrame=cf(pos3)*cf(math.random(-3000,3000)/100,math.random(-3000,3000)/100,math.random(-3000,3000)/100) | |
| 1296 | end | |
| 1297 | local move=40 | |
| 1298 | for i=0,1,0.1 do | |
| 1299 | swait() | |
| 1300 | move=40-40*i | |
| 1301 | if target1~=nil then | |
| 1302 | refpart1.CFrame=cf(refpart1.Position,target1.Position) | |
| 1303 | MagicCircle2(BrickColor.new("Cyan"),icepart1.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,60,0),15,40,15,-1,20,-1,.1,-5)
| |
| 1304 | icepart1.CFrame=dacf | |
| 1305 | dacf=dacf*cf(0,move,0) | |
| 1306 | end | |
| 1307 | if target2~=nil then | |
| 1308 | refpart2.CFrame=cf(refpart2.Position,target2.Position) | |
| 1309 | MagicCircle2(BrickColor.new("Cyan"),icepart2.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,60,0),15,40,15,-1,20,-1,.1,-5)
| |
| 1310 | icepart2.CFrame=dacf2 | |
| 1311 | dacf2=dacf2*cf(0,move,0) | |
| 1312 | end | |
| 1313 | if target3~=nil then | |
| 1314 | refpart3.CFrame=cf(refpart3.Position,target3.Position) | |
| 1315 | MagicCircle2(BrickColor.new("Cyan"),icepart3.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,60,0),15,40,15,-1,20,-1,.1,-5)
| |
| 1316 | icepart3.CFrame=dacf3 | |
| 1317 | dacf3=dacf3*cf(0,move,0) | |
| 1318 | end | |
| 1319 | end | |
| 1320 | local laser1=part(3,effects,0,0,BrickColor.new("Cyan"),"Effect",vt()) laser1.Anchored=true
| |
| 1321 | local lmsh1=mesh("SpecialMesh",laser1,"Head","nil",vt(0,0,0),vt(10,1,10))
| |
| 1322 | local laser2=part(3,effects,0,0,BrickColor.new("Cyan"),"Effect",vt()) laser2.Anchored=true
| |
| 1323 | local lmsh2=mesh("SpecialMesh",laser2,"Head","nil",vt(0,0,0),vt(10,1,10))
| |
| 1324 | local laser3=part(3,effects,0,0,BrickColor.new("Cyan"),"Effect",vt()) laser3.Anchored=true
| |
| 1325 | local lmsh3=mesh("SpecialMesh",laser3,"Head","nil",vt(0,0,0),vt(10,1,10))
| |
| 1326 | local ref=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 1327 | ref.Anchored=true | |
| 1328 | ref.CFrame=cf(0,0,0) | |
| 1329 | game:GetService("Debris"):AddItem(ref,1)
| |
| 1330 | local ref1=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 1331 | ref1.Anchored=true | |
| 1332 | ref1.CFrame=cf(0,0,0) | |
| 1333 | game:GetService("Debris"):AddItem(ref1,5)
| |
| 1334 | local ice1=0 | |
| 1335 | local ref2=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 1336 | ref2.Anchored=true | |
| 1337 | ref2.CFrame=cf(0,0,0) | |
| 1338 | game:GetService("Debris"):AddItem(ref2,5)
| |
| 1339 | local ice2=2 | |
| 1340 | local ref3=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 1341 | ref3.Anchored=true | |
| 1342 | ref3.CFrame=cf(0,0,0) | |
| 1343 | game:GetService("Debris"):AddItem(ref3,5)
| |
| 1344 | local ice3=4 | |
| 1345 | for i=0,3,0.05 do | |
| 1346 | swait() | |
| 1347 | ice1=ice1+1 | |
| 1348 | ice2=ice2+1 | |
| 1349 | ice3=ice3+1 | |
| 1350 | if target1~=nil then | |
| 1351 | if i>1 then | |
| 1352 | refpart1.CFrame=refpart1.CFrame*cf(0,0,-1.5) | |
| 1353 | end | |
| 1354 | local cfnew=cf(icepart1.Position,refpart1.Position) | |
| 1355 | local hit1,pos1=rayCast(icepart1.Position,cfnew.lookVector,9999,Character) | |
| 1356 | local mag1=(icepart1.Position-pos1).magnitude | |
| 1357 | laser1.CFrame=CFrame.new((icepart1.Position+pos1)/2,pos1)*angles(1.57,0,0) | |
| 1358 | lmsh1.Scale=vt(10,mag1*5,10) | |
| 1359 | MagicBlock(BrickColor.new("Cyan"),cf(pos1),5,5,5,5,5,5,.1,1)
| |
| 1360 | ref.CFrame=cf(pos1) | |
| 1361 | MagniDamage(ref,5,8,14,0,"Normal",RootPart,.2,1,math.random(6,8),nil,nil,true) | |
| 1362 | ref1.CFrame=cf(ref.Position) | |
| 1363 | if ice1%2==0 then | |
| 1364 | so("333476017",ref1,.3,1.4)
| |
| 1365 | end | |
| 1366 | end | |
| 1367 | if target2~=nil then | |
| 1368 | if i>1 then | |
| 1369 | refpart2.CFrame=refpart2.CFrame*cf(0,0,-1.5) | |
| 1370 | end | |
| 1371 | local cfnew=cf(icepart2.Position,refpart2.Position) | |
| 1372 | local hit2,pos2=rayCast(icepart2.Position,cfnew.lookVector,9999,Character) | |
| 1373 | local mag2=(icepart2.Position-pos2).magnitude | |
| 1374 | laser2.CFrame=CFrame.new((icepart2.Position+pos2)/2,pos2)*angles(1.57,0,0) | |
| 1375 | lmsh2.Scale=vt(10,mag2*5,10) | |
| 1376 | MagicBlock(BrickColor.new("Cyan"),cf(pos2),5,5,5,5,5,5,.1,1)
| |
| 1377 | ref.CFrame=cf(pos2) | |
| 1378 | MagniDamage(ref,5,8,14,0,"Normal",RootPart,.2,1,math.random(6,8),nil,nil,true) | |
| 1379 | ref2.CFrame=cf(ref.Position) | |
| 1380 | if ice2%2==0 then | |
| 1381 | so("333476017",ref2,.3,1.4)
| |
| 1382 | end | |
| 1383 | end | |
| 1384 | if target3~=nil then | |
| 1385 | if i>1 then | |
| 1386 | refpart3.CFrame=refpart3.CFrame*cf(0,0,-1.5) | |
| 1387 | end | |
| 1388 | local cfnew=cf(icepart3.Position,refpart3.Position) | |
| 1389 | local hit3,pos3=rayCast(icepart3.Position,cfnew.lookVector,9999,Character) | |
| 1390 | local mag3=(icepart3.Position-pos3).magnitude | |
| 1391 | laser3.CFrame=CFrame.new((icepart3.Position+pos3)/2,pos3)*angles(1.57,0,0) | |
| 1392 | lmsh3.Scale=vt(10,mag3*5,10) | |
| 1393 | MagicBlock(BrickColor.new("Cyan"),cf(pos3),5,5,5,5,5,5,.1,1)
| |
| 1394 | ref.CFrame=cf(pos3) | |
| 1395 | MagniDamage(ref,5,8,14,0,"Normal",RootPart,.2,1,math.random(6,8),nil,nil,true) | |
| 1396 | ref3.CFrame=cf(ref.Position) | |
| 1397 | if ice3%2==0 then | |
| 1398 | so("333476017",ref3,.3,1.4)
| |
| 1399 | end | |
| 1400 | end | |
| 1401 | end | |
| 1402 | if target1~=nil then | |
| 1403 | local pos1=laser1.CFrame | |
| 1404 | local x1=lmsh1.Scale.X local y1=lmsh1.Scale.Y local z1=lmsh1.Scale.Z | |
| 1405 | MagicHead(BrickColor.new("Cyan"),pos1,x1,y1,z1,1,1,1,.1)
| |
| 1406 | end | |
| 1407 | if target2~=nil then | |
| 1408 | local pos2=laser2.CFrame | |
| 1409 | local x2=lmsh2.Scale.X local y2=lmsh2.Scale.Y local z2=lmsh2.Scale.Z | |
| 1410 | MagicHead(BrickColor.new("Cyan"),pos2,x2,y2,z2,1,1,1,.1)
| |
| 1411 | end | |
| 1412 | if target3~=nil then | |
| 1413 | local pos3=laser3.CFrame | |
| 1414 | local x3=lmsh3.Scale.X local y3=lmsh3.Scale.Y local z3=lmsh3.Scale.Z | |
| 1415 | MagicHead(BrickColor.new("Cyan"),pos3,x3,y3,z3,1,1,1,.1)
| |
| 1416 | end | |
| 1417 | MagicCircle(BrickColor.new("Cyan"),cf(icepart1.Position),100,100,100,5,5,5,.2)
| |
| 1418 | MagicCircle(BrickColor.new("Cyan"),cf(icepart2.Position),100,100,100,5,5,5,.2)
| |
| 1419 | MagicCircle(BrickColor.new("Cyan"),cf(icepart3.Position),100,100,100,5,5,5,.2)
| |
| 1420 | icepart1.Parent=nil | |
| 1421 | icepart2.Parent=nil | |
| 1422 | icepart3.Parent=nil | |
| 1423 | refpart1.Parent=nil | |
| 1424 | refpart2.Parent=nil | |
| 1425 | refpart3.Parent=nil | |
| 1426 | laser1.Parent=nil | |
| 1427 | laser2.Parent=nil | |
| 1428 | laser3.Parent=nil | |
| 1429 | ref.Parent=nil | |
| 1430 | end | |
| 1431 | ||
| 1432 | function TriOrbs2() | |
| 1433 | --for i=1,math.random(1,4) do | |
| 1434 | local dacf=Torso.CFrame*euler(-1.57+math.random(100,150)/100,0,math.random(-80,80)/100) | |
| 1435 | local dacf2=Torso.CFrame*euler(-1.57+math.random(100,150)/100,0,math.random(-80,80)/100) | |
| 1436 | local dacf3=Torso.CFrame*euler(-1.57+math.random(100,150)/100,0,math.random(-80,80)/100) | |
| 1437 | local icepart1=part(3,effects,0,0,BrickColor.new("Cyan"),"Ice",vt()) icepart1.Anchored=true
| |
| 1438 | i1msh=mesh("SpecialMesh",icepart1,"Sphere","nil",vt(0,0,0),vt(100,100,100))
| |
| 1439 | icepart1.CFrame=dacf | |
| 1440 | local icepart2=part(3,effects,0,0,BrickColor.new("Cyan"),"Ice",vt()) icepart2.Anchored=true
| |
| 1441 | i2msh=mesh("SpecialMesh",icepart2,"Sphere","nil",vt(0,0,0),vt(100,100,100))
| |
| 1442 | icepart2.CFrame=dacf2 | |
| 1443 | local icepart3=part(3,effects,0,0,BrickColor.new("Cyan"),"Ice",vt()) icepart3.Anchored=true
| |
| 1444 | i3msh=mesh("SpecialMesh",icepart3,"Sphere","nil",vt(0,0,0),vt(100,100,100))
| |
| 1445 | icepart3.CFrame=dacf3 | |
| 1446 | local partic1=icicleparti2:Clone() partic1.Parent=icepart1 partic1.Enabled=true | |
| 1447 | local partic3=icicleparti2:Clone() partic3.Parent=icepart2 partic3.Enabled=true | |
| 1448 | local partic5=icicleparti2:Clone() partic5.Parent=icepart3 partic5.Enabled=true | |
| 1449 | for i=0,1,0.1 do | |
| 1450 | swait() | |
| 1451 | icepart1.CFrame=dacf | |
| 1452 | icepart2.CFrame=dacf2 | |
| 1453 | icepart3.CFrame=dacf3 | |
| 1454 | dacf=dacf*cf(0,math.random(400,800)/10,0) | |
| 1455 | dacf2=dacf2*cf(0,math.random(400,800)/10,0) | |
| 1456 | dacf3=dacf3*cf(0,math.random(400,800)/10,0) | |
| 1457 | end | |
| 1458 | local target1,distance1=findNearestTorso(Head.Position) | |
| 1459 | local target2,distance2=findNearestTorso(Head.Position) | |
| 1460 | local target3,distance3=findNearestTorso(Head.Position) | |
| 1461 | local test1,dist1=findNearestTorso(Head.Position) | |
| 1462 | local pos1,pos2,pos3=nil,nil,nil | |
| 1463 | local refpart1=part(3,effects,0,1,BrickColor.new("Cyan"),"Ref",vt()) refpart1.Anchored=true
| |
| 1464 | local refpart2=part(3,effects,0,1,BrickColor.new("Cyan"),"Ref",vt()) refpart2.Anchored=true
| |
| 1465 | local refpart3=part(3,effects,0,1,BrickColor.new("Cyan"),"Ref",vt()) refpart3.Anchored=true
| |
| 1466 | if target1~=nil then | |
| 1467 | pos1=target1.Position | |
| 1468 | refpart1.CFrame=cf(pos1)*cf(math.random(-3000,3000)/100,math.random(-3000,3000)/100,math.random(-3000,3000)/100) | |
| 1469 | end | |
| 1470 | if target2~=nil then | |
| 1471 | pos2=target2.Position | |
| 1472 | refpart2.CFrame=cf(pos2)*cf(math.random(-3000,3000)/100,math.random(-3000,3000)/100,math.random(-3000,3000)/100) | |
| 1473 | end | |
| 1474 | if target3~=nil then | |
| 1475 | pos3=target3.Position | |
| 1476 | refpart3.CFrame=cf(pos3)*cf(math.random(-3000,3000)/100,math.random(-3000,3000)/100,math.random(-3000,3000)/100) | |
| 1477 | end | |
| 1478 | local move=40 | |
| 1479 | for i=0,1,0.1 do | |
| 1480 | swait() | |
| 1481 | move=40-40*i | |
| 1482 | if target1~=nil then | |
| 1483 | refpart1.CFrame=cf(refpart1.Position,target1.Position) | |
| 1484 | MagicCircle2(BrickColor.new("Cyan"),icepart1.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,60,0),15,40,15,-1,20,-1,.1,-5)
| |
| 1485 | icepart1.CFrame=dacf | |
| 1486 | dacf=dacf*cf(0,move,0) | |
| 1487 | end | |
| 1488 | if target2~=nil then | |
| 1489 | refpart2.CFrame=cf(refpart2.Position,target2.Position) | |
| 1490 | MagicCircle2(BrickColor.new("Cyan"),icepart2.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,60,0),15,40,15,-1,20,-1,.1,-5)
| |
| 1491 | icepart2.CFrame=dacf2 | |
| 1492 | dacf2=dacf2*cf(0,move,0) | |
| 1493 | end | |
| 1494 | if target3~=nil then | |
| 1495 | refpart3.CFrame=cf(refpart3.Position,target3.Position) | |
| 1496 | MagicCircle2(BrickColor.new("Cyan"),icepart3.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,60,0),15,40,15,-1,20,-1,.1,-5)
| |
| 1497 | icepart3.CFrame=dacf3 | |
| 1498 | dacf3=dacf3*cf(0,move,0) | |
| 1499 | end | |
| 1500 | end | |
| 1501 | local laser1=part(3,effects,0,0,BrickColor.new("Cyan"),"Effect",vt()) laser1.Anchored=true
| |
| 1502 | local lmsh1=mesh("SpecialMesh",laser1,"Head","nil",vt(0,0,0),vt(10,1,10))
| |
| 1503 | local laser2=part(3,effects,0,0,BrickColor.new("Cyan"),"Effect",vt()) laser2.Anchored=true
| |
| 1504 | local lmsh2=mesh("SpecialMesh",laser2,"Head","nil",vt(0,0,0),vt(10,1,10))
| |
| 1505 | local laser3=part(3,effects,0,0,BrickColor.new("Cyan"),"Effect",vt()) laser3.Anchored=true
| |
| 1506 | local lmsh3=mesh("SpecialMesh",laser3,"Head","nil",vt(0,0,0),vt(10,1,10))
| |
| 1507 | local ref=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 1508 | ref.Anchored=true | |
| 1509 | ref.CFrame=cf(0,0,0) | |
| 1510 | game:GetService("Debris"):AddItem(ref,1)
| |
| 1511 | local ref1=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 1512 | ref1.Anchored=true | |
| 1513 | ref1.CFrame=cf(0,0,0) | |
| 1514 | game:GetService("Debris"):AddItem(ref1,5)
| |
| 1515 | local ice1=0 | |
| 1516 | local ref2=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 1517 | ref2.Anchored=true | |
| 1518 | ref2.CFrame=cf(0,0,0) | |
| 1519 | game:GetService("Debris"):AddItem(ref2,5)
| |
| 1520 | local ice2=2 | |
| 1521 | local ref3=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 1522 | ref3.Anchored=true | |
| 1523 | ref3.CFrame=cf(0,0,0) | |
| 1524 | game:GetService("Debris"):AddItem(ref3,5)
| |
| 1525 | local ice3=4 | |
| 1526 | for i=0,3,0.1 do | |
| 1527 | swait() | |
| 1528 | ice1=ice1+1 | |
| 1529 | ice2=ice2+1 | |
| 1530 | ice3=ice3+1 | |
| 1531 | if target1~=nil then | |
| 1532 | if i>1 then | |
| 1533 | refpart1.CFrame=refpart1.CFrame*cf(0,0,-2) | |
| 1534 | end | |
| 1535 | local cfnew=cf(icepart1.Position,refpart1.Position) | |
| 1536 | local hit1,pos1=rayCast(icepart1.Position,cfnew.lookVector,9999,Character) | |
| 1537 | local mag1=(icepart1.Position-pos1).magnitude | |
| 1538 | laser1.CFrame=CFrame.new((icepart1.Position+pos1)/2,pos1)*angles(1.57,0,0) | |
| 1539 | lmsh1.Scale=vt(10,mag1*5,10) | |
| 1540 | MagicBlock(BrickColor.new("Cyan"),cf(pos1),5,5,5,5,5,5,.1,1)
| |
| 1541 | ref.CFrame=cf(pos1) | |
| 1542 | MagniDamage(ref,5,8,14,0,"Normal",RootPart,.2,1,math.random(6,8),nil,nil,true) | |
| 1543 | ref1.CFrame=cf(ref.Position) | |
| 1544 | if ice1%2==0 then | |
| 1545 | so("333476017",ref1,.3,1.4)
| |
| 1546 | end | |
| 1547 | end | |
| 1548 | if target2~=nil then | |
| 1549 | if i>1 then | |
| 1550 | refpart2.CFrame=refpart2.CFrame*cf(0,0,-2) | |
| 1551 | end | |
| 1552 | local cfnew=cf(icepart2.Position,refpart2.Position) | |
| 1553 | local hit2,pos2=rayCast(icepart2.Position,cfnew.lookVector,9999,Character) | |
| 1554 | local mag2=(icepart2.Position-pos2).magnitude | |
| 1555 | laser2.CFrame=CFrame.new((icepart2.Position+pos2)/2,pos2)*angles(1.57,0,0) | |
| 1556 | lmsh2.Scale=vt(10,mag2*5,10) | |
| 1557 | MagicBlock(BrickColor.new("Cyan"),cf(pos2),5,5,5,5,5,5,.1,1)
| |
| 1558 | ref.CFrame=cf(pos2) | |
| 1559 | MagniDamage(ref,5,8,14,0,"Normal",RootPart,.2,1,math.random(6,8),nil,nil,true) | |
| 1560 | ref2.CFrame=cf(ref.Position) | |
| 1561 | if ice2%2==0 then | |
| 1562 | so("333476017",ref2,.3,1.4)
| |
| 1563 | end | |
| 1564 | end | |
| 1565 | if target3~=nil then | |
| 1566 | if i>1 then | |
| 1567 | refpart3.CFrame=refpart3.CFrame*cf(0,0,-2) | |
| 1568 | end | |
| 1569 | local cfnew=cf(icepart3.Position,refpart3.Position) | |
| 1570 | local hit3,pos3=rayCast(icepart3.Position,cfnew.lookVector,9999,Character) | |
| 1571 | local mag3=(icepart3.Position-pos3).magnitude | |
| 1572 | laser3.CFrame=CFrame.new((icepart3.Position+pos3)/2,pos3)*angles(1.57,0,0) | |
| 1573 | lmsh3.Scale=vt(10,mag3*5,10) | |
| 1574 | MagicBlock(BrickColor.new("Cyan"),cf(pos3),5,5,5,5,5,5,.1,1)
| |
| 1575 | ref.CFrame=cf(pos3) | |
| 1576 | MagniDamage(ref,5,8,14,0,"Normal",RootPart,.2,1,math.random(6,8),nil,nil,true) | |
| 1577 | ref3.CFrame=cf(ref.Position) | |
| 1578 | if ice3%2==0 then | |
| 1579 | so("333476017",ref3,.3,1.4)
| |
| 1580 | end | |
| 1581 | end | |
| 1582 | end | |
| 1583 | if target1~=nil then | |
| 1584 | local pos1=laser1.CFrame | |
| 1585 | local x1=lmsh1.Scale.X local y1=lmsh1.Scale.Y local z1=lmsh1.Scale.Z | |
| 1586 | MagicHead(BrickColor.new("Cyan"),pos1,x1,y1,z1,1,1,1,.1)
| |
| 1587 | end | |
| 1588 | if target2~=nil then | |
| 1589 | local pos2=laser2.CFrame | |
| 1590 | local x2=lmsh2.Scale.X local y2=lmsh2.Scale.Y local z2=lmsh2.Scale.Z | |
| 1591 | MagicHead(BrickColor.new("Cyan"),pos2,x2,y2,z2,1,1,1,.1)
| |
| 1592 | end | |
| 1593 | if target3~=nil then | |
| 1594 | local pos3=laser3.CFrame | |
| 1595 | local x3=lmsh3.Scale.X local y3=lmsh3.Scale.Y local z3=lmsh3.Scale.Z | |
| 1596 | MagicHead(BrickColor.new("Cyan"),pos3,x3,y3,z3,1,1,1,.1)
| |
| 1597 | end | |
| 1598 | MagicCircle(BrickColor.new("Cyan"),cf(icepart1.Position),100,100,100,5,5,5,.2)
| |
| 1599 | MagicCircle(BrickColor.new("Cyan"),cf(icepart2.Position),100,100,100,5,5,5,.2)
| |
| 1600 | MagicCircle(BrickColor.new("Cyan"),cf(icepart3.Position),100,100,100,5,5,5,.2)
| |
| 1601 | icepart1.Parent=nil | |
| 1602 | icepart2.Parent=nil | |
| 1603 | icepart3.Parent=nil | |
| 1604 | refpart1.Parent=nil | |
| 1605 | refpart2.Parent=nil | |
| 1606 | refpart3.Parent=nil | |
| 1607 | laser1.Parent=nil | |
| 1608 | laser2.Parent=nil | |
| 1609 | laser3.Parent=nil | |
| 1610 | ref.Parent=nil | |
| 1611 | end | |
| 1612 | ||
| 1613 | function IceMortar() | |
| 1614 | for i=1,math.random(2,3) do | |
| 1615 | local dacf=Torso.CFrame*euler(-1.57+math.random(40,80)/100,0,math.random(-80,80)/100) | |
| 1616 | local icepart1=part(3,effects,0,0,BrickColor.new("Cyan"),"Ice",vt()) icepart1.Anchored=true
| |
| 1617 | i1msh=mesh("SpecialMesh",icepart1,"Sphere","nil",vt(0,0,0),vt(200,200,200))
| |
| 1618 | icepart1.CFrame=dacf | |
| 1619 | local inc=100 | |
| 1620 | for i=0,1,0.1 do | |
| 1621 | swait() | |
| 1622 | icepart1.CFrame=dacf | |
| 1623 | dacf=dacf*cf(0,inc,0) | |
| 1624 | inc=100-100*i | |
| 1625 | end | |
| 1626 | local cfinc=99999 | |
| 1627 | MagicHead(BrickColor.new("Cyan"),cf(icepart1.Position)*cf(0,cfinc/10,0),200,cfinc,200,-10,1,-10,.1)
| |
| 1628 | MagicCircle(BrickColor.new("Cyan"),cf(icepart1.Position),200,200,200,-10,0,-10,.1)
| |
| 1629 | icepart1.Transparency=1 | |
| 1630 | so("334325056",icepart1,1,1)
| |
| 1631 | game:GetService("Debris"):AddItem(icepart1,1)
| |
| 1632 | local target1,distance1=findRandomTorso(icepart1.Position) | |
| 1633 | local test1,dist1=findNearestTorso(Head.Position) | |
| 1634 | if target1~=nil then | |
| 1635 | cfda=target1.Position+vt(math.random(-3000,3000)/100,0,math.random(-3000,3000)/100) | |
| 1636 | local hit2,pos2=rayCast(cfda,(CFrame.new(cfda,cfda - Vector3.new(0,1,0))).lookVector,999,Character) | |
| 1637 | local d1=part(3,effects,0,.5,BrickColor.new("red"),"Effect",vt())
| |
| 1638 | d1.Anchored=true | |
| 1639 | d1.CFrame=cf(pos2) | |
| 1640 | msh=mesh("CylinderMesh",d1,"nil","nil",vt(0,0,0),vt(200,5,200))
| |
| 1641 | d2=d1:Clone() | |
| 1642 | d2.Parent=d1 | |
| 1643 | d2.CFrame=cf(d1.Position) | |
| 1644 | d2.BrickColor=BrickColor.new("White")
| |
| 1645 | d2.Mesh.Scale=vt(0,5,0) | |
| 1646 | table.insert(Effects,{d1,"SatelliteStrike",d2,d2.Mesh,0})
| |
| 1647 | end | |
| 1648 | end | |
| 1649 | end | |
| 1650 | ||
| 1651 | function TurnSlam() | |
| 1652 | attack=true | |
| 1653 | local target,distance=findRandomTorso(RootPart.Position) | |
| 1654 | if target~=nil or target==nil then | |
| 1655 | local x,y,z = 0,0,0 | |
| 1656 | for i=0,1,0.02 do | |
| 1657 | swait() | |
| 1658 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-200,0),.05) | |
| 1659 | wld19.C0=wld19.C0:lerp(euler(-.6,.3,0)*cf(94,-47.5,-2.248),.01) | |
| 1660 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,.4,-.6),.01) | |
| 1661 | wld24.C0=wld24.C0:lerp(euler(2.4,.2,0)*cf(0,90.25,0),.01) | |
| 1662 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.01) | |
| 1663 | ||
| 1664 | wld33.C0=wld33.C0:lerp(euler(-.6,-.3,0)*cf(-94,-47.5,-2.248),.01) | |
| 1665 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,-.4,.6),.01) | |
| 1666 | wld38.C0=wld38.C0:lerp(euler(-2.4,.2,0)*cf(0,-90.25,0),.01) | |
| 1667 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.01) | |
| 1668 | if Stun.Value>=StunT.Value then | |
| 1669 | break | |
| 1670 | end | |
| 1671 | end | |
| 1672 | for i=0,1,0.01 do | |
| 1673 | swait() | |
| 1674 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(-.2,0,0),.02) | |
| 1675 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-200,0),.05) | |
| 1676 | wld19.C0=wld19.C0:lerp(euler(.2,.3,0)*cf(94,-47.5,-2.248),.02) | |
| 1677 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,-1,-1.2),.02) | |
| 1678 | wld24.C0=wld24.C0:lerp(euler(2,-1,0)*cf(0,90.25,0),.02) | |
| 1679 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0)*euler(.5,0,1),.02) | |
| 1680 | ||
| 1681 | wld33.C0=wld33.C0:lerp(euler(.2,-.3,0)*cf(-94,-47.5,-2.248),.02) | |
| 1682 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,1,1.2),.02) | |
| 1683 | wld38.C0=wld38.C0:lerp(euler(-2,-1,0)*cf(0,-90.25,0),.02) | |
| 1684 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0)*euler(-.5,0,-1),.02) | |
| 1685 | if Stun.Value>=StunT.Value then | |
| 1686 | break | |
| 1687 | end | |
| 1688 | end | |
| 1689 | shockwave=false | |
| 1690 | ref1a=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 1691 | ref1a.Anchored=true | |
| 1692 | ref1a.CFrame=cf(0,-50,0) | |
| 1693 | game:GetService("Debris"):AddItem(ref1a,3)
| |
| 1694 | ref2a=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 1695 | ref2a.Anchored=true | |
| 1696 | ref2a.CFrame=cf(0,-50,0) | |
| 1697 | game:GetService("Debris"):AddItem(ref2a,3)
| |
| 1698 | incda=80 | |
| 1699 | for i=0,3,0.03 do | |
| 1700 | swait() | |
| 1701 | dan=.1 | |
| 1702 | if shockwave==true then | |
| 1703 | incda=incda+10 | |
| 1704 | if i<1.5 then | |
| 1705 | MagniDamage(ref1a,incda,10,15,math.random(0,0),"Knockdown2",RootPart,1.5,1,math.random(8,10),nil,nil,false,"Movement",.1,300) | |
| 1706 | MagniDamage(ref2a,incda,10,15,math.random(0,0),"Knockdown2",RootPart,1.5,1,math.random(8,10),nil,nil,false,"Movement",.1,300) | |
| 1707 | end | |
| 1708 | end | |
| 1709 | if i>1 then | |
| 1710 | dan=.05 | |
| 1711 | if shockwave==false then | |
| 1712 | for i=1,2 do | |
| 1713 | so("157878578",ref1a,1,0.4)
| |
| 1714 | so("2101148",ref1a,1,0.6)
| |
| 1715 | end | |
| 1716 | for i=1,2 do | |
| 1717 | so("157878578",ref2a,1,0.4)
| |
| 1718 | so("2101148",ref2a,1,0.6)
| |
| 1719 | end | |
| 1720 | shockwave=true | |
| 1721 | refcam=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 1722 | refcam.Anchored=true | |
| 1723 | refcam.CFrame=cf(prt31.Position) | |
| 1724 | refcam.CFrame=refcam.CFrame:lerp(cf(prt45.Position),.5) | |
| 1725 | game:GetService("Debris"):AddItem(refcam,1)
| |
| 1726 | hitfl1,posfl1=rayCast(prt31.Position,(CFrame.new(prt31.Position,prt31.Position - Vector3.new(0,1,0))).lookVector,50,Character) | |
| 1727 | MagicRing(BrickColor.new("Pearl"),cf(posfl1)*euler(1.57,0,0),160,160,1,20,20,1,.1)
| |
| 1728 | ref1a.CFrame=cf(posfl1) | |
| 1729 | hitfl2,posfl2=rayCast(prt45.Position,(CFrame.new(prt45.Position,prt45.Position - Vector3.new(0,1,0))).lookVector,50,Character) | |
| 1730 | MagicRing(BrickColor.new("Pearl"),cf(posfl2)*euler(1.57,0,0),160,160,1,20,20,1,.1)
| |
| 1731 | ref2a.CFrame=cf(posfl2) | |
| 1732 | end | |
| 1733 | else | |
| 1734 | MagniDamage(prt31,90,50,70,math.random(40,60),"Knockdown2",RootPart,2,1,math.random(25,40),nil,nil,false) | |
| 1735 | MagniDamage(prt45,90,50,70,math.random(40,60),"Knockdown2",RootPart,2,1,math.random(25,40),nil,nil,false) | |
| 1736 | end | |
| 1737 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.4,0,0),dan) | |
| 1738 | wld19.C0=wld19.C0:lerp(euler(-.6,.3,0)*cf(94,-47.5,-2.248),dan) | |
| 1739 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,-1,-1.2),dan) | |
| 1740 | wld24.C0=wld24.C0:lerp(euler(1.2,-1,0)*cf(0,90.25,0),dan) | |
| 1741 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0)*euler(-.5,0,0)*euler(0,-.6,0)*euler(.3,0,0),dan) | |
| 1742 | ||
| 1743 | wld33.C0=wld33.C0:lerp(euler(-.6,-.3,0)*cf(-94,-47.5,-2.248),dan) | |
| 1744 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,1,1.2),dan) | |
| 1745 | wld38.C0=wld38.C0:lerp(euler(-1.2,-1,0)*cf(0,-90.25,0),dan) | |
| 1746 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0)*euler(.5,0,0)*euler(0,-.6,0)*euler(-.3,0,0),dan) | |
| 1747 | if Stun.Value>=StunT.Value then | |
| 1748 | break | |
| 1749 | end | |
| 1750 | end | |
| 1751 | meleecooldown=0 | |
| 1752 | mcdadd=.05 | |
| 1753 | if CurrentHealth<=1500 then | |
| 1754 | mcdadd=1 | |
| 1755 | end | |
| 1756 | --mcdadd=1 | |
| 1757 | end | |
| 1758 | attack=false | |
| 1759 | end | |
| 1760 | ||
| 1761 | function GrandPunch() | |
| 1762 | attack=true | |
| 1763 | local target,distance=findRandomTorso(RootPart.Position) | |
| 1764 | if target~=nil or target==nil then | |
| 1765 | local x,y,z = 0,0,0 | |
| 1766 | for i=0,1,0.01 do | |
| 1767 | swait() | |
| 1768 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.6,.5,0),.02) | |
| 1769 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-200,0)*euler(0,.5,0),.02) | |
| 1770 | wld19.C0=wld19.C0:lerp(euler(-.8,.3,0)*cf(94,-47.5,-2.248),.02) | |
| 1771 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,.3,-.4)*euler(0,-.2,0),.02) | |
| 1772 | wld24.C0=wld24.C0:lerp(euler(2,0,0)*euler(0,0,0)*cf(0,90.25,0),.02) | |
| 1773 | wld29.C0=wld29.C0:lerp(euler(0,.5,0)*cf(0,125,0),.02) | |
| 1774 | ||
| 1775 | wld33.C0=wld33.C0:lerp(euler(-.4,-.8,0)*cf(-94,-47.5,-2.248),.02) | |
| 1776 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,.2,.2)*euler(0,0,0),.02) | |
| 1777 | wld38.C0=wld38.C0:lerp(euler(-1,-.4,0)*cf(0,-90.25,0),.02) | |
| 1778 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.02) | |
| 1779 | if Stun.Value>=StunT.Value then | |
| 1780 | break | |
| 1781 | end | |
| 1782 | end | |
| 1783 | da=0 | |
| 1784 | local oldpos=prt31.Position | |
| 1785 | for i=0,1.5,0.01 do | |
| 1786 | swait() | |
| 1787 | da=da+1 | |
| 1788 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.6,-.5,0),.04) | |
| 1789 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-200,0)*euler(0,-.5,0),.04) | |
| 1790 | wld19.C0=wld19.C0:lerp(euler(-.8,.6,0)*cf(94,-47.5,-2.248),.04) | |
| 1791 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,-1.2,-.2)*euler(0,-.2,0),.04) | |
| 1792 | --wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,-1.2,-.8)*euler(0,-.2,0),.1) | |
| 1793 | wld24.C0=wld24.C0:lerp(euler(.8,0,0)*euler(0,0,0)*cf(0,90.25,0),.04) | |
| 1794 | wld29.C0=wld29.C0:lerp(euler(0,3,0)*cf(0,125,0),.04) | |
| 1795 | ||
| 1796 | wld33.C0=wld33.C0:lerp(euler(-.4,-.1,0)*cf(-94,-47.5,-2.248),.04) | |
| 1797 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,-.2,.2)*euler(0,0,0),.04) | |
| 1798 | wld38.C0=wld38.C0:lerp(euler(-1.8,-.4,0)*cf(0,-90.25,0),.04) | |
| 1799 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.04) | |
| 1800 | if i<.5 then | |
| 1801 | if da%4==0 then | |
| 1802 | MagniDamage(prt31,95,15,20,math.random(60,100),"Knockdown2",prt31,.5,1,math.random(25,40),nil,nil,false) | |
| 1803 | MagicWave(BrickColor.new("Cyan"),cf(prt31.Position,oldpos)*euler(-1.57,0,0),100,100,100,10,10,10,.1)
| |
| 1804 | oldpos=prt31.Position | |
| 1805 | end | |
| 1806 | end | |
| 1807 | if Stun.Value>=StunT.Value then | |
| 1808 | break | |
| 1809 | end | |
| 1810 | end | |
| 1811 | meleecooldown=0 | |
| 1812 | mcdadd=.1 | |
| 1813 | if CurrentHealth<=1500 then | |
| 1814 | mcdadd=1 | |
| 1815 | end | |
| 1816 | --mcdadd=50 | |
| 1817 | end | |
| 1818 | attack=false | |
| 1819 | end | |
| 1820 | ||
| 1821 | --[[ punch | |
| 1822 | wld19.C0=wld19.C0:lerp(euler(-.4,-.3,0)*cf(94,-47.5,-2.248),.1) | |
| 1823 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(-.8,0,0)*euler(0,-.2,0),.1) | |
| 1824 | wld24.C0=wld24.C0:lerp(euler(1.2,.8,0)*cf(0,90.25,0),.1) | |
| 1825 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.1) | |
| 1826 | ]] | |
| 1827 | ||
| 1828 | function FrostSlam() | |
| 1829 | attack=true | |
| 1830 | local target,distance=findRandomTorso(RootPart.Position) | |
| 1831 | if target~=nil or target==nil then | |
| 1832 | local x,y,z = 0,0,0 | |
| 1833 | for i=0,1,0.008 do | |
| 1834 | swait() | |
| 1835 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.6,0,0)*euler(0,.3,-.2),.015) | |
| 1836 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-200,0)*euler(0,.3,0),.015) | |
| 1837 | wld19.C0=wld19.C0:lerp(euler(-.4,-.3,0)*cf(94,-47.5,-2.248),.015) | |
| 1838 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(-1,0,0)*euler(0,-.4,0)*euler(0,0,-.4),.015) | |
| 1839 | wld24.C0=wld24.C0:lerp(euler(.8,.8,0)*euler(0,-.2,0)*cf(0,90.25,0),.015) | |
| 1840 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.015) | |
| 1841 | ||
| 1842 | wld33.C0=wld33.C0:lerp(euler(.4,-.3,0)*cf(-94,-47.5,-2.248),.015) | |
| 1843 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,0,1)*euler(.5,0,0)*euler(0,.2,0),.015) | |
| 1844 | wld38.C0=wld38.C0:lerp(euler(-1,-.2,0)*cf(0,-90.25,0),.015) | |
| 1845 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.015) | |
| 1846 | if Stun.Value>=StunT.Value then | |
| 1847 | break | |
| 1848 | end | |
| 1849 | end | |
| 1850 | da=0 | |
| 1851 | local oldpos=prt45.Position | |
| 1852 | shockwave=false | |
| 1853 | ref2a=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 1854 | ref2a.Anchored=true | |
| 1855 | ref2a.CFrame=cf(0,-50,0) | |
| 1856 | game:GetService("Debris"):AddItem(ref2a,3)
| |
| 1857 | incda=80 | |
| 1858 | for i=0,10,0.02 do | |
| 1859 | swait() | |
| 1860 | da=da+1 | |
| 1861 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.6,0,0)*euler(0,.3,-.2),.025) | |
| 1862 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-190,0)*euler(0,.3,0)*euler(-.1,0,0),.025) | |
| 1863 | wld19.C0=wld19.C0:lerp(euler(-.4,-.3,0)*cf(94,-47.5,-2.248),.025) | |
| 1864 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(-1,0,0)*euler(0,-.4,0)*euler(0,0,0),.025) | |
| 1865 | wld24.C0=wld24.C0:lerp(euler(1,0,0)*euler(0,.3,0)*cf(0,90.25,0),.025) | |
| 1866 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.025) | |
| 1867 | ||
| 1868 | wld33.C0=wld33.C0:lerp(euler(-.2,-.3,0)*cf(-94,-47.5,-2.248),.025) | |
| 1869 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,0,.6)*euler(0,1.4,0)*euler(0,0,0),.025) | |
| 1870 | wld38.C0=wld38.C0:lerp(euler(-.5,0,0)*euler(0,0,-.2)*cf(0,-90.25,0),.025) | |
| 1871 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.025) | |
| 1872 | if i>1 and i<8 then | |
| 1873 | if da%10==0 then | |
| 1874 | local do1=0 | |
| 1875 | local do2=0 | |
| 1876 | local rand1=math.random(1,2) | |
| 1877 | if rand1==1 then do1=math.random(5000,15000)/100 | |
| 1878 | elseif rand1==2 then do1=math.random(-15000,-5000)/100 end | |
| 1879 | local rand2=math.random(1,2) | |
| 1880 | if rand2==1 then do2=math.random(5000,15000)/100 | |
| 1881 | elseif rand2==2 then do2=math.random(-15000,-5000)/100 end | |
| 1882 | cfda=ref2a.Position+vt(do1,10,do2) | |
| 1883 | local hit2,pos2=rayCast(cfda,(CFrame.new(cfda,cfda - Vector3.new(0,1,0))).lookVector,999,Character) | |
| 1884 | local d1=part(3,effects,0,.5,BrickColor.new("Cyan"),"Effect",vt())
| |
| 1885 | d1.Anchored=true | |
| 1886 | d1.CFrame=cf(pos2) | |
| 1887 | msh=mesh("CylinderMesh",d1,"nil","nil",vt(0,0,0),vt(300,5,300))
| |
| 1888 | d2=d1:Clone() | |
| 1889 | d2.Parent=d1 | |
| 1890 | d2.CFrame=cf(d1.Position) | |
| 1891 | d2.BrickColor=BrickColor.new("White")
| |
| 1892 | d2.Mesh.Scale=vt(0,5,0) | |
| 1893 | table.insert(Effects,{d1,"SatelliteStrike2",d2,d2.Mesh,0})
| |
| 1894 | end | |
| 1895 | end | |
| 1896 | if i>1 and i<1.3 then | |
| 1897 | incda=incda+10 | |
| 1898 | MagniDamage(ref2a,incda,6,8,math.random(0,0),"Knockdown2",RootPart,1.5,1,math.random(8,10),nil,nil,false,"Movement",.1,300) | |
| 1899 | end | |
| 1900 | if i<1 then | |
| 1901 | if da%4==0 then | |
| 1902 | MagniDamage(prt45,95,15,20,math.random(40,60),"Knockdown2",prt45,.5,1,math.random(25,40),nil,nil,false) | |
| 1903 | MagicWave(BrickColor.new("Cyan"),cf(prt45.Position,oldpos)*euler(-1.57,0,0),100,100,100,10,10,10,.1)
| |
| 1904 | oldpos=prt45.Position | |
| 1905 | end | |
| 1906 | else | |
| 1907 | if shockwave==false then | |
| 1908 | shockwave=true | |
| 1909 | so("157878578",ref2a,1,0.4)
| |
| 1910 | so("2101148",ref2a,1,0.6)
| |
| 1911 | hitfl2,posfl2=rayCast(prt45.Position,(CFrame.new(prt45.Position,prt45.Position - Vector3.new(0,1,0))).lookVector,50,Character) | |
| 1912 | refaa=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 1913 | refaa.Anchored=true | |
| 1914 | refaa.CFrame=cf(posfl2) | |
| 1915 | game:GetService("Debris"):AddItem(refaa,1)
| |
| 1916 | MagicRing(BrickColor.new("Pearl"),cf(posfl2)*euler(1.57,0,0),160,160,1,20,20,1,.1)
| |
| 1917 | ref2a.CFrame=cf(posfl2) | |
| 1918 | end | |
| 1919 | end | |
| 1920 | if Stun.Value>=StunT.Value then | |
| 1921 | break | |
| 1922 | end | |
| 1923 | end | |
| 1924 | --print(incda) | |
| 1925 | meleecooldown=0 | |
| 1926 | mcdadd=.08 | |
| 1927 | if CurrentHealth<=1500 then | |
| 1928 | mcdadd=1 | |
| 1929 | end | |
| 1930 | end | |
| 1931 | attack=false | |
| 1932 | end | |
| 1933 | ||
| 1934 | function StunAnim() | |
| 1935 | attack=true | |
| 1936 | for i=0,1,0.06 do | |
| 1937 | swait() | |
| 1938 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.7,0,0),.06) | |
| 1939 | RootJoint.C0=RootJoint.C0:lerp(euler(-.2,0,0)*cf(-1.749,-180,0),.06) | |
| 1940 | wld19.C0=wld19.C0:lerp(euler(-.8,.3,0)*cf(94,-47.5,-2.248),.06) | |
| 1941 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,0,.6)*euler(0,-.2,0)*euler(-.5,0,0),.06) | |
| 1942 | wld24.C0=wld24.C0:lerp(euler(1,.1,0)*cf(0,90.25,0),.06) | |
| 1943 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.06) | |
| 1944 | ||
| 1945 | wld33.C0=wld33.C0:lerp(euler(-.8,-.3,0)*cf(-94,-47.5,-2.248),.06) | |
| 1946 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,0,-.6)*euler(0,.2,0)*euler(-.5,0,0),.06) | |
| 1947 | wld38.C0=wld38.C0:lerp(euler(-1,.1,0)*cf(0,-90.25,0),.06) | |
| 1948 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.06) | |
| 1949 | if Humanoid.Health<=0 then | |
| 1950 | break | |
| 1951 | end | |
| 1952 | end | |
| 1953 | for i=0,1,0.04 do | |
| 1954 | swait() | |
| 1955 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.2,0,0)*euler(0,0,.2),.07) | |
| 1956 | RootJoint.C0=RootJoint.C0:lerp(euler(-.5,.2,0)*cf(-1.749,-140,0),.07) | |
| 1957 | wld19.C0=wld19.C0:lerp(euler(-.8,.3,0)*cf(94,-47.5,-2.248),.07) | |
| 1958 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,0,.8)*euler(0,.2,0)*euler(-.4,0,0),.07) | |
| 1959 | wld24.C0=wld24.C0:lerp(euler(1.2,.3,0)*cf(0,90.25,0),.07) | |
| 1960 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.07) | |
| 1961 | ||
| 1962 | wld33.C0=wld33.C0:lerp(euler(-.8,-.3,0)*cf(-94,-47.5,-2.248),.07) | |
| 1963 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,0,.6)*euler(0,.2,0)*euler(.7,0,0),.07) | |
| 1964 | wld38.C0=wld38.C0:lerp(euler(-1.4,.1,0)*cf(0,-90.25,0),.07) | |
| 1965 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.07) | |
| 1966 | if Humanoid.Health<=0 then | |
| 1967 | break | |
| 1968 | end | |
| 1969 | end | |
| 1970 | for i=0,1,0.01 do | |
| 1971 | swait() | |
| 1972 | msh3.Scale=vt(4,8.5-8*i,8.5) | |
| 1973 | msh5.Scale=vt(4,8.5-8*i,8.5) | |
| 1974 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.6,0,0)*euler(0,1.5,0),.02) | |
| 1975 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-100,0)*euler(-1.3,0,0),.05) | |
| 1976 | wld19.C0=wld19.C0:lerp(euler(-.8,.3,0)*cf(94,-47.5,-2.248),.05) | |
| 1977 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,0,1)*euler(0,.2,0)*euler(-.1,0,0),.05) | |
| 1978 | wld24.C0=wld24.C0:lerp(euler(.5,2.2,0)*cf(0,90.25,0),.05) | |
| 1979 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.05) | |
| 1980 | ||
| 1981 | wld33.C0=wld33.C0:lerp(euler(-.8,-.3,0)*cf(-94,-47.5,-2.248),.05) | |
| 1982 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,0,.6)*euler(0,-.6,0)*euler(1.6,0,0),.05) | |
| 1983 | wld38.C0=wld38.C0:lerp(euler(-1.6,.1,0)*cf(0,-90.25,0),.05) | |
| 1984 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.05) | |
| 1985 | if Humanoid.Health<=0 then | |
| 1986 | break | |
| 1987 | end | |
| 1988 | end | |
| 1989 | msh3.Scale=vt(4,.5,8.5) | |
| 1990 | msh5.Scale=vt(4,.5,8.5) | |
| 1991 | --swait(100) | |
| 1992 | local numb=1300 | |
| 1993 | if CurrentHealth<=1500 then | |
| 1994 | numb=1000 | |
| 1995 | end | |
| 1996 | local removedeb=8 | |
| 1997 | for i=0,numb do | |
| 1998 | swait() | |
| 1999 | removedeb=removedeb+1 | |
| 2000 | if removedeb>8 then | |
| 2001 | removedeb=0 | |
| 2002 | for _,c in pairs(Character:children()) do | |
| 2003 | if c.Name=="DebounceHit" then c.Parent=nil end | |
| 2004 | end | |
| 2005 | end | |
| 2006 | if Humanoid.Health<=0 then | |
| 2007 | break | |
| 2008 | end | |
| 2009 | end | |
| 2010 | for i=0,1,0.1 do | |
| 2011 | swait() | |
| 2012 | msh3.Scale=vt(4,.5+8*i,8.5) | |
| 2013 | msh5.Scale=vt(4,.5+8*i,8.5) | |
| 2014 | end | |
| 2015 | msh3.Scale=vt(4,8.5,8.5) | |
| 2016 | msh5.Scale=vt(4,8.5,8.5) | |
| 2017 | for i=0,1,0.02 do | |
| 2018 | swait() | |
| 2019 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-100,0)*euler(-1.3,0,0),.05) | |
| 2020 | wld19.C0=wld19.C0:lerp(euler(-.8,.3,0)*cf(94,-47.5,-2.248),.05) | |
| 2021 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,0,.1)*euler(0,.4,0)*euler(1,0,0),.05) | |
| 2022 | wld24.C0=wld24.C0:lerp(euler(1.6,.1,0)*cf(0,90.25,0),.05) | |
| 2023 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.05) | |
| 2024 | ||
| 2025 | wld33.C0=wld33.C0:lerp(euler(-.8,-.3,0)*cf(-94,-47.5,-2.248),.05) | |
| 2026 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,0,-.1)*euler(0,-.4,0)*euler(1,0,0),.05) | |
| 2027 | wld38.C0=wld38.C0:lerp(euler(-1.6,.1,0)*cf(0,-90.25,0),.05) | |
| 2028 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.05) | |
| 2029 | if Humanoid.Health<=0 then | |
| 2030 | break | |
| 2031 | end | |
| 2032 | end | |
| 2033 | for i=0,1,0.03 do | |
| 2034 | swait() | |
| 2035 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-180,0)*euler(-.6,0,0),.06) | |
| 2036 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.6,0,0),.06) | |
| 2037 | wld19.C0=wld19.C0:lerp(euler(.2,.3,0)*cf(94,-47.5,-2.248),.06) | |
| 2038 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,0,-.4)*euler(0,-.2,0)*euler(-.3,0,0),.06) | |
| 2039 | wld24.C0=wld24.C0:lerp(euler(1.2,.1,0)*cf(0,90.25,0),.06) | |
| 2040 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.06) | |
| 2041 | ||
| 2042 | wld33.C0=wld33.C0:lerp(euler(.2,-.3,0)*cf(-94,-47.5,-2.248),.06) | |
| 2043 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,0,.4)*euler(0,.2,0)*euler(-.3,0,0),.06) | |
| 2044 | wld38.C0=wld38.C0:lerp(euler(-1.2,.1,0)*cf(0,-90.25,0),.06) | |
| 2045 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.06) | |
| 2046 | if Humanoid.Health<=0 then | |
| 2047 | break | |
| 2048 | end | |
| 2049 | end | |
| 2050 | for i=0,1,0.008 do | |
| 2051 | swait() | |
| 2052 | if i<.4 then | |
| 2053 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(-.1,0,0),.06) | |
| 2054 | else | |
| 2055 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.6,0,0),.06) | |
| 2056 | end | |
| 2057 | RootJoint.C0=RootJoint.C0:lerp(cf(5,-210,0)*euler(.1,0,0),.06) | |
| 2058 | wld19.C0=wld19.C0:lerp(euler(.2,.3,0)*cf(94,-47.5,-2.248),.06) | |
| 2059 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,0,-.8)*euler(0,-.6,0)*euler(-.5,0,0),.06) | |
| 2060 | wld24.C0=wld24.C0:lerp(euler(.6,.3,0)*cf(0,90.25,0),.06) | |
| 2061 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.06) | |
| 2062 | ||
| 2063 | wld33.C0=wld33.C0:lerp(euler(.2,-.3,0)*cf(-94,-47.5,-2.248),.06) | |
| 2064 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,0,.8)*euler(0,.6,0)*euler(-.5,0,0),.06) | |
| 2065 | wld38.C0=wld38.C0:lerp(euler(-.6,.3,0)*cf(0,-90.25,0),.06) | |
| 2066 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.06) | |
| 2067 | if Humanoid.Health<=0 then | |
| 2068 | break | |
| 2069 | end | |
| 2070 | end | |
| 2071 | attack=false | |
| 2072 | end | |
| 2073 | ||
| 2074 | function SummonCrystals() | |
| 2075 | attack=true | |
| 2076 | for i=0,1,0.01 do | |
| 2077 | swait() | |
| 2078 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.5,0,0),.03) | |
| 2079 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-210,0)*euler(.05,0,0),.03) | |
| 2080 | --[[wld19.C0=wld19.C0:lerp(euler(-.4,.3,0)*cf(94,-47.5,-2.248),.1) | |
| 2081 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,-.1,-.6)*euler(0,-.4,0),.1) | |
| 2082 | wld24.C0=wld24.C0:lerp(euler(.8,.1,0)*cf(0,90.25,0),.1) | |
| 2083 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.1) | |
| 2084 | ||
| 2085 | wld33.C0=wld33.C0:lerp(euler(-.4,-.3,0)*cf(-94,-47.5,-2.248),.1) | |
| 2086 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,.1,.6)*euler(0,.4,0),.1) | |
| 2087 | wld38.C0=wld38.C0:lerp(euler(-.8,.1,0)*cf(0,-90.25,0),.1) | |
| 2088 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.1)]] | |
| 2089 | wld19.C0=wld19.C0:lerp(euler(-.4,.3,0)*cf(94,-47.5,-2.248),.03) | |
| 2090 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,-.2,-.8)*euler(.2,0,0),.03) | |
| 2091 | wld24.C0=wld24.C0:lerp(euler(1.8,-.2,0)*cf(0,90.25,0),.03) | |
| 2092 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.03) | |
| 2093 | ||
| 2094 | wld33.C0=wld33.C0:lerp(euler(-.4,-.3,0)*cf(-94,-47.5,-2.248),.03) | |
| 2095 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,.2,.8)*euler(.2,0,0),.03) | |
| 2096 | wld38.C0=wld38.C0:lerp(euler(-1.8,-.2,0)*cf(0,-90.25,0),.03) | |
| 2097 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.03) | |
| 2098 | end | |
| 2099 | for i=0,1,0.04 do | |
| 2100 | swait() | |
| 2101 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.6,0,0),.05) | |
| 2102 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-200,0)*euler(-.05,0,0),.05) | |
| 2103 | wld19.C0=wld19.C0:lerp(euler(-.8,.3,0)*cf(94,-47.5,-2.248),.05) | |
| 2104 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,-.2,-.8)*euler(.2,0,0)*euler(0,-.2,0),.05) | |
| 2105 | wld24.C0=wld24.C0:lerp(euler(1.4,-.2,0)*cf(0,90.25,0),.05) | |
| 2106 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.05) | |
| 2107 | ||
| 2108 | wld33.C0=wld33.C0:lerp(euler(-.8,-.3,0)*cf(-94,-47.5,-2.248),.05) | |
| 2109 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,.2,.8)*euler(.2,0,0)*euler(0,.2,0),.05) | |
| 2110 | wld38.C0=wld38.C0:lerp(euler(-1.4,-.2,0)*cf(0,-90.25,0),.05) | |
| 2111 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.05) | |
| 2112 | end | |
| 2113 | Cryst1.Parent=workspace | |
| 2114 | C1Head.CFrame=RootPart.CFrame*cf(math.random(-2000,2000)/100,0,math.random(-2000,2000)/100) | |
| 2115 | C1Torso.CFrame=C1Head.CFrame | |
| 2116 | C1Neck.Parent=C1Head | |
| 2117 | C1S.Parent=Cryst1 | |
| 2118 | C1Hum.Parent=Cryst1 | |
| 2119 | C1Hum.MaxHealth=200 | |
| 2120 | C1Hum.Health=200 | |
| 2121 | C1Hum.Parent=Cryst1 | |
| 2122 | C1Hum:TakeDamage(1) | |
| 2123 | C1a=true | |
| 2124 | for _,c in pairs(Cryst1:children()) do | |
| 2125 | if c.Name=="DebounceHit" then c.Parent=nil end | |
| 2126 | end | |
| 2127 | Cryst2.Parent=workspace | |
| 2128 | C2Head.CFrame=RootPart.CFrame*cf(math.random(-2000,2000)/100,0,math.random(-2000,2000)/100) | |
| 2129 | C2Torso.CFrame=C2Head.CFrame | |
| 2130 | C2Neck.Parent=C2Head | |
| 2131 | C2S.Parent=Cryst2 | |
| 2132 | C2Hum.Parent=Cryst2 | |
| 2133 | C2Hum.MaxHealth=200 | |
| 2134 | C2Hum.Health=200 | |
| 2135 | C2Hum.Parent=Cryst2 | |
| 2136 | C2Hum:TakeDamage(1) | |
| 2137 | C2a=true | |
| 2138 | for _,c in pairs(Cryst2:children()) do | |
| 2139 | if c.Name=="DebounceHit" then c.Parent=nil end | |
| 2140 | end | |
| 2141 | Cryst3.Parent=workspace | |
| 2142 | C3Head.CFrame=RootPart.CFrame*cf(math.random(-2000,2000)/100,0,math.random(-2000,2000)/100) | |
| 2143 | C3Torso.CFrame=C3Head.CFrame | |
| 2144 | C3Neck.Parent=C3Head | |
| 2145 | C3S.Parent=Cryst3 | |
| 2146 | C3Hum.Parent=Cryst3 | |
| 2147 | C3Hum.MaxHealth=200 | |
| 2148 | C3Hum.Health=200 | |
| 2149 | C3Hum.Parent=Cryst3 | |
| 2150 | C3Hum:TakeDamage(1) | |
| 2151 | C3a=true | |
| 2152 | for _,c in pairs(Cryst3:children()) do | |
| 2153 | if c.Name=="DebounceHit" then c.Parent=nil end | |
| 2154 | end | |
| 2155 | Cryst4.Parent=workspace | |
| 2156 | C4Head.CFrame=RootPart.CFrame*cf(math.random(-2000,2000)/100,0,math.random(-2000,2000)/100) | |
| 2157 | C4Torso.CFrame=C4Head.CFrame | |
| 2158 | C4Neck.Parent=C4Head | |
| 2159 | C4S.Parent=Cryst4 | |
| 2160 | C4Hum.Parent=Cryst4 | |
| 2161 | C4Hum.MaxHealth=200 | |
| 2162 | C4Hum.Health=200 | |
| 2163 | C4Hum.Parent=Cryst4 | |
| 2164 | C4Hum:TakeDamage(1) | |
| 2165 | C4a=true | |
| 2166 | for _,c in pairs(Cryst4:children()) do | |
| 2167 | if c.Name=="DebounceHit" then c.Parent=nil end | |
| 2168 | end | |
| 2169 | MagicCircle(BrickColor.new("Cyan"),cf(C1Head.Position),150,400,150,5,10,5,.05)
| |
| 2170 | MagicCircle(BrickColor.new("Cyan"),cf(C2Head.Position),150,400,150,5,10,5,.05)
| |
| 2171 | MagicCircle(BrickColor.new("Cyan"),cf(C3Head.Position),150,400,150,5,10,5,.05)
| |
| 2172 | MagicCircle(BrickColor.new("Cyan"),cf(C4Head.Position),150,400,150,5,10,5,.05)
| |
| 2173 | crystals=true | |
| 2174 | if CurrentHealth>1500 then | |
| 2175 | else | |
| 2176 | end | |
| 2177 | swait(50) | |
| 2178 | attack=false | |
| 2179 | end | |
| 2180 | ||
| 2181 | function HeavySlam() | |
| 2182 | attack=true | |
| 2183 | for i=0,1,0.05 do | |
| 2184 | swait() | |
| 2185 | wld1.C0=clerp(wld1.C0,euler(1.57,0,0)*cf(0,3,0),.1) | |
| 2186 | wld2.C0=clerp(wld2.C0,euler(0,0,0)*cf(0,1,0),.1) | |
| 2187 | Neck.C0=clerp(Neck.C0,necko*euler(0,1,0)*euler(-.3,0,0),.1) | |
| 2188 | RootJoint.C0=clerp(RootJoint.C0,cf(0,-2,0)*euler(0,1,0),.1) | |
| 2189 | RW.C0=clerp(RW.C0,cf(4.5,1.5,0)*euler(2,0,.3),.1) | |
| 2190 | RW.C1=clerp(LW.C1,cf(0,1.5,0)*euler(0,0,0),.1) | |
| 2191 | LW.C0=clerp(LW.C0,cf(-4.5,1.5,0)*euler(-.2,0,-.6),.1) | |
| 2192 | LW.C1=clerp(LW.C1,cf(0,1.5,0)*euler(0,0,0),.1) | |
| 2193 | LH.C0=clerp(LH.C0,cf(-1.5,-3,0)*euler(0,1,0)*euler(.1,0,0),.1) | |
| 2194 | RH.C0=clerp(RH.C0,cf(1.5,-3,0)*euler(0,-1,0)*euler(.1,0,0),.1) | |
| 2195 | end | |
| 2196 | for i=0,1,0.04 do | |
| 2197 | swait() | |
| 2198 | wld1.C0=clerp(wld1.C0,euler(1,0,0)*cf(0,3,0),.1) | |
| 2199 | wld2.C0=clerp(wld2.C0,euler(0,0,0)*cf(0,1,0),.1) | |
| 2200 | Neck.C0=clerp(Neck.C0,necko*euler(0,-.2,0)*euler(-.4,0,0),.1) | |
| 2201 | RootJoint.C0=clerp(RootJoint.C0,cf(0,-2,0)*euler(0,-.2,0),.1) | |
| 2202 | RW.C0=clerp(RW.C0,cf(4.5,1.5,0)*euler(3.5,0,0)*euler(0,.2,0),.1) | |
| 2203 | RW.C1=clerp(LW.C1,cf(0,1.5,0)*euler(0,0,0),.1) | |
| 2204 | LW.C0=clerp(LW.C0,cf(-4.5,1.5,0)*euler(-.4,0,-.6),.1) | |
| 2205 | LW.C1=clerp(LW.C1,cf(0,1.5,0)*euler(0,0,0),.1) | |
| 2206 | LH.C0=clerp(LH.C0,cf(-1.5,-3,0)*euler(0,0,0)*euler(-.3,0,0),.1) | |
| 2207 | RH.C0=clerp(RH.C0,cf(1.5,-3,-1)*euler(0,0,0)*euler(-.1,0,0),.1) | |
| 2208 | end | |
| 2209 | so("161006212",prt9,1,.6)
| |
| 2210 | con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,10,15,math.random(50,70),"Knockdown2",RootPart,2,1,math.random(20,40),nil,true) end) | |
| 2211 | hitbox.Parent=modelzorz | |
| 2212 | hitbox.Size=vt(2,20,8) | |
| 2213 | hitboxCF=prt9.CFrame*cf(0,0,0) | |
| 2214 | hitbox.CFrame=hitboxCF | |
| 2215 | blcf=nil | |
| 2216 | scfr=nil | |
| 2217 | for i=0,1,0.02 do | |
| 2218 | swait() | |
| 2219 | --[[local blcf = prt9.CFrame*cf(0,0,0) | |
| 2220 | if scfr and (prt9.Position-scfr.p).magnitude > .1 then | |
| 2221 | local h = 14 | |
| 2222 | 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) | |
| 2223 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
| 2224 | 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) | |
| 2225 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
| 2226 | scfr = blcf | |
| 2227 | elseif not scfr then | |
| 2228 | scfr = blcf | |
| 2229 | end]] | |
| 2230 | hitboxCF=prt9.CFrame*cf(0,0,0) | |
| 2231 | hitbox.CFrame=hitboxCF | |
| 2232 | wld1.C0=clerp(wld1.C0,euler(2.5,0,0)*cf(0,3,0),.4) | |
| 2233 | wld2.C0=clerp(wld2.C0,euler(0,0,0)*cf(0,1,0),.4) | |
| 2234 | Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(-.6,0,0),.2) | |
| 2235 | RootJoint.C0=clerp(RootJoint.C0,cf(0,0,0)*euler(0,0,0),.2) | |
| 2236 | RW.C0=clerp(RW.C0,cf(2.5,1.5,-1)*euler(.5,0,-.2)*euler(0,0,0),.4) | |
| 2237 | RW.C1=clerp(LW.C1,cf(0,1.5,0)*euler(0,0,0),.2) | |
| 2238 | LW.C0=clerp(LW.C0,cf(-4.5,1.5,0)*euler(-.8,0,-.6),.2) | |
| 2239 | LW.C1=clerp(LW.C1,cf(0,1.5,0)*euler(0,0,0),.2) | |
| 2240 | LH.C0=clerp(LH.C0,cf(-1.5,-3,0)*euler(0,0,0)*euler(-1,0,0),.2) | |
| 2241 | RH.C0=clerp(RH.C0,cf(1.5,-1,-1.5)*euler(0,0,0)*euler(-.1,0,0),.2) | |
| 2242 | if i>=.16 and i<=.17 then | |
| 2243 | hit,pos=rayCast(prt9.Position,(CFrame.new(prt9.Position,prt9.Position - Vector3.new(0,1,0))).lookVector,10,Character) | |
| 2244 | if hit~=nil then | |
| 2245 | ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 2246 | ref.Anchored=true | |
| 2247 | ref.CFrame=cf(pos) | |
| 2248 | so("199145477",prt9,1,.8)
| |
| 2249 | game:GetService("Debris"):AddItem(ref,1)
| |
| 2250 | --MagniDamage(ref,30,1,5,math.random(50,70),"Knockdown2",false,"Movement",.2,400,math.random(90,100)) | |
| 2251 | MagniDamage(ref,30,1,5,math.random(200,400),"Knockdown2",false,"Movement",.2,200,math.random(90,100)) | |
| 2252 | MagicWave(BrickColor.new("Bright stone grey"),cf(ref.Position),1,1,1,2,2,2,.05)
| |
| 2253 | end | |
| 2254 | end | |
| 2255 | end | |
| 2256 | con1:disconnect() | |
| 2257 | hitbox.Parent=nil | |
| 2258 | attack=false | |
| 2259 | end | |
| 2260 | ||
| 2261 | local magref=part(3,effects,0,.5,BrickColor.new("Black"),"Effect",vt())
| |
| 2262 | magref.Anchored=true | |
| 2263 | magref.CFrame=cf(0,0,0) | |
| 2264 | magref.Parent=nil | |
| 2265 | local mrmsh=mesh("SpecialMesh",magref,"Sphere","nil",vt(0,0,0),vt(1,1,1))
| |
| 2266 | ||
| 2267 | function MagniDamage(Part,magni,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration) | |
| 2268 | --magref.CFrame=cf(Part.Position) | |
| 2269 | --mrmsh.Scale=vt(magni*10,magni*10,magni*10) | |
| 2270 | for _,c in pairs(workspace:children()) do | |
| 2271 | local hum=c:findFirstChild("Humanoid")
| |
| 2272 | if hum~=nil then | |
| 2273 | local head=nil | |
| 2274 | for _,d in pairs(c:children()) do | |
| 2275 | --if d.Name=="Torso" or d.Name=="Head" or d.Name=="HumanoidRootPart" or d.Name=="HitPart" then | |
| 2276 | if d.className=="Part" then | |
| 2277 | head=d | |
| 2278 | if head~=nil then | |
| 2279 | local targ=head.Position-Part.Position | |
| 2280 | local mag=targ.magnitude | |
| 2281 | if mag<=magni and c.Name~=Character.Name and c.Name~="Crystal" then | |
| 2282 | if stun==nil then | |
| 2283 | stun=math.random(5,10) | |
| 2284 | end | |
| 2285 | local Rang=nil | |
| 2286 | if Ranged==false then | |
| 2287 | Rang=true | |
| 2288 | end | |
| 2289 | local stag=nil | |
| 2290 | if shbash==true then | |
| 2291 | stag=true | |
| 2292 | end | |
| 2293 | Damagefunc(head,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration) | |
| 2294 | --Damagefunc(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,DecreaseState,DecreaseAmount,Duration) | |
| 2295 | end | |
| 2296 | end | |
| 2297 | end | |
| 2298 | end | |
| 2299 | end | |
| 2300 | end | |
| 2301 | end | |
| 2302 | ||
| 2303 | function DecreaseStat(Model,Stat,Amount,Duration) | |
| 2304 | if Model:findFirstChild("Stats")~=nil then
| |
| 2305 | if Model.Stats[Stat]~=nil then | |
| 2306 | Model.Stats[Stat].Value=Model.Stats[Stat].Value-Amount | |
| 2307 | d=Instance.new("NumberValue",Model.Stats.Decrease)
| |
| 2308 | dur=Instance.new("NumberValue",d)
| |
| 2309 | dur.Name="Duration" | |
| 2310 | dur.Value=Duration | |
| 2311 | game:GetService("Debris"):AddItem(d,40)
| |
| 2312 | if Stat=="Damage" then | |
| 2313 | d.Name="DecreaseAtk" | |
| 2314 | elseif Stat=="Defense" then | |
| 2315 | d.Name="DecreaseDef" | |
| 2316 | elseif Stat=="Movement" then | |
| 2317 | d.Name="DecreaseMvmt" | |
| 2318 | end | |
| 2319 | if Model:findFirstChild("Torso")~=nil then
| |
| 2320 | display="" | |
| 2321 | if Stat=="Damage" then | |
| 2322 | if Amount>0 then | |
| 2323 | display="-Damage" | |
| 2324 | else | |
| 2325 | display="+Damage" | |
| 2326 | end | |
| 2327 | elseif Stat=="Defense" then | |
| 2328 | if Amount>0 then | |
| 2329 | display="-Defense" | |
| 2330 | else | |
| 2331 | display="+Defense" | |
| 2332 | end | |
| 2333 | elseif Stat=="Movement" then | |
| 2334 | if Amount>0 then | |
| 2335 | display="-Movement" | |
| 2336 | else | |
| 2337 | display="+Movement" | |
| 2338 | end | |
| 2339 | end | |
| 2340 | showDamage(Model,display,"Debuff") | |
| 2341 | end | |
| 2342 | d.Value=Amount | |
| 2343 | table.insert(Effects,{Model,"DecreaseStat",Stat,Amount,Duration,d})
| |
| 2344 | end | |
| 2345 | end | |
| 2346 | end | |
| 2347 | ||
| 2348 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
| 2349 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
| |
| 2350 | end | |
| 2351 | ||
| 2352 | function findNearestTorso(pos) | |
| 2353 | local list = game.Workspace:children() | |
| 2354 | local torso = nil | |
| 2355 | local dist = 10000 | |
| 2356 | local temp = nil | |
| 2357 | local human = nil | |
| 2358 | local temp2 = nil | |
| 2359 | for x = 1, #list do | |
| 2360 | temp2 = list[x] | |
| 2361 | if (temp2.className == "Model") and (temp2.Name~=Character.Name) and (temp2.Name~="Crystal") then | |
| 2362 | temp = temp2:findFirstChild("Torso")
| |
| 2363 | human = temp2:findFirstChild("Humanoid")
| |
| 2364 | if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then | |
| 2365 | if (temp.Position - pos).magnitude < dist then | |
| 2366 | local dohit=true | |
| 2367 | if temp2:findFirstChild("Stats")~=nil then if temp2.Stats:findFirstChild("Boss")~=nil then if temp2.Stats.Boss.Value==true then dohit=false end end end
| |
| 2368 | if temp2:findFirstChild("Alive")==nil then dohit=false end
| |
| 2369 | if dohit==true then | |
| 2370 | torso = temp | |
| 2371 | dist = (temp.Position - pos).magnitude | |
| 2372 | end | |
| 2373 | end | |
| 2374 | end | |
| 2375 | end | |
| 2376 | end | |
| 2377 | return torso,dist | |
| 2378 | end | |
| 2379 | ||
| 2380 | function findRandomTorso(pos) | |
| 2381 | local list = game.Workspace:children() | |
| 2382 | local torso = nil | |
| 2383 | local dist = 10000 | |
| 2384 | local temp = nil | |
| 2385 | local human = nil | |
| 2386 | local temp2 = nil | |
| 2387 | local list2 = {}
| |
| 2388 | for x = 1, #list do | |
| 2389 | temp2 = list[x] | |
| 2390 | if (temp2.className == "Model") and (temp2.Name~=Character.Name) and (temp2.Name~="Crystal") then | |
| 2391 | temp = temp2:findFirstChild("Torso")
| |
| 2392 | human = temp2:findFirstChild("Humanoid")
| |
| 2393 | if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then | |
| 2394 | if pos.magnitude < dist then | |
| 2395 | local dohit=true | |
| 2396 | if temp2:findFirstChild("Stats")~=nil then if temp2.Stats:findFirstChild("Boss")~=nil then if temp2.Stats.Boss.Value==true then dohit=false end end end
| |
| 2397 | if temp2:findFirstChild("Alive")==nil then dohit=false end
| |
| 2398 | if dohit==true then | |
| 2399 | torso = temp | |
| 2400 | table.insert(list2,temp) | |
| 2401 | end | |
| 2402 | end | |
| 2403 | end | |
| 2404 | end | |
| 2405 | end | |
| 2406 | if #list2>0 then | |
| 2407 | rand=math.random(1,#list2) | |
| 2408 | return list2[rand],dist | |
| 2409 | else | |
| 2410 | return nil,dist | |
| 2411 | end | |
| 2412 | end | |
| 2413 | ||
| 2414 | Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration,Sound) | |
| 2415 | if hit.Parent==nil then | |
| 2416 | return | |
| 2417 | end | |
| 2418 | h=hit.Parent:FindFirstChild("Humanoid")
| |
| 2419 | --[[for _,v in pairs(hit.Parent:children()) do | |
| 2420 | if v:IsA("Humanoid") then
| |
| 2421 | h=v | |
| 2422 | end | |
| 2423 | end]] | |
| 2424 | --[[if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
| |
| 2425 | h=hit.Parent.Parent:FindFirstChild("Humanoid")
| |
| 2426 | end]] | |
| 2427 | if hit.Parent.className=="Hat" then | |
| 2428 | hit=hit.Parent.Parent:findFirstChild("Head")
| |
| 2429 | end | |
| 2430 | if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent.Name~="Crystal" and hit.Parent:FindFirstChild("Torso")~=nil then
| |
| 2431 | if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
| |
| 2432 | if Sound=="GreatHit" then | |
| 2433 | so("200632875",hit,1,1)
| |
| 2434 | end | |
| 2435 | game:GetService("Debris"):AddItem(c,.5)
| |
| 2436 | minim=minim*Atk.Value | |
| 2437 | maxim=maxim*Atk.Value | |
| 2438 | Damage=0 | |
| 2439 | if minim==maxim or minim>maxim then | |
| 2440 | Damage=maxim | |
| 2441 | else | |
| 2442 | Damage=math.random(minim,maxim) | |
| 2443 | end | |
| 2444 | blocked=false | |
| 2445 | enblock=nil | |
| 2446 | Stats=hit.Parent:findFirstChild("Stats")
| |
| 2447 | if Stats~=nil then | |
| 2448 | enblock=Stats:findFirstChild("Block")
| |
| 2449 | if enblock~=nil then | |
| 2450 | if enblock.Value==true then | |
| 2451 | blocked=true | |
| 2452 | end | |
| 2453 | end | |
| 2454 | if Stats:findFirstChild("Defense")~=nil then
| |
| 2455 | Damage=Damage/(Stats.Defense.Value) | |
| 2456 | if Damage<=3 and (ranged==false or ranged==nil) and blocked~=true then | |
| 2457 | hitnum=math.random(1,5) | |
| 2458 | if hitnum==1 then so("199149321",hit,1,.7)
| |
| 2459 | elseif hitnum==2 then so("199149338",hit,1,.7)
| |
| 2460 | elseif hitnum==3 then so("199149367",hit,1,.7)
| |
| 2461 | elseif hitnum==4 then so("199149409",hit,1,.7)
| |
| 2462 | elseif hitnum==5 then so("199149452",hit,1,.7)
| |
| 2463 | end | |
| 2464 | elseif ranged==false or ranged==nil and blocked~=true then | |
| 2465 | hitnum=math.random(1,6) | |
| 2466 | if hitnum==1 then so("199149137",hit,1,.7)
| |
| 2467 | elseif hitnum==2 then so("199149186",hit,1,.7)
| |
| 2468 | elseif hitnum==3 then so("199149221",hit,1,.7)
| |
| 2469 | elseif hitnum==4 then so("199149235",hit,1,.7)
| |
| 2470 | elseif hitnum==5 then so("199149269",hit,1,.7)
| |
| 2471 | elseif hitnum==6 then so("199149297",hit,1,.7)
| |
| 2472 | end | |
| 2473 | end | |
| 2474 | end | |
| 2475 | if Stats:findFirstChild("Stun")~=nil then
| |
| 2476 | if blocked==true then | |
| 2477 | incstun=math.floor(incstun/2) | |
| 2478 | end | |
| 2479 | Stats.Stun.Value=Stats.Stun.Value+incstun | |
| 2480 | end | |
| 2481 | if Stats:findFirstChild("Stagger")~=nil then
| |
| 2482 | if stagger==true then | |
| 2483 | Stats.Stagger.Value=true | |
| 2484 | end | |
| 2485 | end | |
| 2486 | end | |
| 2487 | if blocked==true then | |
| 2488 | showDamage(hit.Parent,"Block","Damage") | |
| 2489 | hitnum=math.random(1,2) | |
| 2490 | if hitnum==1 then so("199148933",hit,1,1)
| |
| 2491 | elseif hitnum==2 then so("199148947",hit,1,1)
| |
| 2492 | end | |
| 2493 | enblock.Value=false | |
| 2494 | else | |
| 2495 | Damage=math.floor(Damage) | |
| 2496 | h:TakeDamage(Damage) | |
| 2497 | --[[coroutine.resume(coroutine.create(function(Hum,Dam) | |
| 2498 | damageFunc:InvokeServer(nil,h,Damage) | |
| 2499 | --print(Dam) | |
| 2500 | end),h,Damage)]] | |
| 2501 | showDamage(hit.Parent,Damage,"Damage") | |
| 2502 | if DecreaseState~=nil then | |
| 2503 | if DecreaseState=="Shatter" then | |
| 2504 | DecreaseStat(hit.Parent,"Movement",DecreaseAmount,Duration) | |
| 2505 | DecreaseStat(hit.Parent,"Damage",DecreaseAmount,Duration) | |
| 2506 | else | |
| 2507 | DecreaseStat(hit.Parent,DecreaseState,DecreaseAmount,Duration) | |
| 2508 | end | |
| 2509 | end | |
| 2510 | if Type=="Knockdown" then | |
| 2511 | hum=hit.Parent.Humanoid | |
| 2512 | hum.PlatformStand=true | |
| 2513 | coroutine.resume(coroutine.create(function(HHumanoid) | |
| 2514 | swait(1) | |
| 2515 | HHumanoid.PlatformStand=false | |
| 2516 | end),hum) | |
| 2517 | local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit | |
| 2518 | --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) | |
| 2519 | local bodvol=Instance.new("BodyVelocity")
| |
| 2520 | bodvol.velocity=angle*knockback | |
| 2521 | bodvol.P=5000 | |
| 2522 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
| 2523 | bodvol.Parent=hit | |
| 2524 | rl=Instance.new("BodyAngularVelocity")
| |
| 2525 | rl.P=3000 | |
| 2526 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
| 2527 | rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
| 2528 | rl.Parent=hit | |
| 2529 | game:GetService("Debris"):AddItem(bodvol,.5)
| |
| 2530 | game:GetService("Debris"):AddItem(rl,.5)
| |
| 2531 | elseif Type=="Shatter" then | |
| 2532 | for i=1,10 do | |
| 2533 | BreakEffect(BrickColor.new("Cyan"),hit.CFrame,math.random(20,80)/100,math.random(2,10),math.random(20,80)/100)
| |
| 2534 | end | |
| 2535 | elseif Type=="Knockdown2" then | |
| 2536 | hum=hit.Parent.Humanoid | |
| 2537 | local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit | |
| 2538 | local bodvol=Instance.new("BodyVelocity")
| |
| 2539 | bodvol.velocity=angle*knockback | |
| 2540 | bodvol.P=5000 | |
| 2541 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
| 2542 | bodvol.Parent=hit | |
| 2543 | game:GetService("Debris"):AddItem(bodvol,.5)
| |
| 2544 | elseif Type=="Normal" then | |
| 2545 | vp=Instance.new("BodyVelocity")
| |
| 2546 | vp.P=500 | |
| 2547 | vp.maxForce=Vector3.new(math.huge,0,math.huge) | |
| 2548 | if KnockbackType==1 then | |
| 2549 | vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05 | |
| 2550 | elseif KnockbackType==2 then | |
| 2551 | vp.velocity=Property.CFrame.lookVector*knockback | |
| 2552 | end | |
| 2553 | game:GetService("Debris"):AddItem(vp,.5)
| |
| 2554 | if knockback>0 then | |
| 2555 | vp.Parent=hit.Parent.Torso | |
| 2556 | end | |
| 2557 | end | |
| 2558 | end | |
| 2559 | debounce=Instance.new("BoolValue")
| |
| 2560 | debounce.Name="DebounceHit" | |
| 2561 | debounce.Parent=hit.Parent | |
| 2562 | debounce.Value=true | |
| 2563 | game:GetService("Debris"):AddItem(debounce,Delay)
| |
| 2564 | CRIT=false | |
| 2565 | end | |
| 2566 | end | |
| 2567 | ||
| 2568 | showDamage=function(Char,Dealt,Type) | |
| 2569 | m=Instance.new("Model")
| |
| 2570 | m.Name="Effect" | |
| 2571 | c=Instance.new("Part")
| |
| 2572 | c.Transparency=1 | |
| 2573 | c.Name="Head" | |
| 2574 | c.TopSurface=0 | |
| 2575 | c.BottomSurface=0 | |
| 2576 | c.formFactor="Plate" | |
| 2577 | c.Size=Vector3.new(1,.4,1) | |
| 2578 | b=Instance.new("BillboardGui",c)
| |
| 2579 | b.Size=UDim2.new(5,0,5,0) | |
| 2580 | b.AlwaysOnTop=true | |
| 2581 | damgui=gui("TextLabel",b,tostring(Dealt),1,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(1,0,1,0))
| |
| 2582 | if Type=="Damage" then | |
| 2583 | damgui.Font="SourceSans" | |
| 2584 | if Dealt=="Block" then | |
| 2585 | damgui.TextColor3=BrickColor.new("red").Color
| |
| 2586 | elseif Dealt<3 then | |
| 2587 | damgui.TextColor3=BrickColor.new("White").Color
| |
| 2588 | elseif Dealt>=3 and Dealt<20 then | |
| 2589 | damgui.TextColor3=BrickColor.new("Bright yellow").Color
| |
| 2590 | else | |
| 2591 | damgui.TextColor3=BrickColor.new("Really red").Color
| |
| 2592 | damgui.Font="SourceSansBold" | |
| 2593 | end | |
| 2594 | elseif Type=="Debuff" then | |
| 2595 | damgui.TextColor3=BrickColor.new("White").Color
| |
| 2596 | elseif Type=="Interrupt" then | |
| 2597 | damgui.TextColor3=BrickColor.new("New Yeller").Color
| |
| 2598 | end | |
| 2599 | --damgui.FontSize="Size48" | |
| 2600 | damgui.TextScaled=true | |
| 2601 | ms=Instance.new("CylinderMesh")
| |
| 2602 | ms.Scale=Vector3.new(.8,.8,.8) | |
| 2603 | ms.Parent=c | |
| 2604 | c.Reflectance=0 | |
| 2605 | Instance.new("BodyGyro").Parent=c
| |
| 2606 | c.Parent=m | |
| 2607 | if Char:findFirstChild("Head")~=nil then
| |
| 2608 | c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100)) | |
| 2609 | elseif Char.Parent:findFirstChild("Head")~=nil then
| |
| 2610 | c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100)) | |
| 2611 | end | |
| 2612 | f=Instance.new("BodyPosition")
| |
| 2613 | f.P=2000 | |
| 2614 | f.D=100 | |
| 2615 | f.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
| 2616 | if Type=="Damage" then | |
| 2617 | f.position=c.Position+Vector3.new(0,3,0) | |
| 2618 | elseif Type=="Debuff" or Type=="Interrupt" then | |
| 2619 | f.position=c.Position+Vector3.new(0,5,0) | |
| 2620 | end | |
| 2621 | f.Parent=c | |
| 2622 | game:GetService("Debris"):AddItem(m,5)
| |
| 2623 | table.insert(Effects,{m,"showDamage",damgui,f,10,1,15,50,100})
| |
| 2624 | c.CanCollide=false | |
| 2625 | m.Parent=effects | |
| 2626 | c.CanCollide=false | |
| 2627 | end | |
| 2628 | ||
| 2629 | Player:GetMouse().KeyDown:connect(function(kek) | |
| 2630 | kek = kek:lower() | |
| 2631 | if kek == "z" then | |
| 2632 | TurnSlam() | |
| 2633 | end | |
| 2634 | if kek == "x" then | |
| 2635 | GrandPunch() | |
| 2636 | end | |
| 2637 | if kek == "c" then | |
| 2638 | FrostSlam() | |
| 2639 | end | |
| 2640 | if kek == "v" then | |
| 2641 | TriIceShards() | |
| 2642 | end | |
| 2643 | if kek == "q" then | |
| 2644 | TriOrbs() | |
| 2645 | end | |
| 2646 | if kek == "e" then | |
| 2647 | IceMortar() | |
| 2648 | end | |
| 2649 | if kek == "r" then | |
| 2650 | TriIceShards2() | |
| 2651 | end | |
| 2652 | if kek == "f" then | |
| 2653 | TriOrbs2() | |
| 2654 | end | |
| 2655 | end) | |
| 2656 | ||
| 2657 | local stunnum=0 | |
| 2658 | local animnum=0 | |
| 2659 | local idle=1 | |
| 2660 | local animlimit=120 | |
| 2661 | local attacking=false | |
| 2662 | while Humanoid.Health>0 do | |
| 2663 | swait() | |
| 2664 | for _,c in pairs(C1S:children()) do | |
| 2665 | if c.Name=="Defense" then c.Value=1 end | |
| 2666 | if c.Name=="Decrease" then | |
| 2667 | for _,d in pairs(c:children()) do | |
| 2668 | d.Parent=nil | |
| 2669 | end | |
| 2670 | end | |
| 2671 | end | |
| 2672 | for _,c in pairs(C2S:children()) do | |
| 2673 | if c.Name=="Defense" then c.Value=1 end | |
| 2674 | if c.Name=="Decrease" then | |
| 2675 | for _,d in pairs(c:children()) do | |
| 2676 | d.Parent=nil | |
| 2677 | end | |
| 2678 | end | |
| 2679 | end | |
| 2680 | for _,c in pairs(C3S:children()) do | |
| 2681 | if c.Name=="Defense" then c.Value=1 end | |
| 2682 | if c.Name=="Decrease" then | |
| 2683 | for _,d in pairs(c:children()) do | |
| 2684 | d.Parent=nil | |
| 2685 | end | |
| 2686 | end | |
| 2687 | end | |
| 2688 | for _,c in pairs(C4S:children()) do | |
| 2689 | if c.Name=="Defense" then c.Value=1 end | |
| 2690 | if c.Name=="Decrease" then | |
| 2691 | for _,d in pairs(c:children()) do | |
| 2692 | d.Parent=nil | |
| 2693 | end | |
| 2694 | end | |
| 2695 | end | |
| 2696 | if stunanim==false then | |
| 2697 | Humanoid.Health=CurrentHealth | |
| 2698 | else | |
| 2699 | CurrentHealth=Humanoid.Health | |
| 2700 | end | |
| 2701 | for i=1,#refs2 do | |
| 2702 | refs2[i][1].CFrame=refs2[i][2].CFrame*refs2[i][3] | |
| 2703 | end | |
| 2704 | if meleecooldown<100 then | |
| 2705 | meleecooldown=meleecooldown+mcdadd | |
| 2706 | end | |
| 2707 | hitbox2.Parent=hitbox.Parent | |
| 2708 | hitbox2.Size=hitbox.Size | |
| 2709 | hitbox2.CFrame=hitboxCF | |
| 2710 | --[[target,distance=findNearestTorso(Torso.Position) | |
| 2711 | if target~=nil then | |
| 2712 | local test1,dist1=findNearestTorso(Head.Position) | |
| 2713 | if dist1<200 then | |
| 2714 | if math.random(1,50)==1 and stunanim==false then --close projectile attack | |
| 2715 | coroutine.resume(coroutine.create(function() | |
| 2716 | atktype=math.random(1,4) | |
| 2717 | if atktype==1 then | |
| 2718 | TriIceShards2() | |
| 2719 | elseif atktype==2 then | |
| 2720 | TriIceShards2() | |
| 2721 | elseif atktype==3 then | |
| 2722 | TriIceShards2() | |
| 2723 | elseif atktype==4 then | |
| 2724 | TriOrbs2() | |
| 2725 | end | |
| 2726 | end)) | |
| 2727 | end | |
| 2728 | end | |
| 2729 | local rand=math.random(1,30) | |
| 2730 | if CurrentHealth<1500 then | |
| 2731 | rand=math.random(1,20) | |
| 2732 | end | |
| 2733 | if rand==1 and stunanim==false then --projectile attack | |
| 2734 | coroutine.resume(coroutine.create(function() | |
| 2735 | atktype=math.random(1,4) | |
| 2736 | if atktype==1 then | |
| 2737 | TriIceShards() | |
| 2738 | elseif atktype==2 then | |
| 2739 | TriIceShards() | |
| 2740 | elseif atktype==3 then | |
| 2741 | TriOrbs() | |
| 2742 | elseif atktype==4 then | |
| 2743 | IceMortar() | |
| 2744 | end | |
| 2745 | end)) | |
| 2746 | end | |
| 2747 | if math.random(1,50)==1 and attack==false and meleecooldown>=100 and stunanim==false then --melee attack | |
| 2748 | coroutine.resume(coroutine.create(function() | |
| 2749 | atktype=math.random(1,3) | |
| 2750 | if atktype==1 then | |
| 2751 | TurnSlam() | |
| 2752 | elseif atktype==2 then | |
| 2753 | GrandPunch() | |
| 2754 | elseif atktype==3 then | |
| 2755 | FrostSlam() | |
| 2756 | end | |
| 2757 | end)) | |
| 2758 | end | |
| 2759 | end | |
| 2760 | if C1a==true then | |
| 2761 | if C1Hum.Health<=0 then | |
| 2762 | C1a=false | |
| 2763 | summoncrystals=0 | |
| 2764 | Stun.Value=Stun.Value+160 | |
| 2765 | MagicCrystal(BrickColor.new("red"),cf(C1Head.Position),10,20,10,3,3,3,.1)
| |
| 2766 | Cryst1.Parent=nil | |
| 2767 | end | |
| 2768 | end | |
| 2769 | if C2a==true then | |
| 2770 | if C2Hum.Health<=0 then | |
| 2771 | C2a=false | |
| 2772 | summoncrystals=0 | |
| 2773 | Stun.Value=Stun.Value+160 | |
| 2774 | MagicCrystal(BrickColor.new("red"),cf(C2Head.Position),10,20,10,3,3,3,.1)
| |
| 2775 | Cryst2.Parent=nil | |
| 2776 | end | |
| 2777 | end | |
| 2778 | if C3a==true then | |
| 2779 | if C3Hum.Health<=0 then | |
| 2780 | C3a=false | |
| 2781 | summoncrystals=0 | |
| 2782 | Stun.Value=Stun.Value+160 | |
| 2783 | MagicCrystal(BrickColor.new("red"),cf(C3Head.Position),10,20,10,3,3,3,.1)
| |
| 2784 | Cryst3.Parent=nil | |
| 2785 | end | |
| 2786 | end | |
| 2787 | if C4a==true then | |
| 2788 | if C4Hum.Health<=0 then | |
| 2789 | C4a=false | |
| 2790 | summoncrystals=0 | |
| 2791 | Stun.Value=Stun.Value+160 | |
| 2792 | MagicCrystal(BrickColor.new("red"),cf(C4Head.Position),10,20,10,3,3,3,.1)
| |
| 2793 | Cryst4.Parent=nil | |
| 2794 | end | |
| 2795 | end | |
| 2796 | if C1a==false and C2a==false and C3a==false and C4a==false then | |
| 2797 | if CurrentHealth>1500 then | |
| 2798 | else | |
| 2799 | end | |
| 2800 | crystals=false | |
| 2801 | end | |
| 2802 | if CurrentHealth<=1500 then | |
| 2803 | end | |
| 2804 | summoncrystals=summoncrystals+.1 | |
| 2805 | if summoncrystals>100 and crystals==false and attack==false then | |
| 2806 | coroutine.resume(coroutine.create(function() | |
| 2807 | while attack==true do | |
| 2808 | swait() | |
| 2809 | end | |
| 2810 | SummonCrystals() | |
| 2811 | end)) | |
| 2812 | end]] | |
| 2813 | Humanoid.WalkSpeed=0 | |
| 2814 | if Stun.Value>=StunT.Value and stunanim==false and attack==false then | |
| 2815 | coroutine.resume(coroutine.create(function() | |
| 2816 | stunanim=true | |
| 2817 | while attack==true do | |
| 2818 | swait() | |
| 2819 | Stun.Value=StunT.Value | |
| 2820 | end | |
| 2821 | summoncrystals=0 | |
| 2822 | StunAnim() | |
| 2823 | Stun.Value=0 | |
| 2824 | stunanim=false | |
| 2825 | end)) | |
| 2826 | end | |
| 2827 | local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
| 2828 | local velderp=RootPart.Velocity.y | |
| 2829 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,10,Character) | |
| 2830 | for _,c in pairs(Decrease:children()) do | |
| 2831 | c.Parent=nil | |
| 2832 | if c:findFirstChild("Duration")~=nil then
| |
| 2833 | c.Duration.Value=c.Duration.Value-9999 | |
| 2834 | if c.Duration.Value<=0 then | |
| 2835 | c.Parent=nil | |
| 2836 | end | |
| 2837 | end | |
| 2838 | if c.Name=="DecreaseAtk" then | |
| 2839 | decreaseatk=decreaseatk+c.Value | |
| 2840 | elseif c.Name=="DecreaseDef" then | |
| 2841 | decreasedef=decreasedef+c.Value | |
| 2842 | elseif c.Name=="DecreaseMvmt" then | |
| 2843 | decreasemvmt=decreasemvmt+c.Value | |
| 2844 | end | |
| 2845 | end | |
| 2846 | Atk.Value=2-decreaseatk | |
| 2847 | if Atk.Value<=0 then | |
| 2848 | Atk.Value=0 | |
| 2849 | end | |
| 2850 | Def.Value=2-decreasedef | |
| 2851 | if Def.Value<=0 then | |
| 2852 | Def.Value=0.01 | |
| 2853 | end | |
| 2854 | Mvmt.Value=0-decreasemvmt | |
| 2855 | if Mvmt.Value<=0 then | |
| 2856 | Mvmt.Value=0 | |
| 2857 | end | |
| 2858 | decreaseatk=0 | |
| 2859 | decreasedef=0 | |
| 2860 | decreasemvmt=0 | |
| 2861 | AtkVal=Atk.Value*100 | |
| 2862 | AtkVal=math.floor(AtkVal) | |
| 2863 | AtkVal=AtkVal/100 | |
| 2864 | DefVal=Def.Value*100 | |
| 2865 | DefVal=math.floor(DefVal) | |
| 2866 | DefVal=DefVal/100 | |
| 2867 | MvmtVal=Mvmt.Value*100 | |
| 2868 | MvmtVal=math.floor(MvmtVal) | |
| 2869 | MvmtVal=MvmtVal/100 | |
| 2870 | if MvmtVal<=0 then | |
| 2871 | MvmtVal=0 | |
| 2872 | end | |
| 2873 | animnum=animnum+1 | |
| 2874 | if animnum>=animlimit*5 then | |
| 2875 | idle=1 | |
| 2876 | animnum=0 | |
| 2877 | elseif animnum>=animlimit*4 then | |
| 2878 | idle=1 | |
| 2879 | animnum=0 | |
| 2880 | elseif animnum>=animlimit*3 then | |
| 2881 | idle=4 | |
| 2882 | elseif animnum>=animlimit*2 then | |
| 2883 | idle=3 | |
| 2884 | elseif animnum>=animlimit*1 then | |
| 2885 | idle=2 | |
| 2886 | end | |
| 2887 | if attack==false then --idle anim | |
| 2888 | if idle==1 or idle==2 then | |
| 2889 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.4,0,0),.005) | |
| 2890 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-200,0),.005) | |
| 2891 | wld19.C0=wld19.C0:lerp(euler(-.4,.3,0)*cf(94,-47.5,-2.248),.005) | |
| 2892 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,-.1,-.6)*euler(0,-.4,0),.005) | |
| 2893 | wld24.C0=wld24.C0:lerp(euler(.8,.1,0)*cf(0,90.25,0),.005) | |
| 2894 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.005) | |
| 2895 | ||
| 2896 | wld33.C0=wld33.C0:lerp(euler(-.4,-.3,0)*cf(-94,-47.5,-2.248),.005) | |
| 2897 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,.1,.6)*euler(0,.4,0),.005) | |
| 2898 | wld38.C0=wld38.C0:lerp(euler(-.8,.1,0)*cf(0,-90.25,0),.005) | |
| 2899 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.005) | |
| 2900 | else | |
| 2901 | Neck.C0=Neck.C0:lerp(euler(0,0,0)*cf(0,35,0)*euler(.4,0,0),.005) | |
| 2902 | RootJoint.C0=RootJoint.C0:lerp(cf(-1.749,-180,10)*euler(-.2,0,0),.005) | |
| 2903 | wld19.C0=wld19.C0:lerp(euler(-.2,.3,0)*cf(94,-47.5,-2.248),.005) | |
| 2904 | wld21.C0=wld21.C0:lerp(euler(0,0,math.rad(90))*cf(74.25,0,0)*euler(0,-.1,-.6)*euler(0,0,0),.005) | |
| 2905 | wld24.C0=wld24.C0:lerp(euler(1.2,-.2,0)*cf(0,90.25,0),.005) | |
| 2906 | wld29.C0=wld29.C0:lerp(euler(0,0,0)*cf(0,125,0),.005) | |
| 2907 | ||
| 2908 | wld33.C0=wld33.C0:lerp(euler(-.2,-.3,0)*cf(-94,-47.5,-2.248),.005) | |
| 2909 | wld35.C0=wld35.C0:lerp(euler(0,0,math.rad(90))*cf(-74.25,0,0)*euler(0,.1,.6)*euler(0,0,0),.005) | |
| 2910 | wld38.C0=wld38.C0:lerp(euler(-1.2,-.2,0)*cf(0,-90.25,0),.005) | |
| 2911 | wld43.C0=wld43.C0:lerp(euler(0,0,0)*cf(0,-125,0),.005) | |
| 2912 | end | |
| 2913 | end | |
| 2914 | if #Effects>0 then | |
| 2915 | --table.insert(Effects,{prt,"Block1",delay})
| |
| 2916 | for e=1,#Effects do | |
| 2917 | if Effects[e]~=nil then | |
| 2918 | --for j=1,#Effects[e] do | |
| 2919 | local Thing=Effects[e] | |
| 2920 | if Thing~=nil then | |
| 2921 | local Part=Thing[1] | |
| 2922 | local Mode=Thing[2] | |
| 2923 | local Delay=Thing[3] | |
| 2924 | local IncX=Thing[4] | |
| 2925 | local IncY=Thing[5] | |
| 2926 | local IncZ=Thing[6] | |
| 2927 | if Thing[2]=="DecreaseStat" then | |
| 2928 | --table.insert(Effects,{Model,"DecreaseStat",Stat,Amount,Duration,d})
| |
| 2929 | Thing[5]=Thing[5]-1 | |
| 2930 | if Thing[5]<=0 then | |
| 2931 | if Thing[1]:findFirstChild("Stats")~=nil then
| |
| 2932 | if Thing[1].Stats:findFirstChild("Decrease")~=nil then
| |
| 2933 | --Thing[1].Stats[Thing[3]].Value=Thing[1].Stats[Thing[3]].Value+Thing[4] | |
| 2934 | end | |
| 2935 | end | |
| 2936 | Thing[6].Parent=nil | |
| 2937 | table.remove(Effects,e) | |
| 2938 | end | |
| 2939 | end | |
| 2940 | if Thing[2]=="CylinderClang" then | |
| 2941 | if Thing[3]<=1 then | |
| 2942 | Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0) | |
| 2943 | Thing[7]=Thing[1].CFrame | |
| 2944 | effect("New Yeller",0,Thing[8],Thing[7])
| |
| 2945 | Thing[8]=Thing[7] | |
| 2946 | Thing[3]=Thing[3]+Thing[4] | |
| 2947 | else | |
| 2948 | Part.Parent=nil | |
| 2949 | table.remove(Effects,e) | |
| 2950 | end | |
| 2951 | end | |
| 2952 | if Thing[2]=="showDamage" then | |
| 2953 | if Thing[6]<Thing[5] then | |
| 2954 | Thing[6]=Thing[6]+1 | |
| 2955 | elseif Thing[6]<Thing[7] then | |
| 2956 | Thing[4].position=Thing[4].position+vt(0,-.2,0) | |
| 2957 | Thing[6]=Thing[6]+1 | |
| 2958 | elseif Thing[6]<Thing[8] then | |
| 2959 | Thing[6]=Thing[6]+1 | |
| 2960 | elseif Thing[6]<Thing[9] then | |
| 2961 | Thing[6]=Thing[6]+1 | |
| 2962 | Thing[4].position=Thing[4].position+vt(0,.2,0) | |
| 2963 | Thing[3].TextStrokeTransparency=Thing[3].TextStrokeTransparency+.1 | |
| 2964 | Thing[3].TextTransparency=Thing[3].TextTransparency+.1 | |
| 2965 | else | |
| 2966 | Thing[1].Parent=nil | |
| 2967 | table.remove(Effects,e) | |
| 2968 | end | |
| 2969 | end | |
| 2970 | if Thing[2]=="ShootIce" then | |
| 2971 | local Look=Thing[1] | |
| 2972 | local hit,pos = rayCast(Thing[4],Look.lookVector,Thing[9],Character) | |
| 2973 | local mag=(Thing[4]-pos).magnitude | |
| 2974 | --MagicHead(BrickColor.new(NewCol),CFrame.new((Thing[4]+pos)/2,pos)*angles(1.57,0,0),1,mag*5,1,.5,0,.5,.2) | |
| 2975 | Thing[8].CFrame=CFrame.new((Thing[4]+pos)/2,pos)*euler(-1.57,0,0) | |
| 2976 | Thing[4]=Thing[4]+(Look.lookVector*Thing[9]) | |
| 2977 | Thing[3]=Thing[3]-1 | |
| 2978 | Thing[9]=Thing[9]+.2 | |
| 2979 | if hit~=nil then | |
| 2980 | Thing[3]=0 | |
| 2981 | --DecreaseStat(hit.Parent,"Movement",.02,50,false) | |
| 2982 | --Damagefunc(hit,Thing[5],Thing[6],Thing[7],"Normal",RootPart,0,2,math.random(1,3),nil,nil,true) | |
| 2983 | ref=part(3,effects,0,1,BrickColor.new("Really red"),"Reference",vt())
| |
| 2984 | ref.Anchored=true | |
| 2985 | ref.CFrame=cf(pos) | |
| 2986 | --MagicCircle(BrickColor.new(NewCol3),cf(pos),5,5,5,1,1,1,0.2) | |
| 2987 | game:GetService("Debris"):AddItem(ref,1)
| |
| 2988 | ref2=part(3,effects,0,1,BrickColor.new("Really red"),"Reference",vt(5,5,5))
| |
| 2989 | ref2.Anchored=true | |
| 2990 | ref2.CFrame=cf(pos) | |
| 2991 | --MagicCircle(BrickColor.new(NewCol3),cf(pos),5,5,5,1,1,1,0.2) | |
| 2992 | so("199146181",ref2,1,1.6)
| |
| 2993 | game:GetService("Debris"):AddItem(ref2,5)
| |
| 2994 | --MagicCircle(BrickColor.new("Cyan"),ref.CFrame,40,40,40,1,1,1,.05)
| |
| 2995 | freeze=true | |
| 2996 | MagicCircle(BrickColor.new("Cyan"),cf(ref.Position),20,20,20,20,20,20,.1)
| |
| 2997 | MagniDamage(ref,15,Thing[5],Thing[6],Thing[7],"Normal",RootPart,0,2,math.random(10,15),nil,nil,true,"Movement",.1,100) | |
| 2998 | freeze=false | |
| 2999 | for i=1,8 do | |
| 3000 | BreakEffect(BrickColor.new("Pearl"),ref.CFrame*cf(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100),math.random(60,120)/100,math.random(3,20),math.random(60,120)/100)
| |
| 3001 | end | |
| 3002 | end | |
| 3003 | if Thing[3]<=0 then | |
| 3004 | Thing[8].Transparency=1 | |
| 3005 | Thing[11].Enabled=false | |
| 3006 | Thing[12].Enabled=false | |
| 3007 | game:GetService("Debris"):AddItem(Thing[8],5)
| |
| 3008 | table.remove(Effects,e) | |
| 3009 | end | |
| 3010 | end | |
| 3011 | if Thing[2]=="SatelliteStrike" then | |
| 3012 | if Thing[5]<200 then | |
| 3013 | Thing[5]=Thing[5]+2 | |
| 3014 | Thing[4].Scale=vt(Thing[5],5,Thing[5]) | |
| 3015 | else | |
| 3016 | refda=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 3017 | refda.Anchored=true | |
| 3018 | refda.CFrame=cf(Thing[1].Position) | |
| 3019 | game:GetService("Debris"):AddItem(refda,1)
| |
| 3020 | so("334325056",refda,1,1)
| |
| 3021 | so("199145739",refda,.8,2)
| |
| 3022 | MagniDamage(refda,20,8,10,0,"Knockdown2",refda,0,1,math.random(10,12),nil,nil,true,"Movement",.4,100) | |
| 3023 | MagicHead(BrickColor.new("red"),cf(refda.Position),50,99999,50,-4,1,-4,.1)
| |
| 3024 | MagicBlock(BrickColor.new("red"),cf(refda.Position),120,120,120,-5,-5,-5,.07,1)
| |
| 3025 | for i=1,15 do | |
| 3026 | local freezepart=part(3,effects,0.5,0.5,BrickColor.new("red"),"Ice Part",vt(math.random(500,800)/100,math.random(500,800)/100,math.random(500,800)/100))
| |
| 3027 | freezepart.Anchored=true | |
| 3028 | freezepart.CanCollide=true | |
| 3029 | freezepart.CFrame=cf(refda.Position)*cf(math.random(-2000,2000)/100,0,math.random(-2000,2000)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 3030 | game:GetService("Debris"):AddItem(freezepart,5)
| |
| 3031 | end | |
| 3032 | Thing[1].Parent=nil | |
| 3033 | --MagicIcicle(BrickColor.new("Bright green"),cf(Thing[1].Position)*cf(0,-4,0)*euler(math.random(-50,50)/100,0,math.random(-50,50)/100),5,15,5,.05)
| |
| 3034 | table.remove(Effects,e) | |
| 3035 | end | |
| 3036 | end | |
| 3037 | if Thing[2]=="SatelliteStrike2" then | |
| 3038 | if Thing[5]<300 then | |
| 3039 | Thing[5]=Thing[5]+2 | |
| 3040 | Thing[4].Scale=vt(Thing[5],5,Thing[5]) | |
| 3041 | else | |
| 3042 | refda=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 3043 | refda.Anchored=true | |
| 3044 | refda.CFrame=cf(Thing[1].Position) | |
| 3045 | game:GetService("Debris"):AddItem(refda,1)
| |
| 3046 | refda2=part(3,effects,0,1,BrickColor.new("Black"),"Reference",vt())
| |
| 3047 | refda2.Anchored=true | |
| 3048 | refda2.CFrame=refda.CFrame*cf(0,-10,0) | |
| 3049 | game:GetService("Debris"):AddItem(refda2,1)
| |
| 3050 | so("178452221",refda,1,1.2)
| |
| 3051 | so("334325056",refda,1,1)
| |
| 3052 | MagniDamage(refda,30,8,10,math.random(40,60),"Knockdown2",refda2,0,1,math.random(15,20),nil,nil,true,"Damage",.4,300) | |
| 3053 | --MagicHead(BrickColor.new("red"),cf(refda.Position),50,99999,50,-4,1,-4,.1)
| |
| 3054 | MagicBlock(BrickColor.new("red"),cf(refda.Position),120,120,120,-5,-5,-5,.07,1)
| |
| 3055 | MagicWave2(BrickColor.new("Cyan"),cf(refda.Position),40,30,40,5,8,5,.07)
| |
| 3056 | --[[for i=1,15 do | |
| 3057 | local freezepart=part(3,effects,0.5,0.5,BrickColor.new("red"),"Ice Part",vt(math.random(500,800)/100,math.random(500,800)/100,math.random(500,800)/100))
| |
| 3058 | freezepart.Anchored=true | |
| 3059 | freezepart.CanCollide=true | |
| 3060 | freezepart.CFrame=cf(refda.Position)*cf(math.random(-1500,1500)/100,0,math.random(-1500,1500)/100)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 3061 | game:GetService("Debris"):AddItem(freezepart,5)
| |
| 3062 | end]] | |
| 3063 | Thing[1].Parent=nil | |
| 3064 | --MagicIcicle(BrickColor.new("Bright green"),cf(Thing[1].Position)*cf(0,-4,0)*euler(math.random(-50,50)/100,0,math.random(-50,50)/100),5,15,5,.05)
| |
| 3065 | table.remove(Effects,e) | |
| 3066 | end | |
| 3067 | end | |
| 3068 | if Thing[2]~="DecreaseStat" and Thing[2]~="showDamage" and Thing[2]~="ShootIce" and Thing[2]~="SatelliteStrike" and Thing[2]~="SatelliteStrike2" then | |
| 3069 | if Thing[1].Transparency<=1 then | |
| 3070 | if Thing[2]=="Block1" then | |
| 3071 | Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 3072 | Mesh=Thing[7] | |
| 3073 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
| 3074 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 3075 | elseif Thing[2]=="Block2" then | |
| 3076 | Thing[1].CFrame=Thing[1].CFrame | |
| 3077 | Mesh=Thing[7] | |
| 3078 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
| 3079 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 3080 | elseif Thing[2]=="Cylinder" then | |
| 3081 | Mesh=Thing[7] | |
| 3082 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
| 3083 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 3084 | elseif Thing[2]=="Cylinder2" then | |
| 3085 | Mesh=Thing[7] | |
| 3086 | if Thing[1].Transparency<=.5 then | |
| 3087 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
| 3088 | Thing[8]=Thing[8]+.2 | |
| 3089 | Thing[1].CFrame=Thing[1].CFrame*cf(0,1,0)*euler(0,Thing[8],0) | |
| 3090 | else | |
| 3091 | Mesh.Scale=Mesh.Scale+vt(Thing[4]/2,-Thing[5]/1,Thing[6]/2) | |
| 3092 | Thing[1].CFrame=Thing[1].CFrame*cf(0,-1,0) | |
| 3093 | end | |
| 3094 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 3095 | elseif Thing[2]=="Shatter" then | |
| 3096 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 3097 | Thing[4]=Thing[4]*cf(0,Thing[7],0) | |
| 3098 | Thing[1].CFrame=Thing[4]*euler(Thing[6],0,0) | |
| 3099 | --Thing[1].CFrame=Thing[1].CFrame | |
| 3100 | Thing[6]=Thing[6]+Thing[5] | |
| 3101 | elseif Thing[2]=="Blood" then | |
| 3102 | Mesh=Thing[7] | |
| 3103 | Thing[1].CFrame=Thing[1].CFrame*cf(0,Thing[8],0) | |
| 3104 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
| 3105 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 3106 | elseif Thing[2]=="Elec" then | |
| 3107 | Mesh=Thing[7] | |
| 3108 | Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9]) | |
| 3109 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 3110 | elseif Thing[2]=="Disappear" then | |
| 3111 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
| 3112 | end | |
| 3113 | else | |
| 3114 | table.remove(Effects,e) | |
| 3115 | end | |
| 3116 | end | |
| 3117 | end | |
| 3118 | --end | |
| 3119 | end | |
| 3120 | end | |
| 3121 | end | |
| 3122 | end | |
| 3123 | refs.Parent=nil | |
| 3124 | effects.Parent=nil | |
| 3125 | Humanoid.Parent=nil | |
| 3126 | for _,c in pairs(Character:children()) do | |
| 3127 | if c.className=="Part" then | |
| 3128 | --[[c:BreakJoints() | |
| 3129 | c.CanCollide=true | |
| 3130 | c.Anchored=false]] | |
| 3131 | c.Anchored=true | |
| 3132 | end | |
| 3133 | end | |
| 3134 | for _,c in pairs(armor:children()) do | |
| 3135 | if c.className=="Part" then | |
| 3136 | --[[c:BreakJoints() | |
| 3137 | c.CanCollide=true | |
| 3138 | c.Anchored=false]] | |
| 3139 | c.Anchored=true | |
| 3140 | end | |
| 3141 | end | |
| 3142 | for _,c in pairs(Character:children()) do | |
| 3143 | if c.className=="Part" then | |
| 3144 | if c.Name~="Left Arm" then | |
| 3145 | swait() | |
| 3146 | end | |
| 3147 | c:BreakJoints() | |
| 3148 | c.CanCollide=false | |
| 3149 | c.Anchored=false | |
| 3150 | end | |
| 3151 | end | |
| 3152 | for _,c in pairs(armor:children()) do | |
| 3153 | if c.className=="Part" then | |
| 3154 | swait() | |
| 3155 | c:BreakJoints() | |
| 3156 | c.CanCollide=false | |
| 3157 | c.Anchored=false | |
| 3158 | end | |
| 3159 | end | |
| 3160 | --[[ | |
| 3161 | Copyrighted (C) Fenrier 2015 | |
| 3162 | ]] |