SHOW:
|
|
- or go back to the newest paste.
1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
3 | local Player,game,owner = owner,game | |
4 | local RealPlayer = Player | |
5 | do | |
6 | print("FE Compatibility code V2 by Mokiros") | |
7 | local RealPlayer = RealPlayer | |
8 | script.Parent = RealPlayer.Character | |
9 | ||
10 | --Fake event to make stuff like Mouse.KeyDown work | |
11 | local Disconnect_Function = function(this) | |
12 | this[1].Functions[this[2]] = nil | |
13 | end | |
14 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}} | |
15 | local FakeEvent_Metatable = {__index={ | |
16 | Connect = function(this,f) | |
17 | local i = tostring(math.random(0,10000)) | |
18 | while this.Functions[i] do | |
19 | i = tostring(math.random(0,10000)) | |
20 | end | |
21 | this.Functions[i] = f | |
22 | return setmetatable({this,i},Disconnect_Metatable) | |
23 | end | |
24 | }} | |
25 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
26 | local function fakeEvent() | |
27 | return setmetatable({Functions={}},FakeEvent_Metatable) | |
28 | end | |
29 | ||
30 | --Creating fake input objects with fake variables | |
31 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()} | |
32 | FakeMouse.keyUp = FakeMouse.KeyUp | |
33 | FakeMouse.keyDown = FakeMouse.KeyDown | |
34 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
35 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
36 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
37 | end} | |
38 | --Merged 2 functions into one by checking amount of arguments | |
39 | CAS.UnbindAction = CAS.BindAction | |
40 | ||
41 | --This function will trigger the events that have been :Connect()'ed | |
42 | local function TriggerEvent(self,ev,...) | |
43 | for _,f in pairs(self[ev].Functions) do | |
44 | f(...) | |
45 | end | |
46 | end | |
47 | FakeMouse.TriggerEvent = TriggerEvent | |
48 | UIS.TriggerEvent = TriggerEvent | |
49 | ||
50 | --Client communication | |
51 | local Event = Instance.new("RemoteEvent") | |
52 | Event.Name = "UserInput_Event" | |
53 | Event.OnServerEvent:Connect(function(plr,io) | |
54 | if plr~=RealPlayer then return end | |
55 | FakeMouse.Target = io.Target | |
56 | FakeMouse.Hit = io.Hit | |
57 | if not io.isMouse then | |
58 | local b = io.UserInputState == Enum.UserInputState.Begin | |
59 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
60 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
61 | end | |
62 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
63 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
64 | end | |
65 | for _,t in pairs(CAS.Actions) do | |
66 | for _,k in pairs(t.Keys) do | |
67 | if k==io.KeyCode then | |
68 | t.Function(t.Name,io.UserInputState,io) | |
69 | end | |
70 | end | |
71 | end | |
72 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
73 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
74 | end | |
75 | end) | |
76 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event") | |
77 | local Mouse = owner:GetMouse() | |
78 | local UIS = game:GetService("UserInputService") | |
79 | local input = function(io,RobloxHandled) | |
80 | if RobloxHandled then return end | |
81 | --Since InputObject is a client-side instance, we create and pass table instead | |
82 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
83 | end | |
84 | UIS.InputBegan:Connect(input) | |
85 | UIS.InputEnded:Connect(input) | |
86 | ||
87 | local h,t | |
88 | --Give the server mouse data every second frame, but only if the values changed | |
89 | --If player is not moving their mouse, client won't fire events | |
90 | local HB = game:GetService("RunService").Heartbeat | |
91 | while true do | |
92 | if h~=Mouse.Hit or t~=Mouse.Target then | |
93 | h,t=Mouse.Hit,Mouse.Target | |
94 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
95 | end | |
96 | --Wait 2 frames | |
97 | for i=1,2 do | |
98 | HB:Wait() | |
99 | end | |
100 | end]==],script) | |
101 | ||
102 | ----Sandboxed game object that allows the usage of client-side methods and services | |
103 | --Real game object | |
104 | local RealGame = game | |
105 | ||
106 | --Metatable for fake service | |
107 | local FakeService_Metatable = { | |
108 | __index = function(self,k) | |
109 | local s = rawget(self,"_RealService") | |
110 | if s then | |
111 | return typeof(s[k])=="function" | |
112 | and function(_,...)return s[k](s,...)end or s[k] | |
113 | end | |
114 | end, | |
115 | __newindex = function(self,k,v) | |
116 | local s = rawget(self,"_RealService") | |
117 | if s then s[k]=v end | |
118 | end | |
119 | } | |
120 | local function FakeService(t,RealService) | |
121 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
122 | return setmetatable(t,FakeService_Metatable) | |
123 | end | |
124 | ||
125 | --Fake game object | |
126 | local FakeGame = { | |
127 | GetService = function(self,s) | |
128 | return rawget(self,s) or RealGame:GetService(s) | |
129 | end, | |
130 | Players = FakeService({ | |
131 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player) | |
132 | },"Players"), | |
133 | UserInputService = FakeService(UIS,"UserInputService"), | |
134 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
135 | RunService = FakeService({ | |
136 | _btrs = {}, | |
137 | RenderStepped = RealGame:GetService("RunService").Heartbeat, | |
138 | BindToRenderStep = function(self,name,_,fun) | |
139 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
140 | end, | |
141 | UnbindFromRenderStep = function(self,name) | |
142 | self._btrs[name]:Disconnect() | |
143 | end, | |
144 | },"RunService") | |
145 | } | |
146 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
147 | FakeGame.service = FakeGame.GetService | |
148 | FakeService(FakeGame,game) | |
149 | --Changing owner to fake player object to support owner:GetMouse() | |
150 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
151 | end | |
152 | ||
153 | --[[ Arkuni Script ]]-- | |
154 | --[[ Declarations ]]-- | |
155 | wait(.0000000000000000000001) | |
156 | local Player = game:GetService("Players").LocalPlayer | |
157 | local Character = Player.Character | |
158 | local Head = Character.Head | |
159 | local Torso = Character.Torso | |
160 | local Right_Arm = Character["Right Arm"] | |
161 | local Right_Leg = Character["Right Leg"] | |
162 | local Left_Arm = Character["Left Arm"] | |
163 | local Left_Leg = Character["Left Leg"] | |
164 | local Humanoid = Character.Humanoid | |
165 | local Animation = "Idle" | |
166 | local Mouse = Player:GetMouse() | |
167 | local LeftShoulder = Torso["Left Shoulder"] | |
168 | local Left_Hip = Torso["Left Hip"] | |
169 | local RightShoulder = Torso["Right Shoulder"] | |
170 | local Right_Hip = Torso["Right Hip"] | |
171 | local Root = Character.HumanoidRootPart | |
172 | local RootJoint = Root.RootJoint | |
173 | local Attacking = false | |
174 | local CanAttack = true | |
175 | local Anim = "Idle" | |
176 | local Combo = 1 | |
177 | local Blocking = false | |
178 | local MaxArk = 100 | |
179 | local Ark = 100 | |
180 | local MaxBlock = 100 | |
181 | local Effects = {} | |
182 | local Color = "Bright yellow" | |
183 | local Invert = false | |
184 | local Idle = 0 | |
185 | local Equipped = false | |
186 | local Running = false | |
187 | local Unseathed = false | |
188 | ||
189 | Humanoid.MaxHealth = 5000 | |
190 | Humanoid.Health = 5000 | |
191 | ||
192 | Left_Shoulder = Instance.new("Weld", Torso) | |
193 | Left_Shoulder.Part0 = Torso | |
194 | Left_Shoulder.Part1 = Left_Arm | |
195 | Left_Shoulder.Name = "Left Shoulder" | |
196 | Left_Shoulder.C0 = CFrame.new(-1.5,0,0) | |
197 | ||
198 | Right_Shoulder = Instance.new("Weld", Torso) | |
199 | Right_Shoulder.Part0 = Torso | |
200 | Right_Shoulder.Part1 = Right_Arm | |
201 | Right_Shoulder.Name = "Right Shoulder" | |
202 | Right_Shoulder.C0 = CFrame.new(1.5,0,0) | |
203 | ||
204 | LeftShoulder.Parent = nil | |
205 | RightShoulder.Parent = nil | |
206 | Humanoid.WalkSpeed = 10 | |
207 | ||
208 | local RootCFrame = CFrame.fromEulerAnglesXYZ(-1.57,0,3.14) | |
209 | Necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
210 | Necko2 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
211 | Right_Hip_C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
212 | Left_Hip_C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
213 | ||
214 | ||
215 | Movemment = 1 | |
216 | Walk = 0 | |
217 | ||
218 | Animator = Humanoid.Animator | |
219 | Animate = Character.Animate | |
220 | ||
221 | Animator.Parent = nil | |
222 | Animate.Parent = nil | |
223 | ||
224 | --[[for i,v in pairs(Head:children()) do | |
225 | ||
226 | if v:IsA("Sound") then | |
227 | ||
228 | v:Remove() | |
229 | ||
230 | end | |
231 | end | |
232 | ]]-- | |
233 | ||
234 | local Services = { | |
235 | ||
236 | SoundService = game:GetService("SoundService"); | |
237 | Players = game:GetService("Players"); | |
238 | Debris = game:GetService("Debris"); | |
239 | Workspace = game:GetService("Workspace"); | |
240 | Lighting = game:GetService("Lighting"); | |
241 | HttpService = game:GetService("HttpService"); | |
242 | InsertService = game:GetService("InsertService"); | |
243 | ||
244 | } | |
245 | ||
246 | local ArkuniGui = Instance.new("BillboardGui", Head) | |
247 | ArkuniGui.ExtentsOffset = Vector3.new(0,5,0) | |
248 | ArkuniGui.Adornee = Head | |
249 | ArkuniGui.AlwaysOnTop = true | |
250 | ArkuniGui.Enabled = true | |
251 | ArkuniGui.Size = UDim2.new(0, 200,0, 50) | |
252 | ||
253 | local ArkuniText = Instance.new("TextLabel", ArkuniGui) | |
254 | ArkuniText.BackgroundTransparency = 1 | |
255 | ArkuniText.Font = "Code" | |
256 | ArkuniText.Size = UDim2.new(0, 200,0, 50) | |
257 | ArkuniText.TextStrokeColor3 = BrickColor.Gray().Color | |
258 | ArkuniText.TextStrokeTransparency = 0 | |
259 | ArkuniText.TextColor3 = Color3.new(1,1,1) | |
260 | ArkuniText.TextScaled = true | |
261 | ArkuniText.Text = "Arkuni" | |
262 | ||
263 | --------[[ Mesh Ids ]]-------- | |
264 | ||
265 | -- Eh... This is just my Stock of Meshes | |
266 | ||
267 | SpikeMeshId = 1033714 | |
268 | SpikeBallId = 9982590 | |
269 | StarMeshId = 45428961 | |
270 | CrystalMeshId = 9756362 | |
271 | ||
272 | --[[ Essential Functions ]]-- | |
273 | function NoOutlines(Part) | |
274 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
275 | end | |
276 | ||
277 | ||
278 | local CreatePart = function(Parent, Name, Color, Size, Material, Transparency, Shape) | |
279 | ||
280 | local Part = Instance.new("Part", Parent) | |
281 | Part.Name = Name | |
282 | Part.BrickColor = BrickColor.new(Color) | |
283 | Part.Size = Size | |
284 | Part.Material = Material | |
285 | Part.Transparency = Transparency | |
286 | Part.Shape = Shape | |
287 | Part.CanCollide = false | |
288 | NoOutlines(Part) | |
289 | ||
290 | return Part | |
291 | ||
292 | end | |
293 | ||
294 | local CreateMesh = function(Parent, Scale, Shape) | |
295 | ||
296 | ||
297 | local Mesh = Instance.new("BlockMesh", Parent) | |
298 | Mesh.Scale = Scale | |
299 | ||
300 | return Mesh | |
301 | ||
302 | end | |
303 | ||
304 | local CreateWedge = function(Parent, Name, Color, Size, Material, Transparency) | |
305 | ||
306 | local WedgePart = Instance.new("WedgePart", Parent) | |
307 | WedgePart.Name = Name | |
308 | WedgePart.BrickColor = BrickColor.new(Color) | |
309 | WedgePart.Size = Size | |
310 | WedgePart.Material = Material | |
311 | WedgePart.Transparency = Transparency | |
312 | WedgePart.CanCollide = false | |
313 | NoOutlines(WedgePart) | |
314 | ||
315 | return WedgePart | |
316 | ||
317 | end | |
318 | ||
319 | local CreateWeld = function(Parent, Cframe, P1 , P0) | |
320 | ||
321 | local Weld = Instance.new("Weld", Parent) | |
322 | Weld.Part0 = P0 | |
323 | Weld.Part1 = P1 | |
324 | Weld.Name = P0.Name .. "To" .. P1.Name | |
325 | Weld.C0 = Cframe | |
326 | ||
327 | return Weld | |
328 | ||
329 | end | |
330 | ||
331 | local CreateVelocity = function(Parent,Velocity,Force) | |
332 | ||
333 | local BodyVelocity = Instance.new("BodyVelocity", Parent) | |
334 | BodyVelocity.Velocity = Velocity | |
335 | BodyVelocity.MaxForce = Force | |
336 | ||
337 | ||
338 | ||
339 | return BodyVelocity | |
340 | ||
341 | end | |
342 | ||
343 | ||
344 | local CreateCrystal = function(Parent, Name, Color, Size, Material, Transparency, Scale) | |
345 | ||
346 | ||
347 | local Part = Instance.new("Part", Parent) | |
348 | Part.Name = Name | |
349 | Part.BrickColor = BrickColor.new(Color) | |
350 | Part.Size = Size | |
351 | Part.Material = Material | |
352 | Part.Transparency = Transparency | |
353 | Part.CanCollide = false | |
354 | NoOutlines(Part) | |
355 | ||
356 | local Mesh = Instance.new("SpecialMesh", Part) | |
357 | Mesh.MeshId = "http://www.roblox.com/asset?id=" .. CrystalMeshId | |
358 | Mesh.Scale = Scale | |
359 | ||
360 | return Mesh and Part | |
361 | ||
362 | end | |
363 | ||
364 | local MakeSFX = function(Parent, Id, Volume, Pitch) | |
365 | ||
366 | local SFX = Instance.new("Sound", Parent) | |
367 | SFX.SoundId = "http://www.roblox.com/asset?id=" .. Id | |
368 | SFX.Name = "SFX" | |
369 | SFX:Play() | |
370 | SFX.Volume = Volume | |
371 | SFX.Pitch = Pitch | |
372 | SFX.PlayOnRemove = true | |
373 | SFX:Remove() | |
374 | ||
375 | end | |
376 | ||
377 | CircleEffect = function(Position, Parent, SX, SY, SZ, Time, Brickcolor, Material, Transparency) | |
378 | ||
379 | local Part = Instance.new("Part", Parent) | |
380 | Part.Transparency = Transparency | |
381 | Part.Name = "CircleEffect" | |
382 | Part.Size = Vector3.new() | |
383 | Part.Anchored = true | |
384 | Part.CanCollide = false | |
385 | Part.Position = Position | |
386 | Part.BrickColor = BrickColor.new(Brickcolor) | |
387 | Part.Material = Material | |
388 | NoOutlines(Part) | |
389 | ||
390 | local Mesh = Instance.new("SpecialMesh", Part) | |
391 | Mesh.MeshType = "Sphere" | |
392 | Mesh.Scale = Vector3.new(0,0,0) | |
393 | ||
394 | Services.Debris:AddItem(Part, Time) | |
395 | ||
396 | ||
397 | table.insert(Effects, {Part, "Circle", Time, SX, SY, SZ}) | |
398 | ||
399 | ||
400 | end | |
401 | ||
402 | BlockEffect = function(Position, Parent, DSX, DSY, DSZ, SX, SY, SZ, Time, Brickcolor, Material, Transparency) | |
403 | ||
404 | local Part = Instance.new("Part", Parent) | |
405 | Part.Transparency = Transparency | |
406 | Part.Name = "BlockEffect" | |
407 | Part.Size = Vector3.new() | |
408 | Part.Anchored = true | |
409 | Part.Position = Position | |
410 | Part.CanCollide = false | |
411 | Part.BrickColor = BrickColor.new(Brickcolor) | |
412 | Part.Material = Material | |
413 | NoOutlines(Part) | |
414 | ||
415 | local Mesh = Instance.new("BlockMesh", Part) | |
416 | Mesh.Scale = Vector3.new(DSX, DSY, DSZ) | |
417 | ||
418 | Services.Debris:AddItem(Part, Time) | |
419 | ||
420 | table.insert(Effects, {Part, "Block", Time, SX, SY, SZ}) | |
421 | ||
422 | ||
423 | end | |
424 | --[[ Uniform ]]-- | |
425 | Uniform = Instance.new("Model", Character) | |
426 | Uniform.Name = "Uniform" | |
427 | ||
428 | local Cloak = Instance.new("Part", Uniform) | |
429 | Cloak.Name = "Cloak" | |
430 | Cloak.CanCollide = false | |
431 | Cloak.BrickColor = BrickColor.new("Institutional white") | |
432 | ||
433 | local CloakMesh = Instance.new("SpecialMesh", Cloak) | |
434 | CloakMesh.MeshId = "http://www.roblox.com/asset?id=16952952" | |
435 | ||
436 | local CloakWeld = CreateWeld(Cloak, CFrame.new(0,-0.25,0) * CFrame.Angles(0,0,0), Head , Cloak, "ArkusToCharacter") | |
437 | ||
438 | Arm1Color = Right_Arm.BrickColor.Color | |
439 | Arm2Color = Left_Arm.BrickColor.Color | |
440 | ||
441 | local TorsoCloak = CreatePart(Uniform, "TorsoCloak", "White", Vector3.new(2, 2, 1), "SmoothPlastic", 0, "Block") | |
442 | ||
443 | local LeftArmCloak = CreatePart(Uniform, "LeftArmCloak", "White", Vector3.new(1, 1.7, 1), "SmoothPlastic", 0, "Block") | |
444 | local RightArmCloak = CreatePart(Uniform, "RightArmCloak", "White", Vector3.new(1, 1.7, 1), "SmoothPlastic", 0, "Block") | |
445 | local LeftArmCloak2 = CreatePart(Uniform, "LeftArmCloak2", "White", Vector3.new(0.6, 0.3, 1), "SmoothPlastic", 0, "Block") | |
446 | local RightArmCloak2 = CreatePart(Uniform, "RightArmCloak2", "White", Vector3.new(0.6, 0.3, 1), "SmoothPlastic", 0, "Block") | |
447 | local LeftArmCloak3 = CreateWedge(Uniform, "LeftArmCloak3", "White", Vector3.new(1.001, 0.3, 0.4), "SmoothPlastic", 0) | |
448 | local RightArmCloak3 = CreateWedge(Uniform, "RightArmCloak3", "White", Vector3.new(1.001, 0.3, 0.4), "SmoothPlastic", 0) | |
449 | local RightArmPart = CreatePart(Uniform, "RightArmPart",Arm1Color, Vector3.new(0.4, 0.3, 1), "SmoothPlastic", 0, "Block") | |
450 | local LeftArmPart = CreatePart(Uniform, "LeftArmPart", Arm2Color, Vector3.new(0.4, 0.3, 1), "SmoothPlastic", 0, "Block") | |
451 | ||
452 | ||
453 | local LeftLegCloak = CreatePart(Uniform, "LeftLegCloak", "White", Vector3.new(1, 1.8, 1), "SmoothPlastic", 0, "Block") | |
454 | local RightLegCloak = CreatePart(Uniform, "RightLegCloak", "White", Vector3.new(1, 1.8, 1), "SmoothPlastic", 0, "Block") | |
455 | local LeftLegCloak2 = CreatePart(Uniform, "LeftLegCloak2", "Dark stone grey", Vector3.new(1, 0.3, 1), "SmoothPlastic", 0, "Block") | |
456 | local RightLegCloak2 = CreatePart(Uniform, "RightLegCloak2", "Dark stone grey", Vector3.new(1, 0.3, 1), "SmoothPlastic", 0, "Block") | |
457 | ||
458 | local LeftLegCloak3 = CreatePart(Uniform, "LeftLegCloak3", "Fossil", Vector3.new(0.8, 0.43, 0.2), "SmoothPlastic", 0, "Block") | |
459 | local RightLegCloak3 = CreatePart(Uniform, "RightLegCloak3", "Fossil", Vector3.new(0.8, 0.43, 0.2), "SmoothPlastic", 0, "Block") | |
460 | ||
461 | local LeftLegCloak3Mesh = CreateMesh(LeftLegCloak3, Vector3.new(1, 1, 0.1), "Block") | |
462 | local RightLegCloak3Mesh = CreateMesh(RightLegCloak3, Vector3.new(1, 1, 0.1), "Block") | |
463 | ||
464 | local BeltPart1 = CreatePart(Uniform, "BeltPart1", "Institutional white", Vector3.new(2.1, 0.3, 1.1), "Granite", 0, "Block") | |
465 | local BeltPart2 = CreatePart(Uniform, "BeltPart2", "Dark stone grey", Vector3.new(2.11, 0.3, 1.11), "SmoothPlastic", 0, "Block") | |
466 | local BeltPart2Mesh = CreateMesh(BeltPart2, Vector3.new(1, 0.5, 1), "Block") | |
467 | local BeltPart3 = CreatePart(Uniform, "BeltPart3", "Dark stone grey", Vector3.new(2.11, 0.3, 1.11), "SmoothPlastic", 0, "Block") | |
468 | local BeltPart3Mesh = CreateMesh(BeltPart3, Vector3.new(1, 0.5, 1), "Block") | |
469 | ||
470 | local UltimateCrystalPocket = CreatePart(Uniform, "UltimateCrystalPocket", "Institutional white", Vector3.new(0.6, 0.2, 0.5), "SmoothPlastic", 0, "Block") | |
471 | UltimateCrystalPocketMesh = Instance.new("CylinderMesh", UltimateCrystalPocket) | |
472 | UltimateCrystalPocketMesh.Scale = Vector3.new(1,0.01,1) | |
473 | ||
474 | local EarthCrystal = CreateCrystal(Uniform, "Earth Crystal", "Burnt Sienna", Vector3.new(), "SmoothPlastic", 0.5,Vector3.new(0.1, 0.2, 0.1)) | |
475 | local FireCrystal = CreateCrystal(Uniform, "Fire Crystal", "Bright red", Vector3.new(), "SmoothPlastic", 0.5,Vector3.new(0.1, 0.2, 0.1)) | |
476 | local WaterCrystal = CreateCrystal(Uniform, "Fire Crystal", "Bright blue", Vector3.new(), "SmoothPlastic", 0.5,Vector3.new(0.1, 0.2, 0.1)) | |
477 | ||
478 | local LightingCrystal = CreateCrystal(Uniform, "Lighting Crystal", "Bright yellow", Vector3.new(), "SmoothPlastic", 0.5,Vector3.new(0.1, 0.2, 0.1)) | |
479 | local PlantCrystal = CreateCrystal(Uniform, "Plant Crystal", "Bright green", Vector3.new(), "SmoothPlastic", 0.5,Vector3.new(0.1, 0.2, 0.1)) | |
480 | local DarknessCrystal = CreateCrystal(Uniform, "Darkness Crystal", "Black", Vector3.new(), "SmoothPlastic", 0.5,Vector3.new(0.1, 0.2, 0.1)) | |
481 | ||
482 | local UltimateCrystal = CreateCrystal(Uniform, "Ultimate Crystal", "Medium stone grey", Vector3.new(), "SmoothPlastic", 0.5,Vector3.new(0.1, 0.2, 0.1)) | |
483 | ||
484 | TorsoCloakWeld = CreateWeld(TorsoCloak, CFrame.new(0,0,0), Torso, TorsoCloak) | |
485 | LeftArmPartWeld = CreateWeld(LeftArmPart, CFrame.new(0.3,1,0), LeftArmCloak, LeftArmPart) | |
486 | RightArmPartWeld = CreateWeld(RightArmPart, CFrame.new(-0.3,1,0), RightArmCloak, RightArmPart) | |
487 | LeftArmCloakWeld = CreateWeld(LeftArmCloak, CFrame.new(0,-0,0), Right_Arm, LeftArmCloak) | |
488 | RightArmCloakWeld = CreateWeld(RightArmCloak, CFrame.new(0,-0,0), Left_Arm, RightArmCloak) | |
489 | LeftArmCloak2Weld = CreateWeld(LeftArmCloak2, CFrame.new(-0.2,1,0), LeftArmCloak, LeftArmCloak2) | |
490 | RightArmCloak2Weld = CreateWeld(RightArmCloak2, CFrame.new(0.2,1,0), RightArmCloak, RightArmCloak2) | |
491 | LeftArmCloak3Weld = CreateWeld(LeftArmCloak3,CFrame.new(0,-0.25,0.8) * CFrame.Angles(1.57,1.57,0), Left_Arm, LeftArmCloak3) | |
492 | RightArmCloak3Weld = CreateWeld(RightArmCloak3,CFrame.new(0,-0.25,0.8) * CFrame.Angles(1.57,-1.57,0), Right_Arm, RightArmCloak3) | |
493 | LeftLegCloakWeld = CreateWeld(LeftLegCloak, CFrame.new(0,-0.1,0), Left_Leg, LeftLegCloak) | |
494 | RightLegCloakWeld = CreateWeld(RightLegCloak, CFrame.new(0,-0.1,0), Right_Leg, RightLegCloak) | |
495 | LeftLegCloak2Weld = CreateWeld(LeftLegCloak2, CFrame.new(0,1.05,0), LeftLegCloak, LeftLegCloak2) | |
496 | RightLegCloak2Weld = CreateWeld(RightLegCloak2, CFrame.new(0,1.05,0), RightLegCloak, RightLegCloak2) | |
497 | LeftLegCloak3Weld = CreateWeld(LeftLegCloak3, CFrame.new(0,-0.1,0.5), LeftLegCloak2, LeftLegCloak3) | |
498 | RightLegCloak3Weld = CreateWeld(RightLegCloak3, CFrame.new(0,-0.1,0.5), RightLegCloak2, RightLegCloak3) | |
499 | BeltPart1Weld = CreateWeld(BeltPart1, CFrame.new(0,1,0), Torso, BeltPart1) | |
500 | BeltPart2Weld = CreateWeld(BeltPart2, CFrame.new(0,0.8,0), Torso, BeltPart2) | |
501 | BeltPart3Weld = CreateWeld(BeltPart3, CFrame.new(0,1.2,0), Torso, BeltPart3) | |
502 | UltimateCrystalPocketWeld = CreateWeld(UltimateCrystalPocket, CFrame.new(-0.5,-0.5,-0.5) * CFrame.Angles(1.57,0,0), Torso, UltimateCrystalPocket) | |
503 | UltimateCrystalWeld = CreateWeld(UltimateCrystal, CFrame.new(0,0,0) * CFrame.Angles(1.57,0,0), UltimateCrystalPocket, UltimateCrystal) | |
504 | EarthCrystalWeld = CreateWeld(EarthCrystal, CFrame.new(0,0.35,0) * CFrame.Angles(1.57,0,0), UltimateCrystalPocket, EarthCrystal) | |
505 | DarknessCrystalWeld = CreateWeld(DarknessCrystal, CFrame.new(0,-0.35,0) * CFrame.Angles(1.57,0,0), UltimateCrystalPocket, DarknessCrystal) | |
506 | ||
507 | FireCrystalWeld = CreateWeld(EarthCrystal, CFrame.new(0.3,0.25,0) * CFrame.Angles(1.57,-0.2,0), UltimateCrystalPocket, FireCrystal) | |
508 | LightingCrystalWeld = CreateWeld(DarknessCrystal, CFrame.new(0.3,0.25,0) * CFrame.Angles(-1.57,0.2,0), UltimateCrystalPocket, LightingCrystal) | |
509 | ||
510 | WaterCrystalWeld = CreateWeld(WaterCrystal, CFrame.new(-0.3,-0.25,0) * CFrame.Angles(-1.57,0.2,0), UltimateCrystalPocket, WaterCrystal) | |
511 | PlantCrystalWeld = CreateWeld(PlantCrystal, CFrame.new(-0.3,-0.25,0) * CFrame.Angles(1.57,-0.2,0), UltimateCrystalPocket, PlantCrystal) | |
512 | ||
513 | Torso.Transparency = 1 | |
514 | Left_Arm.Transparency = 1 | |
515 | Right_Arm.Transparency = 1 | |
516 | Left_Leg.Transparency = 1 | |
517 | Right_Leg.Transparency = 1 | |
518 | ||
519 | ||
520 | ||
521 | --[[ Arkus ]]-- | |
522 | ||
523 | local Arkus = Instance.new("Part", Character) | |
524 | Arkus.Name = "Arkus" | |
525 | Arkus.Size = Vector3.new() | |
526 | ||
527 | local Mesh = Instance.new("SpecialMesh", Arkus) | |
528 | Mesh.Scale = Vector3.new(1.8, 1.8, 2) | |
529 | Mesh.MeshId = "http://www.roblox.com/asset/?id=11442510" | |
530 | Mesh.TextureId = "http://www.roblox.com/asset/?id=12067965" | |
531 | ||
532 | local ArkusWeld = CreateWeld(Arkus, CFrame.new(0,-0.5,0) * CFrame.Angles(-1.57,0,0.6), Torso , Arkus) | |
533 | ||
534 | ||
535 | --[[ Damage function ]]-- | |
536 | ||
537 | ||
538 | function DamageFunction(Hit, Part, Type, HitSFX, Knockback, Min, Max) | |
539 | ||
540 | local HitHumanoid = Hit.Parent.Humanoid | |
541 | ||
542 | ||
543 | local Damage = math.random(Min, Max) | |
544 | ||
545 | ||
546 | coroutine.resume(coroutine.create(function() | |
547 | HitHumanoid:TakeDamage(Damage) | |
548 | end)) | |
549 | ||
550 | if Type == "Normal" then | |
551 | ||
552 | local Push = CreateVelocity(Hit.Parent.Torso, Torso.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge)) | |
553 | Services.Debris:AddItem(Push, 0) | |
554 | DamageLabel(Hit.Parent, Damage, Hit) | |
555 | ||
556 | elseif Type == "Ranged" then | |
557 | local Push = CreateVelocity(Hit.Parent.Torso, Part.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge)) | |
558 | Services.Debris:AddItem(Push, 0) | |
559 | DamageLabel(Hit.Parent, Damage, Hit) | |
560 | ||
561 | elseif Type == "Knockdown" then | |
562 | ||
563 | ||
564 | local Push = CreateVelocity(Hit.Parent.Torso, Part.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge)) | |
565 | DamageLabel(Hit.Parent, Damage, Hit) | |
566 | Services.Debris:AddItem(Push, 0.3) | |
567 | ||
568 | coroutine.resume(coroutine.create(function() | |
569 | ||
570 | HitHumanoid.PlatformStand = true | |
571 | wait(1) | |
572 | HitHumanoid.PlatformStand = false | |
573 | ||
574 | ||
575 | end)) | |
576 | end | |
577 | ||
578 | if HitSFX == "Penetration" then | |
579 | ||
580 | MakeSFX(Hit, 199149269, 1 , 1) | |
581 | ||
582 | elseif HitSFX == "Punch" then | |
583 | ||
584 | MakeSFX(Hit, 278062209, 1 , 1) | |
585 | ||
586 | ||
587 | ||
588 | ||
589 | end | |
590 | end | |
591 | ||
592 | function DamageLabel(HitCharacter, DamageDealt, Hit) | |
593 | ||
594 | local DamageShowingPart = CreatePart(Services.Workspace, "ShowDamage", "Bright yellow", Vector3.new(0.8,0.8,0.8), "Neon", 1, "Block") | |
595 | DamageShowingPart.Position = HitCharacter.Head.Position | |
596 | ||
597 | local DamageGui = Instance.new("BillboardGui", DamageShowingPart) | |
598 | DamageGui.Name = "Damage" | |
599 | DamageGui.AlwaysOnTop = true | |
600 | DamageGui.Size = UDim2.new(5, 0, 5, 0) | |
601 | ||
602 | local DamageNumber = Instance.new("TextLabel", DamageGui) | |
603 | DamageNumber.Size = UDim2.new(1,0,1,0) | |
604 | if Hit.Parent:FindFirstChild("Head") then | |
605 | DamageNumber.TextStrokeColor3 = Hit.Parent.Head.BrickColor.Color | |
606 | DamageNumber.TextColor3 = Hit.BrickColor.Color | |
607 | end | |
608 | DamageNumber.TextStrokeTransparency = 0 | |
609 | DamageNumber.BackgroundTransparency = 1 | |
610 | DamageNumber.Font = "SourceSansBold" | |
611 | DamageNumber.TextScaled = true | |
612 | DamageNumber.Text = DamageDealt | |
613 | ||
614 | local BodyVelocity = Instance.new("BodyVelocity", DamageShowingPart) | |
615 | BodyVelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
616 | BodyVelocity.Velocity = Vector3.new(0,2,0) | |
617 | ||
618 | Services.Debris:AddItem(DamageShowingPart, 3) | |
619 | ||
620 | ||
621 | end | |
622 | ||
623 | function ValidateDamage(Part, Distance ,Min , Max, Type, HitSFX, Knockback) | |
624 | for _,WorkspaceChildren in pairs(workspace:children()) do | |
625 | ||
626 | local HitHumanoid = WorkspaceChildren:findFirstChild("Humanoid") | |
627 | ||
628 | if HitHumanoid ~= nil then | |
629 | local Hit = WorkspaceChildren:findFirstChild("Torso") | |
630 | ||
631 | if Hit ~= nil then | |
632 | ||
633 | local Target = Hit.Position - Part.Position | |
634 | ||
635 | local Magnitude = Target.magnitude | |
636 | ||
637 | if Magnitude <= Distance and WorkspaceChildren.Name ~= Player.Name then | |
638 | ||
639 | local HitBlock = Hit.Parent:FindFirstChild("Block") | |
640 | ||
641 | if HitBlock ~= nil and HitBlock:FindFirstChild("BlockDurability") and HitBlock.Value == true then | |
642 | ||
643 | local HitBlock2 = Hit.Parent.Block.BlockDurability | |
644 | ||
645 | if HitBlock2.Value > 15 then | |
646 | ||
647 | local HitN = math.random(1,5) | |
648 | ||
649 | HitBlock2.Value = HitBlock2.Value - 15 | |
650 | ||
651 | ||
652 | if HitN == 1 then | |
653 | MakeSFX(Hit ,199148971, 0.5, 1) | |
654 | end | |
655 | ||
656 | if HitN == 2 then | |
657 | MakeSFX(Hit ,199149025, 0.5, 1) | |
658 | end | |
659 | ||
660 | if HitN == 3 then | |
661 | MakeSFX(Hit ,199149072, 0.5, 1) | |
662 | end | |
663 | ||
664 | if HitN == 4 then | |
665 | MakeSFX(Hit ,199149109, 0.5, 1) | |
666 | end | |
667 | ||
668 | if HitN == 5 then | |
669 | MakeSFX(Hit ,199149119, 0.5, 1) | |
670 | end | |
671 | return | |
672 | end | |
673 | end | |
674 | ||
675 | DamageFunction(Hit, Part, Type, HitSFX, Knockback, Min, Max) | |
676 | ||
677 | ||
678 | ||
679 | end | |
680 | end | |
681 | end | |
682 | end | |
683 | end | |
684 | ||
685 | ||
686 | ||
687 | --[[ Attacks ]]-- | |
688 | ||
689 | ||
690 | ||
691 | function ArktizuAttack1() | |
692 | ||
693 | Attacking = true | |
694 | MakeSFX(Left_Arm, 320557563, 1, 1) | |
695 | ||
696 | for i = 1,6 do | |
697 | ||
698 | wait() | |
699 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,-1.6),0.2) | |
700 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,0,1),0.2) | |
701 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0,CFrame.new(1,0.3,-0.5) * CFrame.Angles(0.8,0,-1), 0.3) | |
702 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-2,0.5,-0.5) * CFrame.Angles(1.57,0,-1), 0.5) | |
703 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,0),0.2) | |
704 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
705 | ||
706 | end | |
707 | ||
708 | ValidateDamage(Left_Arm, 3 ,10 , 14, "Normal", "Punch", 5) | |
709 | ||
710 | Attacking = false | |
711 | ||
712 | ||
713 | end | |
714 | ||
715 | ||
716 | function ArktizuAttack2() | |
717 | ||
718 | Attacking = true | |
719 | MakeSFX(Right_Arm, 320557563, 1, 1) | |
720 | ||
721 | for i = 1,6 do | |
722 | ||
723 | wait() | |
724 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,1.6),0.2) | |
725 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,0,-1),0.2) | |
726 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0,CFrame.new(2,0.5,-0.5) * CFrame.Angles(1.57,0,1), 0.3) | |
727 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1,0.3,-0.5) * CFrame.Angles(0.8,0,1), 0.3) | |
728 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,0),0.2) | |
729 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
730 | ||
731 | end | |
732 | ||
733 | ValidateDamage(Right_Arm, 3 ,10 , 14, "Normal", "Punch", 5) | |
734 | ||
735 | Attacking = false | |
736 | ||
737 | ||
738 | end | |
739 | ||
740 | function ArktizuAttack3() | |
741 | ||
742 | Attacking = true | |
743 | MakeSFX(Right_Leg, 320557563, 1, 1) | |
744 | ||
745 | for i = 1,6 do | |
746 | ||
747 | wait() | |
748 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,1.6),0.5) | |
749 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,0,-1),0.2) | |
750 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(0.8, 0.5, -0.8) * CFrame.Angles(1.8,0,-1), 0.3) | |
751 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-0.8, 0.5, -0.8) * CFrame.Angles(1.8,0,1), 0.4) | |
752 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(0.5,-1,0.5) * CFrame.Angles(0,0,1.6),0.3) | |
753 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-0.5,-1,-0.5) * CFrame.Angles(0,-3.2,0),0.3) | |
754 | ||
755 | end | |
756 | ||
757 | ValidateDamage(Right_Leg, 3 ,10 , 14, "Normal", "Punch", 5) | |
758 | ||
759 | Attacking = false | |
760 | ||
761 | ||
762 | end | |
763 | ||
764 | function ArktizuAttack4() | |
765 | ||
766 | Attacking = true | |
767 | MakeSFX(Left_Leg, 320557563, 1, 1) | |
768 | ||
769 | for i = 1,6 do | |
770 | ||
771 | wait() | |
772 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,-1.6),0.5) | |
773 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,0,1),0.2) | |
774 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(0.8, 0.5, -0.8) * CFrame.Angles(1.8,0,-1), 0.3) | |
775 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-0.8, 0.5, -0.8) * CFrame.Angles(1.8,0,1), 0.4) | |
776 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(0.5,-1,-0.5) * CFrame.Angles(0,3.2,0),0.3) | |
777 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-0.5,-1,-0.5) * CFrame.Angles(0,0,-1.6),0.3) | |
778 | ||
779 | end | |
780 | ||
781 | ValidateDamage(Left_Leg, 3 ,10 , 14, "Normal", "Punch", 5) | |
782 | ||
783 | Attacking = false | |
784 | ||
785 | ||
786 | end | |
787 | ||
788 | function Unseath() | |
789 | ||
790 | Attacking = true | |
791 | Unseathed = true | |
792 | ||
793 | local Unseath = Instance.new("Sound", Arkus) | |
794 | Unseath.SoundId = "rbxasset://sounds\\unsheath.wav" | |
795 | Unseath.PlayOnRemove = true | |
796 | Unseath:Play() | |
797 | wait() | |
798 | Unseath:Remove() | |
799 | ||
800 | for i = 1,6 do | |
801 | wait() | |
802 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0.5),0.2) | |
803 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.2,0,-0.3),0.3) | |
804 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0,CFrame.new(1.3,1,0) * CFrame.Angles(3.8,0,0.8), 0.3) | |
805 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5,0.3,0) * CFrame.Angles(0,0,-0.2), 0.3) | |
806 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,0),0.2) | |
807 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
808 | ||
809 | end | |
810 | ||
811 | ArkusWeld.Part1 = Right_Arm | |
812 | ArkusWeld.C0 = CFrame.new(1.1,0.3,-2.2)* CFrame.Angles(3.2,0.1,-1.6) | |
813 | ||
814 | for i = 1,6 do | |
815 | wait() | |
816 | ||
817 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0.5),0.2) | |
818 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.2,0,-0.3),0.3) | |
819 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0,CFrame.new(1.5,0.1,0) * CFrame.Angles(0,0,0.2), 0.3) | |
820 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5,0.1,0) * CFrame.Angles(0,0,-0.2), 0.3) | |
821 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,0),0.2) | |
822 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
823 | ||
824 | end | |
825 | ||
826 | Attacking = false | |
827 | ||
828 | ||
829 | end | |
830 | ||
831 | function Seath() | |
832 | ||
833 | Attacking = true | |
834 | Unseathed = false | |
835 | local Unseath = Instance.new("Sound", Arkus) | |
836 | Unseath.SoundId = "rbxasset://sounds\\unsheath.wav" | |
837 | Unseath.PlayOnRemove = true | |
838 | Unseath:Play() | |
839 | wait() | |
840 | Unseath:Remove() | |
841 | ||
842 | for i = 1,6 do | |
843 | wait() | |
844 | ||
845 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0.5),0.2) | |
846 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.2,0,-0.3),0.3) | |
847 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0,CFrame.new(1.3,1,0) * CFrame.Angles(3.8,0,-0.2), 0.3) | |
848 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5,0.3,0) * CFrame.Angles(0,0,-0.2), 0.3) | |
849 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,0),0.2) | |
850 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
851 | ||
852 | end | |
853 | ||
854 | ArkusWeld.Part1 = Torso | |
855 | ArkusWeld.C0 = CFrame.new(0,-0.5,0) * CFrame.Angles(-1.57,0,0.6) | |
856 | ||
857 | for i = 1,6 do | |
858 | wait() | |
859 | ||
860 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0.5),0.2) | |
861 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.2,0,-0.3),0.3) | |
862 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0,CFrame.new(1.3,1,0) * CFrame.Angles(3.8,0,-0.2), 0.3) | |
863 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5,0.3,0) * CFrame.Angles(0,0,-0.2), 0.3) | |
864 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,0),0.2) | |
865 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
866 | ||
867 | end | |
868 | ||
869 | Attacking = false | |
870 | ||
871 | ||
872 | end | |
873 | ||
874 | ||
875 | --[[ Tool & Tool Functions ]]-- | |
876 | ||
877 | local Tool = Instance.new("HopperBin", Player.Backpack) | |
878 | Tool.Name = "Arkus" | |
879 | ||
880 | Tool.Selected:connect(function(Mouse) | |
881 | ||
882 | Mouse.Button1Down:connect(function() | |
883 | if not Attacking and Equipped and not Unseathed then | |
884 | ||
885 | if Combo == 1 then | |
886 | ||
887 | ArktizuAttack1() | |
888 | Combo = 2 | |
889 | ||
890 | elseif Combo == 2 then | |
891 | ||
892 | ArktizuAttack2() | |
893 | Combo = 3 | |
894 | ||
895 | elseif Combo == 3 then | |
896 | ||
897 | ArktizuAttack3() | |
898 | Combo = 4 | |
899 | ||
900 | elseif Combo == 4 then | |
901 | ||
902 | ArktizuAttack4() | |
903 | Combo = 1 | |
904 | ||
905 | elseif not Attacking and Equipped and Unseathed then | |
906 | ||
907 | ||
908 | end | |
909 | ||
910 | ||
911 | end | |
912 | end) | |
913 | ||
914 | Mouse.KeyDown:connect(function(Key) | |
915 | ||
916 | if Key == "y" and not Attacking then | |
917 | ||
918 | if Running == false then | |
919 | Running = true | |
920 | ||
921 | Humanoid.WalkSpeed = 50 | |
922 | Humanoid.JumpPower = 150 | |
923 | ||
924 | ||
925 | elseif Running == true then | |
926 | Running = false | |
927 | ||
928 | Humanoid.WalkSpeed = 10 | |
929 | Humanoid.JumpPower = 50 | |
930 | ||
931 | end | |
932 | ||
933 | end | |
934 | ||
935 | if Key == "q" and Equipped and not Attacking then | |
936 | ||
937 | if not Unseathed then | |
938 | Unseath() | |
939 | Combo = 1 | |
940 | ||
941 | elseif Unseathed then | |
942 | ||
943 | Seath() | |
944 | Combo = 1 | |
945 | ||
946 | end | |
947 | ||
948 | end | |
949 | ||
950 | ||
951 | if Key == "e" then | |
952 | ||
953 | if Equipped == false then | |
954 | Equipped = true | |
955 | ||
956 | elseif Equipped == true and not Unseathed then | |
957 | Equipped = false | |
958 | ||
959 | elseif Unseathed and Equipped == true then | |
960 | Seath() | |
961 | Equipped = false | |
962 | ||
963 | ||
964 | end | |
965 | end | |
966 | end) | |
967 | ||
968 | Mouse.KeyUp:connect(function(Key) | |
969 | ||
970 | end) | |
971 | end) | |
972 | ||
973 | ||
974 | --[[ CLerp Declarations ]]-- | |
975 | ||
976 | function clerp(a,b,t) | |
977 | local qa = {QuaternionFromCFrame(a)} | |
978 | local qb = {QuaternionFromCFrame(b)} | |
979 | local ax, ay, az = a.x, a.y, a.z | |
980 | local bx, by, bz = b.x, b.y, b.z | |
981 | local _t = 1-t | |
982 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
983 | end | |
984 | ||
985 | function QuaternionFromCFrame(cf) | |
986 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
987 | local trace = m00 + m11 + m22 | |
988 | if trace > 0 then | |
989 | local s = math.sqrt(1 + trace) | |
990 | local recip = 0.5/s | |
991 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
992 | else | |
993 | local i = 0 | |
994 | if m11 > m00 then | |
995 | i = 1 | |
996 | end | |
997 | if m22 > (i == 0 and m00 or m11) then | |
998 | i = 2 | |
999 | end | |
1000 | if i == 0 then | |
1001 | local s = math.sqrt(m00-m11-m22+1) | |
1002 | local recip = 0.5/s | |
1003 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
1004 | elseif i == 1 then | |
1005 | local s = math.sqrt(m11-m22-m00+1) | |
1006 | local recip = 0.5/s | |
1007 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
1008 | elseif i == 2 then | |
1009 | local s = math.sqrt(m22-m00-m11+1) | |
1010 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
1011 | end | |
1012 | end | |
1013 | end | |
1014 | ||
1015 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
1016 | local xs, ys, zs = x + x, y + y, z + z | |
1017 | local wx, wy, wz = w*xs, w*ys, w*zs | |
1018 | local xx = x*xs | |
1019 | local xy = x*ys | |
1020 | local xz = x*zs | |
1021 | local yy = y*ys | |
1022 | local yz = y*zs | |
1023 | local zz = z*zs | |
1024 | 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)) | |
1025 | end | |
1026 | ||
1027 | function QuaternionSlerp(a, b, t) | |
1028 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
1029 | local startInterp, finishInterp; | |
1030 | if cosTheta >= 0.0001 then | |
1031 | if (1 - cosTheta) > 0.0001 then | |
1032 | local theta = math.acos(cosTheta) | |
1033 | local invSinTheta = 1/math.sin(theta) | |
1034 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
1035 | finishInterp = math.sin(t*theta)*invSinTheta | |
1036 | else | |
1037 | startInterp = 1-t | |
1038 | finishInterp = t | |
1039 | end | |
1040 | else | |
1041 | if (1+cosTheta) > 0.0001 then | |
1042 | local theta = math.acos(-cosTheta) | |
1043 | local invSinTheta = 1/math.sin(theta) | |
1044 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
1045 | finishInterp = math.sin(t*theta)*invSinTheta | |
1046 | else | |
1047 | startInterp = t-1 | |
1048 | finishInterp = t | |
1049 | end | |
1050 | end | |
1051 | 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 | |
1052 | end | |
1053 | ||
1054 | function RayCast(Pos, Dir, Max, Ignore) | |
1055 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
1056 | end | |
1057 | ||
1058 | --[[ CLerp Animations ]]-- | |
1059 | Change1 = 0 | |
1060 | Change2 = 0 | |
1061 | Change3 = 0 | |
1062 | Change4 = 0 | |
1063 | ||
1064 | coroutine.resume(coroutine.create(function() | |
1065 | while true do | |
1066 | local Torvel = (Root.Velocity*Vector3.new(1,0,1)).magnitude | |
1067 | local Velderp = Root.Velocity.y | |
1068 | HitFloor,PosFloor = RayCast(Root.Position,(CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
1069 | ||
1070 | wait() | |
1071 | if 30 <= Torvel and HitFloor ~= nil then | |
1072 | ||
1073 | Anim = "Running" | |
1074 | WalkForward = true | |
1075 | Walk = Walk + 1 | |
1076 | if 15 - 5 * Movemment <= Walk then | |
1077 | Walk = 0 | |
1078 | if WalkForward == true then | |
1079 | WalkForward = false | |
1080 | else | |
1081 | if WalkForward == false then | |
1082 | WalkForward = true | |
1083 | end | |
1084 | end | |
1085 | end | |
1086 | ||
1087 | if Attacking == false then | |
1088 | ||
1089 | if Invert == false then | |
1090 | ||
1091 | Change2 = Change2 + 2 | |
1092 | ||
1093 | elseif Invert == true then | |
1094 | ||
1095 | Change2 = Change2 - 2 | |
1096 | ||
1097 | end | |
1098 | ||
1099 | if Change2 > 0.1 then | |
1100 | ||
1101 | Invert = true | |
1102 | ||
1103 | elseif Change2 < -0.1 then | |
1104 | ||
1105 | Invert = false | |
1106 | ||
1107 | ||
1108 | ||
1109 | end | |
1110 | end | |
1111 | end | |
1112 | end | |
1113 | end)) | |
1114 | ||
1115 | while true do | |
1116 | ||
1117 | wait() | |
1118 | ||
1119 | local Torvel = (Root.Velocity*Vector3.new(1,0,1)).magnitude | |
1120 | local Velderp = Root.Velocity.y | |
1121 | HitFloor,PosFloor = RayCast(Root.Position,(CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
1122 | ||
1123 | if Torvel < 1 and HitFloor ~= nil and Attacking == false then | |
1124 | Anim = "Idle" | |
1125 | Jump = false | |
1126 | if Equipped == false then | |
1127 | ||
1128 | ||
1129 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
1130 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.2,0,-0.3),0.3) | |
1131 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(0.21,0.5, -1) * CFrame.Angles(1.6,0,-1.3), 0.3) | |
1132 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-0.21,0.5,-1) * CFrame.Angles(1.6,0,1.3), 0.3) | |
1133 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,0),0.2) | |
1134 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
1135 | ||
1136 | ||
1137 | elseif Equipped and Unseathed then | |
1138 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0.5),0.2) | |
1139 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.2,0,-0.3),0.3) | |
1140 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0,CFrame.new(1.5,0.2,0) * CFrame.Angles(0,0,0.2), 0.3) | |
1141 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5,0.2,0) * CFrame.Angles(0,0,-0.2), 0.3) | |
1142 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,0),0.2) | |
1143 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
1144 | ||
1145 | elseif Equipped == true then | |
1146 | ||
1147 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0.5),0.2) | |
1148 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.2,0,-0.3),0.3) | |
1149 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0,CFrame.new(1.3,1,0) * CFrame.Angles(3.8,0,-0.2), 0.3) | |
1150 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5,0.3,0) * CFrame.Angles(0,0,-0.2), 0.3) | |
1151 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,0),0.2) | |
1152 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
1153 | ||
1154 | ||
1155 | end | |
1156 | end | |
1157 | ||
1158 | ||
1159 | if 2 < Torvel and Torvel < 22 and HitFloor ~= nil and Attacking == false then | |
1160 | Anim = "Walking" | |
1161 | WalkForward = true | |
1162 | Walk = Walk + 1 | |
1163 | if 15 - 5 * Movemment <= Walk then | |
1164 | Walk = 0 | |
1165 | if WalkForward == true then | |
1166 | WalkForward = false | |
1167 | else | |
1168 | if WalkForward == false then | |
1169 | WalkForward = true | |
1170 | end | |
1171 | end | |
1172 | end | |
1173 | ||
1174 | ||
1175 | if Invert == false then | |
1176 | Change1 = Change1 + 0.1 | |
1177 | ||
1178 | elseif Invert == true then | |
1179 | ||
1180 | Change1 = Change1 - 0.1 | |
1181 | ||
1182 | end | |
1183 | ||
1184 | if Change1 > 0.5 then | |
1185 | ||
1186 | Invert = true | |
1187 | ||
1188 | elseif Change1 < -0.5 then | |
1189 | ||
1190 | Invert = false | |
1191 | ||
1192 | ||
1193 | ||
1194 | end | |
1195 | ||
1196 | Jump = false | |
1197 | if Attacking == false then | |
1198 | ||
1199 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0.2,0,0),0.2) | |
1200 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.1,0,0),0.3) | |
1201 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0.2, -Change1) * CFrame.Angles(Change1,0,0), 0.3) | |
1202 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0.2, Change1) * CFrame.Angles(-Change1,0,0), 0.3) | |
1203 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-Change1 / 4)*CFrame.Angles(Change1 + 0.1,1.6,0),0.2) | |
1204 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,Change1 / 4)*CFrame.Angles(-Change1 + 0.1,-1.6,0),0.2) | |
1205 | ||
1206 | end | |
1207 | end | |
1208 | ||
1209 | if Root.Velocity.y > 1 and HitFloor == nil and Attacking == false then | |
1210 | ||
1211 | Anim = "Jump" | |
1212 | Jump = false | |
1213 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
1214 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(-0.5,0,0),0.3) | |
1215 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0.2, 0.2) * CFrame.Angles(-0.4,0,0.2), 0.3) | |
1216 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0.2, 0.2) * CFrame.Angles(-0.4,0,-0.2), 0.3) | |
1217 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-0.2)*CFrame.Angles(-0.2,1.6,0),0.2) | |
1218 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
1219 | ||
1220 | ||
1221 | end | |
1222 | ||
1223 | if Root.Velocity.y < -1 and HitFloor == nil and Attacking == false then | |
1224 | ||
1225 | Anim = "Falling" | |
1226 | Jump = true | |
1227 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
1228 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.5,0,0),0.3) | |
1229 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0.2, -0.2) * CFrame.Angles(0.4,0,0.2), 0.3) | |
1230 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0.2, -0.2) * CFrame.Angles(0.4,0,-0.2), 0.3) | |
1231 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-0.2)*CFrame.Angles(-0.2,1.6,0),0.2) | |
1232 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
1233 | ||
1234 | end | |
1235 | ||
1236 | if 30 <= Torvel and HitFloor ~= nil then | |
1237 | Jump = false | |
1238 | Anim = "Running" | |
1239 | WalkForward = true | |
1240 | Walk = Walk + 1 | |
1241 | if 15 - 5 * Movemment <= Walk then | |
1242 | Walk = 0 | |
1243 | if WalkForward == true then | |
1244 | WalkForward = false | |
1245 | else | |
1246 | if WalkForward == false then | |
1247 | WalkForward = true | |
1248 | end | |
1249 | end | |
1250 | end | |
1251 | ||
1252 | if Attacking == false then | |
1253 | ||
1254 | ||
1255 | ||
1256 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,-0.2,0)* CFrame.Angles(1,0,0),0.2) | |
1257 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(-0.5,0,0),0.3) | |
1258 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0.3, 0.5) * CFrame.Angles(-1,0,0), 0.3) | |
1259 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0.3, 0.5) * CFrame.Angles(-1,0,0), 0.3) | |
1260 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-Change2 / 4)*CFrame.Angles(Change2 + 0.5,1.6,0),0.5) | |
1261 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,Change2 / 4)*CFrame.Angles(-Change2 + 0.5,-1.6,0),0.5) | |
1262 | ||
1263 | end | |
1264 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0) * CFrame.Angles(0,1.6,0),0.2) | |
1265 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0) * CFrame.Angles(0,-1.6,0),0.2) | |
1266 | ||
1267 | end | |
1268 | ||
1269 | for i,v in pairs(Character:children()) do | |
1270 | ||
1271 | if v:IsA("Shirt") then | |
1272 | ||
1273 | v:Remove() | |
1274 | ||
1275 | elseif v:IsA("Pants") then | |
1276 | ||
1277 | v:Remove() | |
1278 | ||
1279 | elseif v:IsA("Hat") then | |
1280 | ||
1281 | v:Remove() | |
1282 | ||
1283 | elseif v:IsA("ShirtGraphic") then | |
1284 | ||
1285 | v:Remove() | |
1286 | ||
1287 | ||
1288 | for a,x in pairs(v:children()) do | |
1289 | ||
1290 | if x:IsA("Decal") then | |
1291 | ||
1292 | x:Remove() | |
1293 | ||
1294 | end | |
1295 | end | |
1296 | end | |
1297 | end | |
1298 | ||
1299 | ||
1300 | if #Effects > 0 then | |
1301 | for E = 1, #Effects do | |
1302 | if Effects[E]~=nil then | |
1303 | local Effect = Effects[E] | |
1304 | ||
1305 | if Effect ~= nil then | |
1306 | ||
1307 | local Part = Effect[1] | |
1308 | local Mode = Effect[2] | |
1309 | local Time = Effect[3] | |
1310 | local SizeX = Effect[4] | |
1311 | local SizeY = Effect[5] | |
1312 | local SizeZ = Effect[6] | |
1313 | ||
1314 | if Effect[1].Transparency <= 1 then | |
1315 | if Effect[2] == "Block" then | |
1316 | Effect[1].CFrame = Effect[1].CFrame * CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1317 | ||
1318 | Mesh = Effect[1]:FindFirstChild("Mesh") | |
1319 | if Mesh ~= nil then | |
1320 | Mesh.Scale = Mesh.Scale + Vector3.new(Effect[4],Effect[5],Effect[6]) | |
1321 | end | |
1322 | ||
1323 | elseif Effect[2] == "Circle" then | |
1324 | ||
1325 | if Effect[1]:FindFirstChild("Mesh") ~= nil then | |
1326 | Mesh=Effect[1].Mesh | |
1327 | Mesh.Scale = Mesh.Scale + Vector3.new(Effect[4],Effect[5],Effect[6]) | |
1328 | end | |
1329 | ||
1330 | else | |
1331 | ||
1332 | Part.Parent=nil | |
1333 | ||
1334 | table.remove(Effects, E) | |
1335 | ||
1336 | end | |
1337 | end | |
1338 | end | |
1339 | end | |
1340 | end | |
1341 | end | |
1342 | end |