SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
2 | local Player,game,owner = owner,game | |
3 | local RealPlayer = Player | |
4 | do | |
5 | print("FE Compatibility code by Mokiros | Created by zach | BOBOH SELL RICE TIME") | |
6 | local rp = RealPlayer | |
7 | script.Parent = rp.Character | |
8 | ||
9 | --RemoteEvent for communicating | |
10 | local Event = Instance.new("RemoteEvent") | |
11 | Event.Name = "UserInput_Event" | |
12 | ||
13 | --Fake event to make stuff like Mouse.KeyDown work | |
14 | local function fakeEvent() | |
15 | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end} | |
16 | t.connect = t.Connect | |
17 | return t | |
18 | end | |
19 | ||
20 | --Creating fake input objects with fake variables | |
21 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
22 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
23 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
24 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
25 | end} | |
26 | --Merged 2 functions into one by checking amount of arguments | |
27 | CAS.UnbindAction = CAS.BindAction | |
28 | ||
29 | --This function will trigger the events that have been :Connect()'ed | |
30 | local function te(self,ev,...) | |
31 | local t = m[ev] | |
32 | if t and t._fakeEvent then | |
33 | for _,f in pairs(t.Functions) do | |
34 | f(...) | |
35 | end | |
36 | end | |
37 | end | |
38 | m.TrigEvent = te | |
39 | UIS.TrigEvent = te | |
40 | ||
41 | Event.OnServerEvent:Connect(function(plr,io) | |
42 | if plr~=rp then return end | |
43 | m.Target = io.Target | |
44 | m.Hit = io.Hit | |
45 | if not io.isMouse then | |
46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
49 | end | |
50 | for _,t in pairs(CAS.Actions) do | |
51 | for _,k in pairs(t.Keys) do | |
52 | if k==io.KeyCode then | |
53 | t.Function(t.Name,io.UserInputState,io) | |
54 | end | |
55 | end | |
56 | end | |
57 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
59 | end | |
60 | end) | |
61 | Event.Parent = NLS([==[ | |
62 | local Player = game:GetService("Players").LocalPlayer | |
63 | local Event = script:WaitForChild("UserInput_Event") | |
64 | ||
65 | local Mouse = Player:GetMouse() | |
66 | local UIS = game:GetService("UserInputService") | |
67 | local input = function(io,a) | |
68 | if a then return end | |
69 | --Since InputObject is a client-side instance, we create and pass table instead | |
70 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
71 | end | |
72 | UIS.InputBegan:Connect(input) | |
73 | UIS.InputEnded:Connect(input) | |
74 | ||
75 | local h,t | |
76 | --Give the server mouse data 30 times every second, but only if the values changed | |
77 | --If player is not moving their mouse, client won't fire events | |
78 | while wait(1/30) do | |
79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
80 | h,t=Mouse.Hit,Mouse.Target | |
81 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
82 | end | |
83 | end]==],Player.Character) | |
84 | ||
85 | ----Sandboxed game object that allows the usage of client-side methods and services | |
86 | --Real game object | |
87 | local _rg = game | |
88 | ||
89 | --Metatable for fake service | |
90 | local fsmt = { | |
91 | __index = function(self,k) | |
92 | local s = rawget(self,"_RealService") | |
93 | if s then return s[k] end | |
94 | end, | |
95 | __newindex = function(self,k,v) | |
96 | local s = rawget(self,"_RealService") | |
97 | if s then s[k]=v end | |
98 | end, | |
99 | __call = function(self,...) | |
100 | local s = rawget(self,"_RealService") | |
101 | if s then return s(...) end | |
102 | end | |
103 | } | |
104 | local function FakeService(t,RealService) | |
105 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
106 | return setmetatable(t,fsmt) | |
107 | end | |
108 | ||
109 | --Fake game object | |
110 | local g = { | |
111 | GetService = function(self,s) | |
112 | return self[s] | |
113 | end, | |
114 | Players = FakeService({ | |
115 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player) | |
116 | },"Players"), | |
117 | UserInputService = FakeService(UIS,"UserInputService"), | |
118 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
119 | } | |
120 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
121 | g.service = g.GetService | |
122 | ||
123 | g.RunService = FakeService({ | |
124 | RenderStepped = _rg:GetService("RunService").Heartbeat, | |
125 | BindToRenderStep = function(self,name,_,fun) | |
126 | ||
127 | end, | |
128 | UnbindFromRenderStep = function(self,name) | |
129 | self._btrs[name]:Disconnect() | |
130 | end, | |
131 | },"RunService") | |
132 | ||
133 | setmetatable(g,{ | |
134 | __index=function(self,s) | |
135 | return _rg:GetService(s) or typeof(_rg[s])=="function" | |
136 | and function(_,...)return _rg[s](_rg,...)end or _rg[s] | |
137 | end, | |
138 | __newindex = fsmt.__newindex, | |
139 | __call = fsmt.__call | |
140 | }) | |
141 | --Changing owner to fake player object to support owner:GetMouse() | |
142 | game,owner = g,g.Players.LocalPlayer | |
143 | end | |
144 | ||
145 | ||
146 | warn(" Credit by Ishlink ") | |
147 | warn(" Was converted by zachrogamehard ") | |
148 | Player = game:GetService("Players").LocalPlayer | |
149 | Character = Player.Character | |
150 | PlayerGui = Player.PlayerGui | |
151 | Backpack = Player.Backpack | |
152 | Torso = Character.Torso | |
153 | Head = Character.Head | |
154 | Humanoid = Character.Humanoid | |
155 | RootPart = Character.HumanoidRootPart | |
156 | RootJoint = RootPart.RootJoint | |
157 | LeftArm = Character["Left Arm"] | |
158 | LeftLeg = Character["Left Leg"] | |
159 | RightArm = Character["Right Arm"] | |
160 | RightLeg = Character["Right Leg"] | |
161 | LS = Torso["Left Shoulder"] | |
162 | LH = Torso["Left Hip"] | |
163 | RS = Torso["Right Shoulder"] | |
164 | RH = Torso["Right Hip"] | |
165 | Humanoid.MaxHealth = math.huge | |
166 | wait() | |
167 | Humanoid.Health = Humanoid.MaxHealth | |
168 | local BC = Character["Body Colors"] | |
169 | BC.HeadColor = BrickColor.new("Pastel brown") | |
170 | BC.LeftArmColor = BrickColor.new("Pastel brown") | |
171 | BC.LeftLegColor = BrickColor.new("Pastel brown") | |
172 | BC.RightArmColor = BrickColor.new("Pastel brown") | |
173 | BC.RightLegColor = BrickColor.new("Pastel brown") | |
174 | BC.TorsoColor = BrickColor.new("Pastel brown") | |
175 | for i,v in pairs(Character:children()) do | |
176 | if v:IsA("Shirt") then | |
177 | v:Destroy() | |
178 | end | |
179 | end | |
180 | for i,v in pairs(Character:children()) do | |
181 | if v:IsA("Pants") then | |
182 | v:Destroy() | |
183 | end | |
184 | end | |
185 | ||
186 | CV="White" | |
187 | ||
188 | p = game.Players.LocalPlayer | |
189 | char = p.Character | |
190 | local txt = Instance.new("BillboardGui", char) | |
191 | txt.Adornee = char .Head | |
192 | txt.Name = "_status" | |
193 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
194 | txt.StudsOffset = Vector3.new(-9, 5, 0) | |
195 | local text = Instance.new("TextLabel", txt) | |
196 | text.Size = UDim2.new(10, 0, 7, 0) | |
197 | text.FontSize = "Size24" | |
198 | text.TextScaled = true | |
199 | text.TextTransparency = 0 | |
200 | text.BackgroundTransparency = 1 | |
201 | text.TextTransparency = 0 | |
202 | text.TextStrokeTransparency = 1 | |
203 | text.Font = "Bodoni" | |
204 | text.TextStrokeColor3 = Color3.new(0,0,255) | |
205 | ||
206 | v=Instance.new("Part") | |
207 | v.Name = "ColorBrick" | |
208 | v.Parent=p.Character | |
209 | v.FormFactor="Symmetric" | |
210 | v.Anchored=true | |
211 | v.CanCollide=false | |
212 | v.BottomSurface="Smooth" | |
213 | v.TopSurface="Smooth" | |
214 | v.Size=Vector3.new(10,5,3) | |
215 | v.Transparency=1 | |
216 | v.CFrame=char.Torso.CFrame | |
217 | v.BrickColor=BrickColor.new(CV) | |
218 | v.Transparency=1 | |
219 | text.TextColor3 = Color3.new(255,255,0) | |
220 | v.Shape="Block" | |
221 | - | text.Text = "SLAV" |
221 | + | text.Text = "Totally not a russian person" |
222 | ||
223 | shirt = Instance.new("Shirt", Character) | |
224 | shirt.Name = "Shirt" | |
225 | pants = Instance.new("Pants", Character) | |
226 | pants.Name = "Pants" | |
227 | Character.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1053903933" | |
228 | Character.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=970235340" | |
229 | Character.Head.face.Texture = "rbxassetid://42070872" | |
230 | - | sound.SoundId = "rbxassetid://1095412940" |
230 | + | |
231 | sound.SoundId = "rbxassetid://1365514818" | |
232 | sound.Volume = 100000000 | |
233 | sound.EmitterSize = 25 | |
234 | sound:Play() | |
235 | sound.Looped = true | |
236 | Face = Head.face | |
237 | Neck = Torso.Neck | |
238 | it = Instance.new | |
239 | vt = Vector3.new | |
240 | cf = CFrame.new | |
241 | rad = math.rad | |
242 | euler = CFrame.fromEulerAnglesXYZ | |
243 | angles = CFrame.Angles | |
244 | Mouse = Player:GetMouse() | |
245 | coroutine.resume(coroutine.create(function() | |
246 | game.StarterGui:SetCore("ChatMakeSystemMessage", { | |
247 | Text = "Fixed by PixelFir3 / Cortana#8155"; | |
248 | Color = Color3.new(0, 1, 1); | |
249 | Font = Enum.Font.Code; | |
250 | FontSize = Enum.FontSize.Size24; | |
251 | }) | |
252 | end)) | |
253 | ArtificialHB = Instance.new("BindableEvent", script) | |
254 | ArtificialHB.Name = "ArtificialHB" | |
255 | script:WaitForChild("ArtificialHB") | |
256 | frame = 0.016666666666667 | |
257 | tf = 0 | |
258 | allowframeloss = false | |
259 | tossremainder = false | |
260 | lastframe = tick() | |
261 | script.ArtificialHB:Fire() | |
262 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
263 | ||
264 | tf = tf + s | |
265 | if frame <= tf then | |
266 | if allowframeloss then | |
267 | script.ArtificialHB:Fire() | |
268 | lastframe = tick() | |
269 | else | |
270 | for i = 1, math.floor(tf / frame) do | |
271 | script.ArtificialHB:Fire() | |
272 | end | |
273 | lastframe = tick() | |
274 | end | |
275 | if tossremainder then | |
276 | tf = 0 | |
277 | else | |
278 | tf = tf - frame * math.floor(tf / frame) | |
279 | end | |
280 | end | |
281 | end | |
282 | ) | |
283 | local animationspeed = 2 | |
284 | hbwait = function(number) | |
285 | ||
286 | if number == 0 or number == nil then | |
287 | ArtificialHB.Event:wait() | |
288 | else | |
289 | for i = 0, number do | |
290 | ArtificialHB.Event:wait() | |
291 | end | |
292 | end | |
293 | end | |
294 | ||
295 | local Stats = Instance.new("Folder", Character) | |
296 | Stats.Name = "Stats" | |
297 | local Defense = Instance.new("NumberValue", Stats) | |
298 | Defense.Name = "Defense" | |
299 | Defense.Value = 0.1 | |
300 | local Movement = Instance.new("NumberValue", Stats) | |
301 | Movement.Name = "Movement" | |
302 | Movement.Value = 0.35 | |
303 | local Damage = Instance.new("NumberValue", Stats) | |
304 | Damage.Name = "Damage" | |
305 | Damage.Value = 0 | |
306 | local Mana = Instance.new("NumberValue", Stats) | |
307 | Mana.Name = "Mana" | |
308 | Mana.Value = 0 | |
309 | local Rooted = Instance.new("BoolValue", Stats) | |
310 | Rooted.Name = "Rooted" | |
311 | Rooted.Value = false | |
312 | local BlockValue = Instance.new("BoolValue", Stats) | |
313 | BlockValue.Name = "BlockValue" | |
314 | BlockValue.Value = false | |
315 | local StaggerHitAnim = Instance.new("BoolValue", Stats) | |
316 | StaggerHitAnim.Name = "StaggerHitAnim" | |
317 | StaggerHitAnim.Value = false | |
318 | local StaggerAnim = Instance.new("BoolValue", Stats) | |
319 | StaggerAnim.Name = "StaggerAnim" | |
320 | StaggerAnim.Value = false | |
321 | local StunAnim = Instance.new("BoolValue", Stats) | |
322 | StunAnim.Name = "StunAnim" | |
323 | StunAnim.Value = false | |
324 | local StunValue = Instance.new("NumberValue", Stats) | |
325 | StunValue.Name = "StunValue" | |
326 | StunValue.Value = 0 | |
327 | local CanCrit = Instance.new("BoolValue", Stats) | |
328 | CanCrit.Name = "CanCrit" | |
329 | CanCrit.Value = false | |
330 | local CritChance = Instance.new("NumberValue", Stats) | |
331 | CritChance.Name = "CritChance" | |
332 | CritChance.Value = 20 | |
333 | local CanPenetrateArmor = Instance.new("BoolValue", Stats) | |
334 | CanPenetrateArmor.Name = "CanPenetrateArmor" | |
335 | CanPenetrateArmor.Value = false | |
336 | local AntiTeamKill = Instance.new("BoolValue", Stats) | |
337 | AntiTeamKill.Name = "AntiTeamKill" | |
338 | AntiTeamKill.Value = false | |
339 | necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) | |
340 | RootCF = angles(rad(-90), 0, rad(180)) | |
341 | local idle = 0 | |
342 | local Anim = "Idle" | |
343 | local animtype = math.floor(math.random(1, 3)) | |
344 | local attacktype = 1 | |
345 | local attack = false | |
346 | local equipped = false | |
347 | local LastPoint = nil | |
348 | local staggerhitanim = false | |
349 | local staggeranim = false | |
350 | local stunanim = false | |
351 | local CritChanceNumber = 0 | |
352 | local idlen = 0 | |
353 | local donum = 0 | |
354 | local sine = 0 | |
355 | local change = 2 / animationspeed | |
356 | local walkinganim = false | |
357 | local handidle = false | |
358 | local walk = 0 | |
359 | local stundelay = 0 | |
360 | local manadelay = 0 | |
361 | local robloxidleanimation = Instance.new("Animation", Torso) | |
362 | robloxidleanimation.Name = "robloxidleanimation" | |
363 | robloxidleanimation.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
364 | local Animator = Humanoid:FindFirstChild("Animator") | |
365 | local Animate = Character:FindFirstChild("Animate") | |
366 | local HitPlayerSounds = {199149137, 199149186, 199149221, 199149235, 199149269, 199149297} | |
367 | local HitArmorSounds = {199149321, 199149338, 199149367, 199149409, 199149452} | |
368 | local HitWeaponSounds = {199148971, 199149025, 199149072, 199149109, 199149119} | |
369 | local HitBlockSounds = {199148933, 199148947} | |
370 | local cooldown1 = 0 | |
371 | local cooldown2 = 0 | |
372 | local cooldown3 = 0 | |
373 | local cooldown4 = 0 | |
374 | local scrn = Instance.new("ScreenGui", PlayerGui) | |
375 | local ud = UDim2.new | |
376 | local c3 = Color3.new | |
377 | local skillcolorscheme = c3(1, 1, 1) | |
378 | subtractmana = function(k) | |
379 | ||
380 | if k <= Mana.Value then | |
381 | Mana.Value = Mana.Value - k | |
382 | end | |
383 | end | |
384 | ||
385 | local co1 = 0 | |
386 | local co2 = 0 | |
387 | local co3 = 0 | |
388 | local co4 = 0 | |
389 | local maxmana = 0 | |
390 | local maxstun = 1 | |
391 | local recovermana = 0 | |
392 | local losestun = 0 | |
393 | local stunwait = 0 | |
394 | local manawait = 0 | |
395 | local skill1mana = 0 | |
396 | local skill2mana = 0 | |
397 | local skill3mana = 0 | |
398 | local skill4mana = 0 | |
399 | local menuupdatespeed = 0 | |
400 | local constantupdate = false | |
401 | local showstats = false | |
402 | local allowstunbar = false | |
403 | local CustomColor = Torso.BrickColor | |
404 | local Colorpart1 = CustomColor.r | |
405 | local Colorpart2 = CustomColor.g | |
406 | local Colorpart3 = CustomColor.b | |
407 | local InverseColor = BrickColor.new(Color3.new(1 - Colorpart1, 1 - Colorpart2, 1 - Colorpart3)) | |
408 | makeframe = function(par, trans, pos, size, color, name) | |
409 | ||
410 | local frame = Instance.new("Frame") | |
411 | frame.Parent = par | |
412 | frame.BackgroundTransparency = trans | |
413 | frame.BorderSizePixel = 2 | |
414 | frame.Position = pos | |
415 | frame.Size = size | |
416 | frame.BackgroundColor3 = color | |
417 | frame.Name = name | |
418 | return frame | |
419 | end | |
420 | ||
421 | makelabel = function(par, text, trans, stroketrans, name) | |
422 | ||
423 | local label = Instance.new("TextLabel") | |
424 | label.Parent = par | |
425 | label.BackgroundTransparency = 1 | |
426 | label.Size = ud(1, 0, 1, 0) | |
427 | label.Position = ud(0, 0, 0, 0) | |
428 | label.TextColor3 = c3(255, 255, 255) | |
429 | label.TextStrokeTransparency = stroketrans | |
430 | label.TextTransparency = trans | |
431 | label.FontSize = Enum.FontSize.Size32 | |
432 | label.Font = Enum.Font.Legacy | |
433 | label.BorderSizePixel = 0 | |
434 | label.TextScaled = true | |
435 | label.Text = text | |
436 | label.Name = name | |
437 | return label | |
438 | end | |
439 | ||
440 | framesk1 = makeframe(scrn, 0.5, ud(0.23, 0, 0.93, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Frame 1") | |
441 | framesk2 = makeframe(scrn, 0.5, ud(0.5, 0, 0.93, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Frame 2") | |
442 | framesk3 = makeframe(scrn, 0.5, ud(0.5, 0, 0.86, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Frame 3") | |
443 | framesk4 = makeframe(scrn, 0.5, ud(0.23, 0, 0.86, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Frame 4") | |
444 | bar1 = makeframe(framesk1, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Bar 1") | |
445 | bar2 = makeframe(framesk2, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Bar 2") | |
446 | bar3 = makeframe(framesk3, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Bar 3") | |
447 | bar4 = makeframe(framesk4, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Bar 4") | |
448 | text1 = makelabel(framesk1, "[C] Ability 3", 1, 1, "Text 1") | |
449 | text2 = makelabel(framesk2, "[V] Ability 4", 1, 1, "Text 2") | |
450 | text3 = makelabel(framesk3, "[X] Ability 2", 1, 1, "Text 3") | |
451 | text4 = makelabel(framesk4, "[Z] Ability 1", 1, 1, "Text 4") | |
452 | manabar = makeframe(scrn, 0.5, ud(0.23, 0, 0.82, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Mana Bar") | |
453 | manacover = makeframe(manabar, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Mana Cover") | |
454 | manatext = makelabel(manabar, "Mana", 1, 1, "Mana Text") | |
455 | healthbar = makeframe(scrn, 0.5, ud(0.5, 0, 0.82, 0), ud(0.26, 0, 0, 0), c3(1, 0.19607843137255, 0.19607843137255), "Health Bar") | |
456 | healthcover = makeframe(healthbar, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(1, 0.19607843137255, 0.19607843137255), "Health Cover") | |
457 | healthtext = makelabel(healthbar, "Health", 1, 1, "Health Text") | |
458 | if allowstunbar == true then | |
459 | stunframe = makeframe(scrn, 0.5, ud(0.5, 0, 0.78, 0), ud(0.26, 0, 0, 0), c3(1, 1, 0.19607843137255), "Stun Frame") | |
460 | stunbar = makeframe(stunframe, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(1, 1, 0.19607843137255), "Stun Bar") | |
461 | stuntext = makelabel(stunframe, "Stun", 1, 1, "Stun Text") | |
462 | end | |
463 | if showstats == true then | |
464 | defenseframe = makeframe(scrn, 0.5, ud(0.23, 0, 0.78, 0), ud(0.075, 0, 0, 0), c3(0.3921568627451, 0.3921568627451, 1), "Defense Frame") | |
465 | damageframe = makeframe(scrn, 0.5, ud(0.3225, 0, 0.78, 0), ud(0.075, 0, 0, 0), c3(1, 0.3921568627451, 0.3921568627451), "Damage Frame") | |
466 | movementframe = makeframe(scrn, 0.5, ud(0.415, 0, 0.78, 0), ud(0.075, 0, 0, 0), c3(0.3921568627451, 1, 0.3921568627451), "Movement Frame") | |
467 | defensetext = makelabel(defenseframe, "Defense: " .. Defense.Value, 1, 1, "Defense Text") | |
468 | damagetext = makelabel(damageframe, "Damage: " .. Damage.Value, 1, 1, "Damage Text") | |
469 | movementtext = makelabel(movementframe, "Movement: " .. Movement.Value, 1, 1, "Movement Text") | |
470 | end | |
471 | NoOutline = function(Part) | |
472 | ||
473 | Part.TopSurface = 10 | |
474 | end | |
475 | ||
476 | local weldBetween = function(a, b) | |
477 | ||
478 | local weldd = Instance.new("ManualWeld") | |
479 | weldd.Part0 = a | |
480 | weldd.Part1 = b | |
481 | weldd.C0 = CFrame.new() | |
482 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
483 | weldd.Parent = a | |
484 | return weldd | |
485 | end | |
486 | ||
487 | nooutline = function(part) | |
488 | ||
489 | part.TopSurface = 10 | |
490 | end | |
491 | ||
492 | part = function(formfactor, parent, material, reflectance, transparency, brickcolor, name, size) | |
493 | ||
494 | local fp = it("Part") | |
495 | fp.formFactor = formfactor | |
496 | fp.Parent = parent | |
497 | fp.Reflectance = reflectance | |
498 | fp.Transparency = transparency | |
499 | fp.CanCollide = false | |
500 | fp.Locked = true | |
501 | fp.BrickColor = BrickColor.new(tostring(brickcolor)) | |
502 | fp.Name = name | |
503 | fp.Size = size | |
504 | fp.Position = Character.Torso.Position | |
505 | nooutline(fp) | |
506 | fp.Material = material | |
507 | fp:BreakJoints() | |
508 | return fp | |
509 | end | |
510 | ||
511 | mesh = function(Mesh, part, meshtype, meshid, offset, scale) | |
512 | ||
513 | local mesh = it(Mesh) | |
514 | mesh.Parent = part | |
515 | if Mesh == "SpecialMesh" then | |
516 | mesh.MeshType = meshtype | |
517 | mesh.MeshId = meshid | |
518 | end | |
519 | mesh.Offset = offset | |
520 | mesh.Scale = scale | |
521 | return mesh | |
522 | end | |
523 | ||
524 | weld = function(parent, part0, part1, c0, c1) | |
525 | ||
526 | local weld = it("Motor") | |
527 | weld.Parent = parent | |
528 | weld.Part0 = part0 | |
529 | weld.Part1 = part1 | |
530 | weld.C0 = c0 | |
531 | weld.C1 = c1 | |
532 | return weld | |
533 | end | |
534 | ||
535 | local WeaponName = "Russian Kick" | |
536 | local ClassName = "Russian Kick" | |
537 | local PlayerSize = 1 | |
538 | local RWC0 = cf(-0.5, 0, 0) * angles(rad(0), rad(90), rad(0)) | |
539 | local LWC0 = cf(0.5, 0, 0) * angles(rad(0), rad(-90), rad(0)) | |
540 | if PlayerSize ~= 1 then | |
541 | RootPart.Size = RootPart.Size * PlayerSize | |
542 | Torso.Size = Torso.Size * PlayerSize | |
543 | Head.Size = Head.Size * PlayerSize | |
544 | RightArm.Size = RightArm.Size * PlayerSize | |
545 | LeftArm.Size = LeftArm.Size * PlayerSize | |
546 | RightLeg.Size = RightLeg.Size * PlayerSize | |
547 | LeftLeg.Size = LeftLeg.Size * PlayerSize | |
548 | RootJoint.Parent = RootPart | |
549 | Neck.Parent = Torso | |
550 | LS.Parent = Torso | |
551 | RS.Parent = Torso | |
552 | LH.Parent = Torso | |
553 | RH.Parent = Torso | |
554 | RootJoint.C0 = RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) | |
555 | Neck.C0 = necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(0)) | |
556 | Neck.C1 = angles(rad(90), rad(180), 0) * cf(0, 0, -0.5 * PlayerSize) | |
557 | RS.C0 = cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * RWC0 | |
558 | LS.C0 = cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * LWC0 | |
559 | RS.C1 = angles(0, rad(90), 0) * cf(0, 0.5 * PlayerSize, -0.5) | |
560 | LS.C1 = angles(0, rad(-90), 0) * cf(0, 0.5 * PlayerSize, -0.5) | |
561 | RH.C0 = cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(0), rad(0), rad(0)) | |
562 | LH.C0 = cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(0), rad(0), rad(0)) | |
563 | RH.C1 = angles(0, rad(90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize) | |
564 | LH.C1 = angles(0, rad(-90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize) | |
565 | for _,v in pairs(Character:GetChildren()) do | |
566 | if v.ClassName == "Hat" or v.ClassName == "Accessory" then | |
567 | v.Parent = nil | |
568 | v.Parent = Character | |
569 | v.Handle.Mesh.Scale = v.Handle.Mesh.Scale * PlayerSize | |
570 | for _,b in pairs(v.Handle:GetChildren()) do | |
571 | if b.ClassName == "Weld" or b.ClassName == "Motor" then | |
572 | local p1 = b.Part1 | |
573 | b.Part1 = nil | |
574 | local c01, c02, c03, c04, c05, c06, c07, c08, c09, c010, c011, c012 = b.C0:components() | |
575 | local c11, c12, c13, c14, c15, c16, c17, c18, c19, c110, c111, c112 = b.C1:components() | |
576 | b.C0 = cf(c01 * PlayerSize, c02 * PlayerSize, c03 * PlayerSize, c04, c05, c06, c07, c08, c09, c010, c011, c012) | |
577 | b.C1 = cf(c11 * PlayerSize, c12 * PlayerSize, c13 * PlayerSize, c14, c15, c16, c17, c18, c19, c110, c111, c112) | |
578 | b.Part1 = p1 | |
579 | end | |
580 | end | |
581 | end | |
582 | end | |
583 | end | |
584 | m = Instance.new("Model", Character) | |
585 | m.Name = WeaponName | |
586 | Effects = Instance.new("Folder", m) | |
587 | Effects.Name = "Effects" | |
588 | Humanoid.Died:connect(function() | |
589 | ||
590 | attack = true | |
591 | for _,v in pairs(Character:GetChildren()) do | |
592 | if v.ClassName == "Model" then | |
593 | v:Destroy() | |
594 | end | |
595 | end | |
596 | end | |
597 | ) | |
598 | for i,v in pairs(Character:GetChildren()) do | |
599 | if v.ClassName == "Model" then | |
600 | for _,c in pairs(v:GetChildren()) do | |
601 | if c.ClassName == "Part" then | |
602 | c.CustomPhysicalProperties = PhysicalProperties.new(0.001, 0.001, 0.001, 0.001, 0.001) | |
603 | end | |
604 | end | |
605 | end | |
606 | end | |
607 | print(ClassName .. " loaded.") | |
608 | clerp = function(a, b, t) | |
609 | return a:lerp(b, t) | |
610 | end | |
611 | ||
612 | positiveangle = function(number) | |
613 | ||
614 | if number > 0 then | |
615 | number = 0 | |
616 | end | |
617 | return number | |
618 | end | |
619 | ||
620 | negativeangle = function(number) | |
621 | ||
622 | if number < 0 then | |
623 | number = 0 | |
624 | end | |
625 | return number | |
626 | end | |
627 | ||
628 | so = function(id, par, vol, pit) | |
629 | ||
630 | coroutine.resume(coroutine.create(function() | |
631 | ||
632 | local sou = Instance.new("Sound", par or workspace) | |
633 | sou.Volume = vol | |
634 | sou.Pitch = pit or 1 | |
635 | sou.SoundId = "http://roblox.com/asset/?id=" .. id | |
636 | hbwait() | |
637 | sou:play() | |
638 | game:GetService("Debris"):AddItem(sou, 10) | |
639 | end | |
640 | )) | |
641 | end | |
642 | ||
643 | GetDistance = function(Part1, Part2, magnitude) | |
644 | ||
645 | local target = Part1.Position - Part2.Position | |
646 | local mag = target.magnitude | |
647 | if mag <= magnitude then | |
648 | return true | |
649 | else | |
650 | return false | |
651 | end | |
652 | end | |
653 | ||
654 | rayCast = function(Pos, Dir, Max, Ignore) | |
655 | ||
656 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
657 | end | |
658 | ||
659 | DamageStatLabel = function(labeltype, cframe, text, color) | |
660 | ||
661 | local c = part(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", vt(0, 0, 0)) | |
662 | c.CFrame = cf(cframe.p + vt(0, 1.5, 0)) | |
663 | game:GetService("Debris"):AddItem(c, 5) | |
664 | Instance.new("BodyGyro", c) | |
665 | local f = Instance.new("BodyPosition", c) | |
666 | f.P = 2000 | |
667 | f.D = 100 | |
668 | f.maxForce = vt(math.huge, math.huge, math.huge) | |
669 | if labeltype == "Normal" then | |
670 | f.position = c.Position + vt(math.random(-2, 2), 6, math.random(-2, 2)) | |
671 | else | |
672 | if labeltype == "Debuff" then | |
673 | f.position = c.Position + vt(math.random(-2, 2), 8, math.random(-2, 2)) | |
674 | else | |
675 | if labeltype == "Interruption" then | |
676 | f.position = c.Position + vt(math.random(-2, 2), 8, math.random(-2, 2)) | |
677 | end | |
678 | end | |
679 | end | |
680 | game:GetService("Debris"):AddItem(c, 5) | |
681 | local bg = Instance.new("BillboardGui", c) | |
682 | bg.Adornee = c | |
683 | bg.Size = UDim2.new(2.5, 0, 2.5, 0) | |
684 | bg.StudsOffset = vt(-2, 2, 0) | |
685 | bg.AlwaysOnTop = false | |
686 | local tl = Instance.new("TextLabel", bg) | |
687 | tl.BackgroundTransparency = 1 | |
688 | tl.Size = UDim2.new(2.5, 0, 2.5, 0) | |
689 | tl.Text = text | |
690 | tl.Font = Enum.Font.SourceSans | |
691 | tl.FontSize = Enum.FontSize.Size42 | |
692 | tl.TextColor3 = color | |
693 | tl.TextScaled = false | |
694 | tl.TextStrokeTransparency = 0 | |
695 | tl.TextScaled = true | |
696 | tl.TextWrapped = true | |
697 | f.Parent = c | |
698 | coroutine.resume(coroutine.create(function(Part, BodyPosition, TextLabel) | |
699 | ||
700 | wait(0.25) | |
701 | for i = 1, 5 do | |
702 | wait() | |
703 | BodyPosition.position = Part.Position - vt(0, 0.5, 0) | |
704 | end | |
705 | wait(1.25) | |
706 | for i = 1, 5 do | |
707 | wait() | |
708 | TextLabel.TextTransparency = TextLabel.TextTransparency + 0.2 | |
709 | TextLabel.TextStrokeTransparency = TextLabel.TextStrokeTransparency + 0.2 | |
710 | BodyPosition.position = Part.Position + vt(0, 0.5, 0) | |
711 | end | |
712 | Part.Parent = nil | |
713 | end | |
714 | ), c, f, tl) | |
715 | end | |
716 | ||
717 | IncreaseStat = function(Location, Stat, Amount, Duration, ShowTheStat) | |
718 | ||
719 | -- DECOMPILER ERROR at PC28: Unhandled construct in 'MakeBoolean' P1 | |
720 | ||
721 | -- DECOMPILER ERROR at PC28: Unhandled construct in 'MakeBoolean' P1 | |
722 | ||
723 | if Location:FindFirstChild("Stats") ~= nil and Location.Stats:FindFirstChild("BlockValue") ~= nil and Location.Stats:FindFirstChild("BlockValue").Value ~= true and Location.Stats[Stat] ~= nil then | |
724 | Location.Stats[Stat].Value = Location.Stats[Stat].Value + Amount | |
725 | if ShowTheStat == true then | |
726 | if Stat == "Defense" then | |
727 | DamageStatLabel("Debuff", Location.Head.CFrame, "+Defense", c3(1, 1, 1)) | |
728 | else | |
729 | if Stat == "Damage" then | |
730 | DamageStatLabel("Debuff", Location.Head.CFrame, "+Damage", c3(1, 1, 1)) | |
731 | else | |
732 | if Stat == "Movement" then | |
733 | DamageStatLabel("Debuff", Location.Head.CFrame, "+Movement", c3(1, 1, 1)) | |
734 | end | |
735 | end | |
736 | end | |
737 | end | |
738 | coroutine.resume(coroutine.create(function(CurrentDecrease) | |
739 | ||
740 | wait(Duration) | |
741 | CurrentDecrease.Value = CurrentDecrease.Value - Amount | |
742 | end | |
743 | ), Location.Stats[Stat]) | |
744 | end | |
745 | DamageStatLabel("Interruption", Location.Head.CFrame, "Blocked!", Color3.new(0, 0.3921568627451, 1)) | |
746 | end | |
747 | ||
748 | DecreaseStat = function(Location, Stat, Amount, Duration, ShowTheStat) | |
749 | ||
750 | -- DECOMPILER ERROR at PC28: Unhandled construct in 'MakeBoolean' P1 | |
751 | ||
752 | -- DECOMPILER ERROR at PC28: Unhandled construct in 'MakeBoolean' P1 | |
753 | ||
754 | if Location:FindFirstChild("Stats") ~= nil and Location.Stats:FindFirstChild("BlockValue") ~= nil and Location.Stats:FindFirstChild("BlockValue").Value ~= true and Location.Stats[Stat] ~= nil then | |
755 | Location.Stats[Stat].Value = Location.Stats[Stat].Value - Amount | |
756 | if ShowTheStat == true then | |
757 | if Stat == "Defense" then | |
758 | DamageStatLabel("Debuff", Location.Head.CFrame, "-Defense", c3(1, 1, 1)) | |
759 | else | |
760 | if Stat == "Damage" then | |
761 | DamageStatLabel("Debuff", Location.Head.CFrame, "-Damage", c3(1, 1, 1)) | |
762 | else | |
763 | if Stat == "Movement" then | |
764 | DamageStatLabel("Debuff", Location.Head.CFrame, "-Movement", c3(1, 1, 1)) | |
765 | end | |
766 | end | |
767 | end | |
768 | end | |
769 | coroutine.resume(coroutine.create(function(CurrentDecrease) | |
770 | ||
771 | wait(Duration) | |
772 | CurrentDecrease.Value = CurrentDecrease.Value + Amount | |
773 | end | |
774 | ), Location.Stats[Stat]) | |
775 | end | |
776 | DamageStatLabel("Interruption", Location.Head.CFrame, "Blocked!", Color3.new(0, 0.3921568627451, 1)) | |
777 | end | |
778 | ||
779 | Damagefunc = function(hit, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staggerhit, ranged, DecreaseTheStat, DecreaseAmount, DecreaseDuration, ShowDecreasedStat) | |
780 | ||
781 | if hit.Parent == nil then | |
782 | return | |
783 | end | |
784 | h = hit.Parent:FindFirstChild("Humanoid") | |
785 | for _,v in pairs(hit.Parent:GetChildren()) do | |
786 | if v:IsA("Humanoid") then | |
787 | h = v | |
788 | end | |
789 | end | |
790 | if hit.Name == "Hitbox" and ranged ~= true and hit.Parent ~= m then | |
791 | StaggerHitAnim.Value = true | |
792 | so(HitWeaponSounds[math.random(1, #HitWeaponSounds)], hit, 1, 1) | |
793 | return | |
794 | end | |
795 | if hit.Parent.Parent:FindFirstChild("Torso") ~= nil then | |
796 | h = hit.Parent.Parent:FindFirstChild("Humanoid") | |
797 | end | |
798 | if hit.Parent.className == "Hat" then | |
799 | hit = hit.Parent.Parent:FindFirstChild("Head") | |
800 | end | |
801 | if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then | |
802 | if hit.Parent:FindFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then | |
803 | return | |
804 | end | |
805 | if AntiTeamKill.Value == true and Player.Neutral == false and game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil and game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor == Player.TeamColor then | |
806 | return | |
807 | end | |
808 | if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent:FindFirstChild("Humanoid").Health <= 0 then | |
809 | return | |
810 | end | |
811 | if hit.Parent:FindFirstChild("Stats") ~= nil and hit.Parent.Stats:FindFirstChild("StunValue") ~= nil then | |
812 | hit.Parent.Stats:FindFirstChild("StunValue").Value = hit.Parent.Stats:FindFirstChild("StunValue").Value + incstun | |
813 | end | |
814 | if hit.Parent:FindFirstChild("Stats") ~= nil and hit.Parent.Stats:FindFirstChild("StaggerAnim") ~= nil and stagger == true then | |
815 | hit.Parent.Stats:FindFirstChild("StaggerAnim").Value = true | |
816 | end | |
817 | if hit.Parent:FindFirstChild("Stats") ~= nil and hit.Parent.Stats:FindFirstChild("BlockValue") ~= nil and hit.Parent.Stats:FindFirstChild("BlockValue").Value == true then | |
818 | if hit.Parent.Stats:FindFirstChild("BlockDebounce") == nil then | |
819 | DamageStatLabel("Interruption", hit.Parent.Head.CFrame, "Blocked!", Color3.new(0, 0.3921568627451, 1)) | |
820 | local BlockDebounce = Instance.new("BoolValue", hit.Parent.Stats) | |
821 | BlockDebounce.Name = "BlockDebounce" | |
822 | BlockDebounce.Value = true | |
823 | game:GetService("Debris"):AddItem(BlockDebounce, 0.1) | |
824 | end | |
825 | do | |
826 | if ranged ~= true then | |
827 | do | |
828 | if hit.Parent.Stats:FindFirstChild("BlockDebounce2") == nil then | |
829 | local BlockDebounce2 = Instance.new("BoolValue", hit.Parent.Stats) | |
830 | BlockDebounce2.Name = "BlockDebounce2" | |
831 | BlockDebounce2.Value = true | |
832 | game:GetService("Debris"):AddItem(BlockDebounce2, 0.1) | |
833 | so(HitBlockSounds[math.random(1, #HitBlockSounds)], hit, 1, 1) | |
834 | end | |
835 | hit.Parent.Stats:FindFirstChild("BlockValue").Value = false | |
836 | StaggerAnim.Value = true | |
837 | do return end | |
838 | if DecreaseTheStat ~= nil and hit.Parent:FindFirstChild("Stats") ~= nil then | |
839 | if DecreaseTheStat == "Defense" then | |
840 | DecreaseStat(hit.Parent, "Defense", DecreaseAmount, DecreaseDuration, ShowDecreasedStat) | |
841 | else | |
842 | if DecreaseTheStat == "Damage" then | |
843 | DecreaseStat(hit.Parent, "Damage", DecreaseAmount, DecreaseDuration, ShowDecreasedStat) | |
844 | else | |
845 | if DecreaseTheStat == "Movement" then | |
846 | DecreaseStat(hit.Parent, "Movement", DecreaseAmount, DecreaseDuration, ShowDecreasedStat) | |
847 | end | |
848 | end | |
849 | end | |
850 | end | |
851 | local D = math.random(minim, maxim) * Damage.Value | |
852 | if hit.Parent:FindFirstChild("Stats") ~= nil then | |
853 | if hit.Parent.Stats:FindFirstChild("Defense") then | |
854 | if CanPenetrateArmor.Value == true then | |
855 | D = D / hit.Parent.Stats:FindFirstChild("Defense").Value | |
856 | -- DECOMPILER ERROR at PC377: Unhandled construct in 'MakeBoolean' P1 | |
857 | ||
858 | if hit.Parent.Stats:FindFirstChild("Defense") ~= nil or CanCrit.Value == true then | |
859 | CritChanceNumber = math.random(1, CritChance.Value) | |
860 | if CritChanceNumber == CritChance.Value then | |
861 | D = D * 2 | |
862 | end | |
863 | end | |
864 | D = math.floor(D) | |
865 | h.Health = h.Health - D | |
866 | if D <= 3 and staggerhit == true then | |
867 | if ranged ~= true then | |
868 | StaggerHitAnim.Value = true | |
869 | end | |
870 | if ranged ~= true then | |
871 | so(HitArmorSounds[math.random(1, #HitArmorSounds)], hit, 1, 1) | |
872 | end | |
873 | else | |
874 | if D > 3 and ranged ~= true then | |
875 | so(HitPlayerSounds[math.random(1, #HitPlayerSounds)], hit, 1, 1) | |
876 | end | |
877 | end | |
878 | if D > 3 and D < 20 then | |
879 | if CanCrit.Value == true and CritChanceNumber == CritChance.Value then | |
880 | DamageStatLabel("Normal", hit.Parent.Head.CFrame, "Crit! " .. D, Color3.new(0.7843137254902, 0, 0)) | |
881 | so("296102734", hit, 1, 1) | |
882 | else | |
883 | DamageStatLabel("Normal", hit.Parent.Head.CFrame, D, Color3.new(1, 0.86274509803922, 0)) | |
884 | end | |
885 | else | |
886 | if D >= 20 then | |
887 | if CanCrit.Value == true and CritChanceNumber == CritChance.Value then | |
888 | DamageStatLabel("Normal", hit.Parent.Head.CFrame, "Crit! " .. D, Color3.new(0.7843137254902, 0, 0)) | |
889 | so("296102734", hit, 1, 1) | |
890 | else | |
891 | DamageStatLabel("Normal", hit.Parent.Head.CFrame, D, Color3.new(1, 0, 0)) | |
892 | end | |
893 | else | |
894 | if D <= 3 then | |
895 | if CanCrit.Value == true and CritChanceNumber == CritChance.Value then | |
896 | DamageStatLabel("Normal", hit.Parent.Head.CFrame, "Crit! " .. D, Color3.new(0.7843137254902, 0, 0)) | |
897 | so("296102734", hit, 1, 1) | |
898 | else | |
899 | DamageStatLabel("Normal", hit.Parent.Head.CFrame, D, Color3.new(0.88235294117647, 0.88235294117647, 0.88235294117647)) | |
900 | end | |
901 | end | |
902 | end | |
903 | end | |
904 | do | |
905 | if Type == "Normal" then | |
906 | local vp = Instance.new("BodyVelocity") | |
907 | vp.P = 500 | |
908 | vp.maxForce = vt(math.huge, 0, math.huge) | |
909 | if KnockbackType == 1 then | |
910 | vp.Velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05 | |
911 | else | |
912 | if KnockbackType == 2 then | |
913 | vp.Velocity = Property.CFrame.lookVector * knockback | |
914 | end | |
915 | end | |
916 | if knockback > 0 then | |
917 | vp.Parent = hit.Parent.Torso | |
918 | end | |
919 | game:GetService("Debris"):AddItem(vp, 0.5) | |
920 | end | |
921 | local DebounceHit = Instance.new("BoolValue", hit.Parent) | |
922 | DebounceHit.Name = "DebounceHit" | |
923 | DebounceHit.Value = true | |
924 | game:GetService("Debris"):AddItem(DebounceHit, Delay) | |
925 | end | |
926 | end | |
927 | end | |
928 | end | |
929 | end | |
930 | end | |
931 | end | |
932 | end | |
933 | end | |
934 | end | |
935 | ||
936 | MagniDamage = function(Part, magni, mindam, maxdam, knock, Type, Property, Delay, KnockbackType, incstun, stagger, staggerhit, ranged, MagicDecreaseTheStat, MagicDecreaseAmount, MagicDecreaseDuration, MagicShowDecreasedStat) | |
937 | ||
938 | for _,c in pairs(workspace:GetChildren()) do | |
939 | local hum = (c:FindFirstChild("Humanoid")) | |
940 | local head = nil | |
941 | if hum ~= nil then | |
942 | head = c:FindFirstChild("Torso") | |
943 | if head ~= nil then | |
944 | local targ = head.Position - Part.Position | |
945 | local mag = targ.magnitude | |
946 | if mag <= magni and c.Name ~= Player.Name then | |
947 | Damagefunc(head, mindam, maxdam, knock, Type, Property, Delay, KnockbackType, incstun, stagger, staggerhit, ranged, MagicDecreaseTheStat, MagicDecreaseAmount, MagicDecreaseDuration, MagicShowDecreasedStat) | |
948 | end | |
949 | end | |
950 | do | |
951 | for _,d in pairs(c:GetChildren()) do | |
952 | if d.ClassName == "Model" and ranged ~= true then | |
953 | head = d:FindFirstChild("Hitbox") | |
954 | if head ~= nil then | |
955 | local targ = head.Position - Part.Position | |
956 | local mag = targ.magnitude | |
957 | if mag <= magni and c.Name ~= Player.Name then | |
958 | local hitrefpart = part(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", vt()) | |
959 | hitrefpart.Anchored = true | |
960 | hitrefpart.CFrame = cf(head.Position) | |
961 | so(HitWeaponSounds[math.random(1, #HitWeaponSounds)], hitrefpart, 1, 1) | |
962 | StaggerHitAnim.Value = true | |
963 | end | |
964 | end | |
965 | end | |
966 | end | |
967 | do | |
968 | -- DECOMPILER ERROR at PC107: LeaveBlock: unexpected jumping out DO_STMT | |
969 | ||
970 | -- DECOMPILER ERROR at PC107: LeaveBlock: unexpected jumping out IF_THEN_STMT | |
971 | ||
972 | -- DECOMPILER ERROR at PC107: LeaveBlock: unexpected jumping out IF_STMT | |
973 | ||
974 | end | |
975 | end | |
976 | end | |
977 | end | |
978 | end | |
979 | ||
980 | MagniBufforDebuff = function(Part, Magni, Type, Stat, Amount, Duration, ShowTheBufforDebuff, ApplyToOthersInstead) | |
981 | ||
982 | if Player.Neutral == true then | |
983 | if Type == "Buff" then | |
984 | IncreaseStat(Character, Stat, Amount, Duration, ShowTheBufforDebuff) | |
985 | else | |
986 | if Type == "Debuff" then | |
987 | DecreaseStat(Character, Stat, Amount, Duration, ShowTheBufforDebuff) | |
988 | end | |
989 | end | |
990 | end | |
991 | for _,c in pairs(workspace:GetChildren()) do | |
992 | local hum = (c:FindFirstChild("Humanoid")) | |
993 | local head = nil | |
994 | if hum ~= nil then | |
995 | head = c:FindFirstChild("Torso") | |
996 | if head ~= nil then | |
997 | local targ = head.Position - Part.Position | |
998 | local mag = targ.magnitude | |
999 | -- DECOMPILER ERROR at PC83: Unhandled construct in 'MakeBoolean' P1 | |
1000 | ||
1001 | if ApplyToOthersInstead == true and mag <= Magni and c.Name ~= Player.Name and Player.Neutral == false and game.Players:GetPlayerFromCharacter(head.Parent) ~= nil and game.Players:GetPlayerFromCharacter(head.Parent).TeamColor == Player.TeamColor then | |
1002 | if Type == "Buff" then | |
1003 | IncreaseStat(head.Parent, Stat, Amount, Duration, ShowTheBufforDebuff) | |
1004 | else | |
1005 | if Type == "Debuff" then | |
1006 | DecreaseStat(head.Parent, Stat, Amount, Duration, ShowTheBufforDebuff) | |
1007 | end | |
1008 | end | |
1009 | end | |
1010 | end | |
1011 | end | |
1012 | if ApplyToOthersInstead == false and mag <= Magni and Player.Neutral == false and game.Players:GetPlayerFromCharacter(head.Parent) ~= nil and game.Players:GetPlayerFromCharacter(head.Parent).TeamColor == Player.TeamColor then | |
1013 | if Type == "Buff" then | |
1014 | IncreaseStat(head.Parent, Stat, Amount, Duration, ShowTheBufforDebuff) | |
1015 | else | |
1016 | if Type == "Debuff" then | |
1017 | DecreaseStat(head.Parent, Stat, Amount, Duration, ShowTheBufforDebuff) | |
1018 | end | |
1019 | end | |
1020 | end | |
1021 | end | |
1022 | end | |
1023 | ||
1024 | Lightning = function(p0, p1, tym, ofs, brickcolor, material, th, tra, last) | |
1025 | ||
1026 | local magz = p0 - p1.magnitude | |
1027 | local curpos = p0 | |
1028 | local trz = {-ofs, ofs} | |
1029 | for i = 1, tym do | |
1030 | local li = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt(th, th, magz / tym)) | |
1031 | do | |
1032 | li.Anchored = true | |
1033 | local ofz = vt(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)]) | |
1034 | local trolpos = cf(curpos, p1) * cf(0, 0, magz / tym).p + ofz | |
1035 | if tym == i then | |
1036 | local magz2 = curpos - p1.magnitude | |
1037 | li.Size = vt(th, th, magz2) | |
1038 | li.CFrame = cf(curpos, p1) * cf(0, 0, -magz2 / 2) | |
1039 | else | |
1040 | do | |
1041 | do | |
1042 | li.CFrame = cf(curpos, trolpos) * cf(0, 0, magz / tym / 2) | |
1043 | curpos = li.CFrame * cf(0, 0, magz / tym / 2).p | |
1044 | game.Debris:AddItem(li, last) | |
1045 | coroutine.resume(coroutine.create(function() | |
1046 | ||
1047 | while li.Transparency ~= 1 do | |
1048 | for i = 0, 1, last do | |
1049 | hbwait() | |
1050 | li.Transparency = li.Transparency + 0.1 / last | |
1051 | end | |
1052 | end | |
1053 | end | |
1054 | )) | |
1055 | end | |
1056 | -- DECOMPILER ERROR at PC118: LeaveBlock: unexpected jumping out IF_ELSE_STMT | |
1057 | ||
1058 | -- DECOMPILER ERROR at PC118: LeaveBlock: unexpected jumping out IF_STMT | |
1059 | ||
1060 | -- DECOMPILER ERROR at PC118: LeaveBlock: unexpected jumping out DO_STMT | |
1061 | ||
1062 | end | |
1063 | end | |
1064 | end | |
1065 | end | |
1066 | end | |
1067 | ||
1068 | MagicRing = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1069 | ||
1070 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1071 | prt.Anchored = true | |
1072 | prt.CFrame = cframe | |
1073 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=3270017", vt(0, 0, 0), vt(x1, y1, z1)) | |
1074 | game:GetService("Debris"):AddItem(prt, 10) | |
1075 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1076 | ||
1077 | for i = 0, 1, delay do | |
1078 | hbwait() | |
1079 | Part.CFrame = Part.CFrame | |
1080 | Part.Transparency = i | |
1081 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1082 | end | |
1083 | Part.Parent = nil | |
1084 | end | |
1085 | ), prt, msh) | |
1086 | end | |
1087 | ||
1088 | MagicWave = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1089 | ||
1090 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1091 | prt.Anchored = true | |
1092 | prt.CFrame = cframe | |
1093 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, -0.1 * z1), vt(x1, y1, z1)) | |
1094 | game:GetService("Debris"):AddItem(prt, 10) | |
1095 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1096 | ||
1097 | for i = 0, 1, delay do | |
1098 | hbwait() | |
1099 | Part.CFrame = Part.CFrame | |
1100 | Part.Transparency = i | |
1101 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1102 | end | |
1103 | Part.Parent = nil | |
1104 | end | |
1105 | ), prt, msh) | |
1106 | end | |
1107 | ||
1108 | MagicBlock = function(brickcolor, material, rotate, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1109 | ||
1110 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1111 | prt.Anchored = true | |
1112 | prt.CFrame = cframe * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1113 | local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
1114 | game:GetService("Debris"):AddItem(prt, 10) | |
1115 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1116 | ||
1117 | for i = 0, 1, delay do | |
1118 | hbwait() | |
1119 | if rotate == true then | |
1120 | Part.CFrame = Part.CFrame * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1121 | end | |
1122 | Part.Transparency = i | |
1123 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1124 | end | |
1125 | Part.Parent = nil | |
1126 | end | |
1127 | ), prt, msh) | |
1128 | end | |
1129 | ||
1130 | MagicBlock2 = function(brickcolor, material, rotate, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1131 | ||
1132 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1133 | prt.Anchored = true | |
1134 | prt.CFrame = cframe * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1135 | local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
1136 | game:GetService("Debris"):AddItem(prt, 10) | |
1137 | CF = prt.CFrame | |
1138 | num = math.random(5, 20) | |
1139 | coroutine.resume(coroutine.create(function(Part, Mesh, CF2, Num) | |
1140 | ||
1141 | for i = 0, 1, delay do | |
1142 | hbwait() | |
1143 | if rotate == true then | |
1144 | Part.CFrame = CF2 * cf(0, i * Num, 0) * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1145 | else | |
1146 | Part.CFrame = CF2 * cf(0, i * Num, 0) | |
1147 | end | |
1148 | Part.Transparency = i | |
1149 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1150 | end | |
1151 | Part.Parent = nil | |
1152 | end | |
1153 | ), prt, msh, CF, num) | |
1154 | end | |
1155 | ||
1156 | MagicCylinder = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1157 | ||
1158 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1159 | prt.Anchored = true | |
1160 | prt.CFrame = cframe | |
1161 | local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
1162 | game:GetService("Debris"):AddItem(prt, 10) | |
1163 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1164 | ||
1165 | for i = 0, 1, delay do | |
1166 | hbwait() | |
1167 | Part.Transparency = i | |
1168 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1169 | end | |
1170 | Part.Parent = nil | |
1171 | end | |
1172 | ), prt, msh) | |
1173 | end | |
1174 | ||
1175 | MagicCircle = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1176 | ||
1177 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1178 | prt.Anchored = true | |
1179 | prt.CFrame = cframe | |
1180 | local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
1181 | game:GetService("Debris"):AddItem(prt, 10) | |
1182 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1183 | ||
1184 | for i = 0, 1, delay do | |
1185 | hbwait() | |
1186 | Part.Transparency = i | |
1187 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1188 | end | |
1189 | Part.Parent = nil | |
1190 | end | |
1191 | ), prt, msh) | |
1192 | end | |
1193 | ||
1194 | MagicHead = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1195 | ||
1196 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1197 | prt.Anchored = true | |
1198 | prt.CFrame = cframe | |
1199 | local msh = mesh("SpecialMesh", prt, "Head", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
1200 | game:GetService("Debris"):AddItem(prt, 10) | |
1201 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1202 | ||
1203 | for i = 0, 1, delay do | |
1204 | hbwait() | |
1205 | Part.Transparency = i | |
1206 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1207 | end | |
1208 | Part.Parent = nil | |
1209 | end | |
1210 | ), prt, msh) | |
1211 | end | |
1212 | ||
1213 | BreakEffect = function(brickcolor, material, rotate, cframe, x1, y1, z1, delay) | |
1214 | ||
1215 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1216 | prt.Anchored = true | |
1217 | prt.CFrame = cframe * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1218 | local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
1219 | game:GetService("Debris"):AddItem(prt, 10) | |
1220 | coroutine.resume(coroutine.create(function(Part, CF, Numbb, randnumb) | |
1221 | ||
1222 | CF = Part.CFrame | |
1223 | Numbb = 0 | |
1224 | randnumb = math.random() - math.random() | |
1225 | for i = 0, 1, delay do | |
1226 | hbwait() | |
1227 | CF = CF * cf(0, 1, 0) | |
1228 | if rotate == true then | |
1229 | Part.CFrame = CF * angles(Numbb, 0, 0) | |
1230 | else | |
1231 | if rotate == false then | |
1232 | Part.CFrame = CF | |
1233 | end | |
1234 | end | |
1235 | Part.Transparency = i | |
1236 | Numbb = Numbb + (randnumb) | |
1237 | end | |
1238 | Part.Parent = nil | |
1239 | end | |
1240 | ), prt, CF, Numbb, randnumb) | |
1241 | end | |
1242 | ||
1243 | ElecEffect = function(brickcolor, material, cf, x, y, z, delay) | |
1244 | ||
1245 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1246 | prt.Anchored = true | |
1247 | prt.CFrame = cf | |
1248 | xval = math.random() | |
1249 | yval = math.random() | |
1250 | zval = math.random() | |
1251 | local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x, y, z)) | |
1252 | game:GetService("Debris"):AddItem(prt, 10) | |
1253 | coroutine.resume(coroutine.create(function(Part, Mesh, xvaal, yvaal, zvaal) | |
1254 | ||
1255 | for i = 0, 1, delay do | |
1256 | hbwait() | |
1257 | Part.CFrame = Part.CFrame | |
1258 | xvaal = xvaal - 0.1 * (delay * 10) | |
1259 | yvaal = yvaal - 0.1 * (delay * 10) | |
1260 | zvaal = zvaal - 0.1 * (delay * 10) | |
1261 | Mesh.Scale = Mesh.Scale + vt(xvaal, yvaal, zvaal) | |
1262 | Part.Transparency = i | |
1263 | end | |
1264 | Part.Parent = nil | |
1265 | end | |
1266 | ), prt, msh, xval, yval, zval) | |
1267 | end | |
1268 | ||
1269 | TrailEffect = function(brickcolor, material, currentcf, oldcf, meshtype, reflectance, size, x, y, z, delay) | |
1270 | ||
1271 | local magnitudecframe = currentcf.p - oldcf.p.magnitude | |
1272 | if magnitudecframe > 0.01 then | |
1273 | local prt = part(3, Effects, material, reflectance, 0, brickcolor, "Effect", vt(1, magnitudecframe, 1)) | |
1274 | prt.Anchored = true | |
1275 | prt.CFrame = cf((currentcf.p + oldcf.p) / 2, oldcf.p) * angles(rad(90), 0, 0) | |
1276 | local TheMeshType = "BlockMesh" | |
1277 | if meshtype == "Cylinder" then | |
1278 | TheMeshType = "CylinderMesh" | |
1279 | end | |
1280 | local msh = mesh(TheMeshType, prt, "", "", vt(0, 0, 0), vt(0 + size, 1, 0 + size)) | |
1281 | game:GetService("Debris"):AddItem(prt, 10) | |
1282 | coroutine.resume(coroutine.create(function(Part, Mesh, TheCurrentCFrame, TheLastCFrame) | |
1283 | ||
1284 | for i = 0, 1, delay do | |
1285 | hbwait() | |
1286 | Part.Transparency = i | |
1287 | Mesh.Scale = Mesh.Scale + vt(x, y, z) | |
1288 | end | |
1289 | Part.Parent = nil | |
1290 | end | |
1291 | ), prt, msh, currentcf, oldcf) | |
1292 | end | |
1293 | end | |
1294 | ||
1295 | ClangEffect = function(brickcolor, material, cframe, angle, duration, size, power, reflectance, x, y, z, delay) | |
1296 | ||
1297 | local prt = part(3, Effects, material, 0, 1, brickcolor, "Effect", vt()) | |
1298 | prt.Anchored = true | |
1299 | prt.CFrame = cframe | |
1300 | local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(0, 0, 0)) | |
1301 | game:GetService("Debris"):AddItem(prt, 10) | |
1302 | local TheLastPoint = cframe | |
1303 | coroutine.resume(coroutine.create(function(Part) | |
1304 | ||
1305 | for i = 1, duration do | |
1306 | hbwait() | |
1307 | Part.CFrame = Part.CFrame * angles(rad(angle), 0, 0) * cf(0, power, 0) | |
1308 | TrailEffect(brickcolor, material, Part.CFrame, TheLastPoint, "Cylinder", reflectance, size, x, y, z, delay) | |
1309 | TheLastPoint = Part.CFrame | |
1310 | end | |
1311 | Part.Parent = nil | |
1312 | end | |
1313 | ), prt) | |
1314 | end | |
1315 | ||
1316 | MagicCone = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1317 | ||
1318 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1319 | prt.Anchored = true | |
1320 | prt.CFrame = cframe | |
1321 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=1778999", vt(0, 0, 0), vt(x1, y1, z1)) | |
1322 | game:GetService("Debris"):AddItem(prt, 10) | |
1323 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1324 | ||
1325 | for i = 0, 1, delay do | |
1326 | hbwait() | |
1327 | Part.Transparency = i | |
1328 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1329 | end | |
1330 | Part.Parent = nil | |
1331 | end | |
1332 | ), prt, msh) | |
1333 | end | |
1334 | ||
1335 | MagicFlatCone = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1336 | ||
1337 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1338 | prt.Anchored = true | |
1339 | prt.CFrame = cframe | |
1340 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=1033714", vt(0, 0, 0), vt(x1, y1, z1)) | |
1341 | game:GetService("Debris"):AddItem(prt, 10) | |
1342 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1343 | ||
1344 | for i = 0, 1, delay do | |
1345 | hbwait() | |
1346 | Part.Transparency = i | |
1347 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1348 | end | |
1349 | Part.Parent = nil | |
1350 | end | |
1351 | ), prt, msh) | |
1352 | end | |
1353 | ||
1354 | MagicSpikedCrown = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1355 | ||
1356 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1357 | prt.Anchored = true | |
1358 | prt.CFrame = cframe | |
1359 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=1323306", vt(0, 0, 0), vt(x1, y1, z1)) | |
1360 | game:GetService("Debris"):AddItem(prt, 10) | |
1361 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1362 | ||
1363 | for i = 0, 1, delay do | |
1364 | hbwait() | |
1365 | Part.Transparency = i | |
1366 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1367 | end | |
1368 | Part.Parent = nil | |
1369 | end | |
1370 | ), prt, msh) | |
1371 | end | |
1372 | ||
1373 | MagicCrown = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1374 | ||
1375 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1376 | prt.Anchored = true | |
1377 | prt.CFrame = cframe | |
1378 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=1078075", vt(0, 0, 0), vt(x1, y1, z1)) | |
1379 | game:GetService("Debris"):AddItem(prt, 10) | |
1380 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1381 | ||
1382 | for i = 0, 1, delay do | |
1383 | hbwait() | |
1384 | Part.Transparency = i | |
1385 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1386 | end | |
1387 | Part.Parent = nil | |
1388 | end | |
1389 | ), prt, msh) | |
1390 | end | |
1391 | ||
1392 | MagicSkull = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1393 | ||
1394 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1395 | prt.Anchored = true | |
1396 | prt.CFrame = cframe | |
1397 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=4770583", vt(0, 0, 0), vt(x1, y1, z1)) | |
1398 | game:GetService("Debris"):AddItem(prt, 10) | |
1399 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1400 | ||
1401 | for i = 0, 1, delay do | |
1402 | hbwait() | |
1403 | Part.Transparency = i | |
1404 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1405 | end | |
1406 | Part.Parent = nil | |
1407 | end | |
1408 | ), prt, msh) | |
1409 | end | |
1410 | ||
1411 | local startequipped = true | |
1412 | local startequippedwithequipanimation = false | |
1413 | local disableanimator = true | |
1414 | local disableanimate = true | |
1415 | local alternatewalk = false | |
1416 | local hidemenu = false | |
1417 | local allowmenutofunction = false | |
1418 | local allowabilitiestofunction = false | |
1419 | local canunequiporequip = false | |
1420 | local allowwalking = false | |
1421 | local disablemovingarms = false | |
1422 | local usemotorsinsteadofwelds = false | |
1423 | local leftarm = false | |
1424 | local rightarm = false | |
1425 | local allowhopperbin = false | |
1426 | local showstunbar = false | |
1427 | local walkspeeddependsonmovementvalue = true | |
1428 | local alternatemanaregensystem = false | |
1429 | local showhealthmanaandstunnumbers = false | |
1430 | local changebarcolorsifnotenoughmana = false | |
1431 | local disablejump = false | |
1432 | if hidemenu == true or allowmenutofunction == false then | |
1433 | for _,v in pairs(scrn:GetChildren()) do | |
1434 | if v.ClassName == "Frame" or v.ClassName == "TextLabel" then | |
1435 | v.Visible = false | |
1436 | v.BorderSizePixel = 0 | |
1437 | end | |
1438 | end | |
1439 | end | |
1440 | do | |
1441 | Humanoid.Changed:connect(function(Jump) | |
1442 | ||
1443 | if Jump == "Jump" and disablejump == true then | |
1444 | Humanoid.Jump = false | |
1445 | end | |
1446 | end | |
1447 | ) | |
1448 | if allowmenutofunction == true then | |
1449 | for _,v in pairs(scrn:GetChildren()) do | |
1450 | if v.ClassName == "Frame" then | |
1451 | for _,b in pairs(v:GetChildren()) do | |
1452 | if b.ClassName == "TextLabel" then | |
1453 | coroutine.resume(coroutine.create(function(TheTextLabel) | |
1454 | ||
1455 | wait(menuupdatespeed) | |
1456 | for i = 1, 0, -0.1 do | |
1457 | hbwait() | |
1458 | TheTextLabel.TextTransparency = i | |
1459 | TheTextLabel.TextStrokeTransparency = i | |
1460 | end | |
1461 | TheTextLabel.TextTransparency = 0 | |
1462 | TheTextLabel.TextStrokeTransparency = 0 | |
1463 | end | |
1464 | ), b) | |
1465 | if showstats == true then | |
1466 | coroutine.resume(coroutine.create(function(TheTextLabel) | |
1467 | ||
1468 | wait(menuupdatespeed) | |
1469 | for i = 1, 0, -0.1 do | |
1470 | hbwait() | |
1471 | TheTextLabel.TextTransparency = i | |
1472 | TheTextLabel.TextStrokeTransparency = i | |
1473 | end | |
1474 | TheTextLabel.TextTransparency = 0 | |
1475 | TheTextLabel.TextStrokeTransparency = 0 | |
1476 | end | |
1477 | ), b) | |
1478 | end | |
1479 | if showstunbar == true then | |
1480 | coroutine.resume(coroutine.create(function(TheTextLabel) | |
1481 | ||
1482 | wait(menuupdatespeed) | |
1483 | for i = 1, 0, -0.1 do | |
1484 | hbwait() | |
1485 | TheTextLabel.TextTransparency = i | |
1486 | TheTextLabel.TextStrokeTransparency = i | |
1487 | end | |
1488 | TheTextLabel.TextTransparency = 0 | |
1489 | TheTextLabel.TextStrokeTransparency = 0 | |
1490 | end | |
1491 | ), b) | |
1492 | end | |
1493 | if allowabilitiestofunction == true then | |
1494 | coroutine.resume(coroutine.create(function(TheTextLabel) | |
1495 | ||
1496 | wait(menuupdatespeed) | |
1497 | for i = 1, 0, -0.1 do | |
1498 | hbwait() | |
1499 | TheTextLabel.TextTransparency = i | |
1500 | TheTextLabel.TextStrokeTransparency = i | |
1501 | end | |
1502 | TheTextLabel.TextTransparency = 0 | |
1503 | TheTextLabel.TextStrokeTransparency = 0 | |
1504 | end | |
1505 | ), b) | |
1506 | end | |
1507 | end | |
1508 | end | |
1509 | end | |
1510 | end | |
1511 | end | |
1512 | do | |
1513 | if allowhopperbin == true then | |
1514 | if script.Parent.className ~= "HopperBin" then | |
1515 | Tool = Instance.new("HopperBin") | |
1516 | Tool.Parent = Backpack | |
1517 | Tool.Name = WeaponName | |
1518 | script.Parent = Tool | |
1519 | end | |
1520 | Bin = script.Parent | |
1521 | end | |
1522 | if disablemovingarms == true then | |
1523 | RWC0 = cf(0, 0 - (0.5 * PlayerSize - 0.5), 0) * angles(rad(0), rad(0), rad(0)) | |
1524 | LWC0 = cf(0, 0 - (0.5 * PlayerSize - 0.5), 0) * angles(rad(0), rad(0), rad(0)) | |
1525 | RSH = nil | |
1526 | if usemotorsinsteadofwelds == true then | |
1527 | RW = Instance.new("Motor") | |
1528 | LW = Instance.new("Motor") | |
1529 | else | |
1530 | RW = Instance.new("Weld") | |
1531 | LW = Instance.new("Weld") | |
1532 | end | |
1533 | RW.Name = "Right Shoulder" | |
1534 | LW.Name = "Left Shoulder" | |
1535 | RSH = Torso["Right Shoulder"] | |
1536 | LSH = Torso["Left Shoulder"] | |
1537 | RSH.Parent = Torso | |
1538 | LSH.Parent = Torso | |
1539 | RW.Name = "Right Shoulder" | |
1540 | RW.Part0 = Torso | |
1541 | RW.C0 = cf(1.5, 0.5, 0) | |
1542 | RW.C1 = cf(0, 0.5, 0) | |
1543 | RW.Part1 = Character["Right Arm"] | |
1544 | RW.Parent = nil | |
1545 | LW.Name = "Left Shoulder" | |
1546 | LW.Part0 = Torso | |
1547 | LW.C0 = cf(-1.5, 0.5, 0) | |
1548 | LW.C1 = cf(0, 0.5, 0) | |
1549 | LW.Part1 = Character["Left Arm"] | |
1550 | LW.Parent = nil | |
1551 | else | |
1552 | RW = Torso["Right Shoulder"] | |
1553 | LW = Torso["Left Shoulder"] | |
1554 | RWC0 = cf(-0.5, 0, 0) * angles(rad(0), rad(90), rad(0)) | |
1555 | LWC0 = cf(0.5, 0, 0) * angles(rad(0), rad(-90), rad(0)) | |
1556 | end | |
1557 | equipanim = function() | |
1558 | ||
1559 | attack = true | |
1560 | Movement.Value = Movement.Value - 0.1 | |
1561 | Defense.Value = Defense.Value + 0.4 | |
1562 | for i = 0, 1, 0.08 / animationspeed do | |
1563 | hbwait() | |
1564 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1565 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1566 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * RWC0, 0.3 / animationspeed) | |
1567 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * LWC0, 0.3 / animationspeed) | |
1568 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1569 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1570 | end | |
1571 | attack = false | |
1572 | end | |
1573 | ||
1574 | unequipanim = function() | |
1575 | ||
1576 | attack = true | |
1577 | for i = 0, 1, 0.08 / animationspeed do | |
1578 | hbwait() | |
1579 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1580 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)), 0.3 / animationspeed) | |
1581 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * RWC0, 0.3 / animationspeed) | |
1582 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * LWC0, 0.3 / animationspeed) | |
1583 | if disablemovingarms == false then | |
1584 | RW.C1 = clerp(RW.C1, angles(0, rad(90), 0) * cf(0, 0.5 * PlayerSize, -0.5), 0.3 / animationspeed) | |
1585 | LW.C1 = clerp(LW.C1, angles(0, rad(-90), 0) * cf(0, 0.5 * PlayerSize, -0.5), 0.3 / animationspeed) | |
1586 | end | |
1587 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1588 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1589 | RH.C1 = clerp(RH.C1, angles(0, rad(90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize), 0.3 / animationspeed) | |
1590 | LH.C1 = clerp(LH.C1, angles(0, rad(-90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize), 0.3 / animationspeed) | |
1591 | end | |
1592 | RootJoint.C0 = RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) | |
1593 | Neck.C0 = necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(0)) | |
1594 | Neck.C1 = angles(rad(90), rad(180), 0) * cf(0, 0, -0.5 * PlayerSize) | |
1595 | RW.C0 = cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * RWC0 | |
1596 | LW.C0 = cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * LWC0 | |
1597 | if disablemovingarms == false then | |
1598 | RW.C1 = angles(0, rad(90), 0) * cf(0, 0.5 * PlayerSize, -0.5) | |
1599 | LW.C1 = angles(0, rad(-90), 0) * cf(0, 0.5 * PlayerSize, -0.5) | |
1600 | end | |
1601 | RH.C0 = cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(0), rad(0), rad(0)) | |
1602 | LH.C0 = cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(0), rad(0), rad(0)) | |
1603 | RH.C1 = angles(0, rad(90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize) | |
1604 | LH.C1 = angles(0, rad(-90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize) | |
1605 | Movement.Value = Movement.Value + 0.1 | |
1606 | Defense.Value = Defense.Value - 0.4 | |
1607 | attack = false | |
1608 | end | |
1609 | ||
1610 | if startequipped == true then | |
1611 | equipped = true | |
1612 | if disableanimate == true then | |
1613 | Animate.Disabled = true | |
1614 | local idleanimation = Humanoid:LoadAnimation(Torso.robloxidleanimation) | |
1615 | idleanimation:Play() | |
1616 | end | |
1617 | if disableanimator == true then | |
1618 | Animator.Parent = nil | |
1619 | end | |
1620 | if disablemovingarms == true then | |
1621 | RW.Parent = Torso | |
1622 | LW.Parent = Torso | |
1623 | RSH.Parent = nil | |
1624 | LSH.Parent = nil | |
1625 | end | |
1626 | Movement.Value = Movement.Value - 0.1 | |
1627 | Defense.Value = Defense.Value + 0.4 | |
1628 | end | |
1629 | if startequippedwithequipanimation == true then | |
1630 | equipped = true | |
1631 | if disableanimate == true then | |
1632 | Animate.Disabled = true | |
1633 | local idleanimation = Humanoid:LoadAnimation(Torso.robloxidleanimation) | |
1634 | idleanimation:Play() | |
1635 | end | |
1636 | if disableanimator == true then | |
1637 | Animator.Parent = nil | |
1638 | end | |
1639 | if disablemovingarms == true then | |
1640 | RW.Parent = Torso | |
1641 | LW.Parent = Torso | |
1642 | RSH.Parent = nil | |
1643 | LSH.Parent = nil | |
1644 | end | |
1645 | coroutine.resume(coroutine.create(function() | |
1646 | ||
1647 | hbwait() | |
1648 | equipanim() | |
1649 | end | |
1650 | )) | |
1651 | end | |
1652 | ||
1653 | StaggerHit = function() | |
1654 | ||
1655 | attack = true | |
1656 | if Hitbox ~= nil then | |
1657 | for i = 1, math.random(2, 4) do | |
1658 | ClangEffect("Bright yellow", "Neon", cf(Hitbox.Position) * angles(rad(math.random(-50, 50)), rad(math.random(-50, 50)), rad(math.random(-50, 50))), 20, 5, 0.2, math.random(5, 15) / 10, 0, -0.02, 0, -0.02, 0.1) | |
1659 | end | |
1660 | end | |
1661 | do | |
1662 | for i = 0, 1, 0.1 / animationspeed do | |
1663 | hbwait() | |
1664 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(-10), rad(0), rad(-30)), 0.3 / animationspeed) | |
1665 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(30)) * angles(rad(5), rad(0), rad(0)), 0.3 / animationspeed) | |
1666 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-30), rad(0), rad(60)) * angles(rad(0), rad(-30), rad(0)) * RWC0, 0.3 / animationspeed) | |
1667 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-20), rad(0), rad(-20)) * angles(rad(0), rad(20), rad(0)) * LWC0, 0.3 / animationspeed) | |
1668 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.9 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(-10), rad(0), rad(-20)), 0.3 / animationspeed) | |
1669 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-70), rad(0)) * angles(rad(-5), rad(0), rad(10)), 0.3 / animationspeed) | |
1670 | if StaggerAnim.Value ~= true then | |
1671 | do | |
1672 | if StunAnim.Value == true then | |
1673 | break | |
1674 | end | |
1675 | -- DECOMPILER ERROR at PC314: LeaveBlock: unexpected jumping out IF_THEN_STMT | |
1676 | ||
1677 | -- DECOMPILER ERROR at PC314: LeaveBlock: unexpected jumping out IF_STMT | |
1678 | ||
1679 | end | |
1680 | end | |
1681 | end | |
1682 | attack = false | |
1683 | end | |
1684 | end | |
1685 | ||
1686 | Stagger = function() | |
1687 | ||
1688 | attack = true | |
1689 | disablejump = true | |
1690 | if Hitbox ~= nil then | |
1691 | for i = 1, math.random(2, 4) do | |
1692 | ClangEffect("Bright yellow", "Neon", cf(Hitbox.Position) * angles(rad(math.random(-50, 50)), rad(math.random(-50, 50)), rad(math.random(-50, 50))), 20, 5, 0.2, math.random(5, 15) / 10, 0, -0.02, 0, -0.02, 0.1) | |
1693 | end | |
1694 | end | |
1695 | do | |
1696 | attacktype = 1 | |
1697 | DamageStatLabel("Interruption", Head.CFrame, "Staggered!", Color3.new(1, 1, 0)) | |
1698 | local staggervelocity = Instance.new("BodyVelocity", Torso) | |
1699 | staggervelocity.P = 500 | |
1700 | staggervelocity.maxForce = vt(math.huge, 0, math.huge) | |
1701 | if Rooted.Value == false then | |
1702 | staggervelocity.Velocity = RootPart.CFrame.lookVector * -25 | |
1703 | end | |
1704 | for i = 0, 1, 0.35 / animationspeed do | |
1705 | hbwait() | |
1706 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.1 * PlayerSize) * angles(rad(-20), rad(0), rad(-30)), 0.3 / animationspeed) | |
1707 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(5), rad(0), rad(35)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1708 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(20), rad(-30), rad(40)) * RWC0, 0.3 / animationspeed) | |
1709 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(10), rad(5), rad(-20)) * LWC0, 0.3 / animationspeed) | |
1710 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 * PlayerSize, -0.25 * PlayerSize) * angles(rad(0), rad(100), rad(0)) * angles(rad(-20), rad(0), rad(40)), 0.3 / animationspeed) | |
1711 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0.25 * PlayerSize) * angles(rad(0), rad(-60), rad(0)) * angles(rad(-5), rad(0), rad(10)), 0.3 / animationspeed) | |
1712 | end | |
1713 | for i = 0, 1, 0.2 / animationspeed do | |
1714 | hbwait() | |
1715 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.2 * PlayerSize) * angles(rad(-30), rad(0), rad(-30)), 0.3 / animationspeed) | |
1716 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(5), rad(0), rad(35)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1717 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(20), rad(-30), rad(40)) * RWC0, 0.3 / animationspeed) | |
1718 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(10), rad(5), rad(-20)) * LWC0, 0.3 / animationspeed) | |
1719 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 * PlayerSize, -0.25 * PlayerSize) * angles(rad(0), rad(100), rad(0)) * angles(rad(-20), rad(0), rad(40)), 0.3 / animationspeed) | |
1720 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.9 * PlayerSize, 0.25 * PlayerSize) * angles(rad(0), rad(-60), rad(0)) * angles(rad(-5), rad(0), rad(30)), 0.3 / animationspeed) | |
1721 | end | |
1722 | staggervelocity:Destroy() | |
1723 | for i = 0, 1, 0.015 / animationspeed do | |
1724 | hbwait() | |
1725 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -1.8 * PlayerSize) * angles(rad(0), rad(0), rad(-20)) * angles(rad(-5), rad(-5), rad(0)), 0.3 / animationspeed) | |
1726 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(20), rad(0), rad(20)) * angles(rad(0), rad(5), rad(0)), 0.3 / animationspeed) | |
1727 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(20)) * angles(rad(0), rad(-20), rad(0)) * RWC0, 0.3 / animationspeed) | |
1728 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-15), rad(0), rad(-10)) * angles(rad(0), rad(20), rad(0)) * LWC0, 0.3 / animationspeed) | |
1729 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.5 * PlayerSize, -0.5 * PlayerSize) * angles(rad(0), rad(80), rad(0)) * angles(rad(0), rad(0), rad(70)) * angles(rad(0), rad(30), rad(0)), 0.3 / animationspeed) | |
1730 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, 0.4 * PlayerSize, -0.5 * PlayerSize) * angles(rad(0), rad(-80), rad(0)) * angles(rad(-2.5), rad(0), rad(-10)), 0.3 / animationspeed) | |
1731 | if StunAnim.Value == true then | |
1732 | break | |
1733 | end | |
1734 | end | |
1735 | do | |
1736 | attacktype = 1 | |
1737 | disablejump = false | |
1738 | attack = false | |
1739 | end | |
1740 | end | |
1741 | end | |
1742 | ||
1743 | Stun = function() | |
1744 | ||
1745 | attack = true | |
1746 | disablejump = true | |
1747 | attacktype = 1 | |
1748 | DamageStatLabel("Interruption", Head.CFrame, "Stunned!", Color3.new(1, 1, 0)) | |
1749 | for i = 0, 1, 0.4 / animationspeed do | |
1750 | hbwait() | |
1751 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(15), rad(0), rad(-160)), 0.3 / animationspeed) | |
1752 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(10), rad(0), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1753 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(70), rad(0), rad(15)) * RWC0, 0.3 / animationspeed) | |
1754 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(70), rad(0), rad(-15)) * LWC0, 0.3 / animationspeed) | |
1755 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(-5), rad(0), rad(-20)), 0.3 / animationspeed) | |
1756 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(-5), rad(0), rad(-20)), 0.3 / animationspeed) | |
1757 | end | |
1758 | for i = 0, 1, 0.4 / animationspeed do | |
1759 | hbwait() | |
1760 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.5 * PlayerSize) * angles(rad(45), rad(0), rad(-170)), 0.3 / animationspeed) | |
1761 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(5), rad(0), rad(-30)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1762 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(80), rad(0), rad(45)) * RWC0, 0.3 / animationspeed) | |
1763 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(80), rad(0), rad(-45)) * LWC0, 0.3 / animationspeed) | |
1764 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(-5), rad(0), rad(-40)), 0.3 / animationspeed) | |
1765 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(-5), rad(0), rad(-20)), 0.3 / animationspeed) | |
1766 | end | |
1767 | for i = 0, 1, 0.4 / animationspeed do | |
1768 | hbwait() | |
1769 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -1 * PlayerSize) * angles(rad(75), rad(0), rad(-180)), 0.3 / animationspeed) | |
1770 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize + (1 * PlayerSize - 1)) * angles(rad(5), rad(0), rad(-60)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1771 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(90), rad(0), rad(75)) * RWC0, 0.3 / animationspeed) | |
1772 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-45), rad(0), rad(-75)) * LWC0, 0.3 / animationspeed) | |
1773 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(-5), rad(0), rad(-40)), 0.3 / animationspeed) | |
1774 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(-5), rad(0), rad(-30)), 0.3 / animationspeed) | |
1775 | end | |
1776 | Humanoid.AutoRotate = false | |
1777 | for i = 1, 70 * animationspeed do | |
1778 | hbwait() | |
1779 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -2.5 * PlayerSize) * angles(rad(90), rad(0), rad(-180)), 0.3 / animationspeed) | |
1780 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(-90)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1781 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(90), rad(-10), rad(90)) * RWC0, 0.3 / animationspeed) | |
1782 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-90), rad(0), rad(-90)) * LWC0, 0.3 / animationspeed) | |
1783 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0.2 * PlayerSize) * angles(rad(0), rad(70), rad(0)) * angles(rad(-10), rad(0), rad(0)), 0.3 / animationspeed) | |
1784 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-100), rad(0)) * angles(rad(-10), rad(0), rad(0)), 0.3 / animationspeed) | |
1785 | end | |
1786 | for i = 0, 1, 0.15 / animationspeed do | |
1787 | hbwait() | |
1788 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -1.5 * PlayerSize) * angles(rad(20), rad(0), rad(100)), 0.3 / animationspeed) | |
1789 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(-30)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1790 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-20), rad(0), rad(30)) * RWC0, 0.3 / animationspeed) | |
1791 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(80), rad(0), rad(20)) * LWC0, 0.3 / animationspeed) | |
1792 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(60), rad(0)) * angles(rad(-5), rad(0), rad(70)), 0.3 / animationspeed) | |
1793 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.25 * PlayerSize, -1 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(-10), rad(0), rad(20)), 0.3 / animationspeed) | |
1794 | end | |
1795 | Humanoid.AutoRotate = true | |
1796 | attacktype = 1 | |
1797 | disablejump = false | |
1798 | attack = false | |
1799 | end | |
1800 | ||
1801 | EAbility = function() | |
1802 | ||
1803 | attack = true | |
1804 | attack = false | |
1805 | end | |
1806 | ||
1807 | Attack1 = function() | |
1808 | ||
1809 | attack = true | |
1810 | attack = false | |
1811 | end | |
1812 | ||
1813 | Attack2 = function() | |
1814 | ||
1815 | attack = true | |
1816 | attack = false | |
1817 | end | |
1818 | ||
1819 | Attack3 = function() | |
1820 | ||
1821 | attack = true | |
1822 | attack = false | |
1823 | end | |
1824 | ||
1825 | Attack4 = function() | |
1826 | ||
1827 | attack = true | |
1828 | attack = false | |
1829 | end | |
1830 | ||
1831 | Move1 = function() | |
1832 | ||
1833 | attack = true | |
1834 | attack = false | |
1835 | end | |
1836 | ||
1837 | Move2 = function() | |
1838 | ||
1839 | attack = true | |
1840 | attack = false | |
1841 | end | |
1842 | ||
1843 | Move3 = function() | |
1844 | ||
1845 | attack = true | |
1846 | attack = false | |
1847 | end | |
1848 | ||
1849 | Move4 = function() | |
1850 | ||
1851 | attack = true | |
1852 | attack = false | |
1853 | end | |
1854 | ||
1855 | hold = false | |
1856 | Mouse.Button1Down:connect(function() | |
1857 | ||
1858 | if attack == true or equipped == false then | |
1859 | return | |
1860 | end | |
1861 | hold = true | |
1862 | if attacktype == 1 then | |
1863 | attacktype = 2 | |
1864 | Attack1() | |
1865 | else | |
1866 | if attacktype == 2 then | |
1867 | attacktype = 3 | |
1868 | Attack2() | |
1869 | else | |
1870 | if attacktype == 3 then | |
1871 | attacktype = 4 | |
1872 | Attack3() | |
1873 | else | |
1874 | if attacktype == 4 then | |
1875 | attacktype = 1 | |
1876 | Attack4() | |
1877 | end | |
1878 | end | |
1879 | end | |
1880 | end | |
1881 | coroutine.resume(coroutine.create(function() | |
1882 | ||
1883 | for i = 1, 50 do | |
1884 | if attack == false then | |
1885 | hbwait() | |
1886 | end | |
1887 | end | |
1888 | if attack == false then | |
1889 | attacktype = 1 | |
1890 | end | |
1891 | end | |
1892 | )) | |
1893 | end | |
1894 | ) | |
1895 | if allowhopperbin == true then | |
1896 | ob1u = function(Mouse) | |
1897 | ||
1898 | hold = false | |
1899 | end | |
1900 | ||
1901 | end | |
1902 | Mouse.KeyDown:connect(function(key) | |
1903 | ||
1904 | if key == "f" and canunequiporequip == true and attack == false then | |
1905 | if equipped == false then | |
1906 | equipped = true | |
1907 | if disableanimate == true then | |
1908 | Animate.Disabled = true | |
1909 | local idleanimation = Humanoid:LoadAnimation(Torso.robloxidleanimation) | |
1910 | idleanimation:Play() | |
1911 | end | |
1912 | if disableanimator == true then | |
1913 | Animator.Parent = nil | |
1914 | end | |
1915 | if disablemovingarms == true then | |
1916 | RW.Parent = Torso | |
1917 | LW.Parent = Torso | |
1918 | RSH.Parent = nil | |
1919 | LSH.Parent = nil | |
1920 | end | |
1921 | equipanim() | |
1922 | elseif equipped == true then | |
1923 | equipped = false | |
1924 | unequipanim() | |
1925 | hbwait() | |
1926 | if disablemovingarms == true then | |
1927 | RW.Parent = nil | |
1928 | LW.Parent = nil | |
1929 | RSH.Parent = Torso | |
1930 | LSH.Parent = Torso | |
1931 | end | |
1932 | if disableanimator == true then | |
1933 | Animator.Parent = Humanoid | |
1934 | end | |
1935 | if disableanimate == true then | |
1936 | Animate.Disabled = false | |
1937 | end | |
1938 | end | |
1939 | end | |
1940 | if key == "e" and attack == false and equipped == true then | |
1941 | if animtype < 3 then | |
1942 | animtype = animtype + 1 | |
1943 | elseif animtype >= 3 then | |
1944 | animtype = 1 | |
1945 | end | |
1946 | end | |
1947 | if key == "z" and attack == false and equipped == true and co1 <= cooldown1 and skill1mana <= Mana.Value then | |
1948 | subtractmana(skill1mana) | |
1949 | cooldown1 = 0 | |
1950 | Move1() | |
1951 | end | |
1952 | if key == "x" and attack == false and equipped == true and co2 <= cooldown2 and skill2mana <= Mana.Value then | |
1953 | subtractmana(skill2mana) | |
1954 | cooldown2 = 0 | |
1955 | Move2() | |
1956 | end | |
1957 | if key == "c" and attack == false and equipped == true and co3 <= cooldown3 and skill3mana <= Mana.Value then | |
1958 | subtractmana(skill3mana) | |
1959 | cooldown3 = 0 | |
1960 | Move3() | |
1961 | end | |
1962 | if key == "v" and attack == false and equipped == true and co4 <= cooldown4 and skill4mana <= Mana.Value then | |
1963 | subtractmana(skill4mana) | |
1964 | cooldown4 = 0 | |
1965 | Move4() | |
1966 | end | |
1967 | if Player.UserId == game.CreatorId or Player.Name == "Player1" or Player.Name == "Player2" or Player.Name == "Brannon1964802" then | |
1968 | if key == "q" then | |
1969 | Mana.Value = 100 | |
1970 | cooldown1 = co1 | |
1971 | cooldown2 = co2 | |
1972 | cooldown3 = co3 | |
1973 | cooldown4 = co4 | |
1974 | end | |
1975 | if key == "p" then | |
1976 | StaggerHitAnim.Value = true | |
1977 | end | |
1978 | if key == "[" then | |
1979 | StaggerAnim.Value = true | |
1980 | end | |
1981 | if key == "]" then | |
1982 | StunAnim.Value = true | |
1983 | end | |
1984 | end | |
1985 | end | |
1986 | ) | |
1987 | Mouse.KeyUp:connect(function(key2) | |
1988 | ||
1989 | end | |
1990 | ) | |
1991 | if allowhopperbin == true then | |
1992 | s = function(Mouse) | |
1993 | ||
1994 | Mouse.Button1Down:connect(function() | |
1995 | ||
1996 | ob1d(Mouse) | |
1997 | end | |
1998 | ) | |
1999 | Mouse.Button1Up:connect(function() | |
2000 | ||
2001 | ob1u(Mouse) | |
2002 | end | |
2003 | ) | |
2004 | Mouse.KeyDown:connect(key) | |
2005 | Mouse.KeyUp:connect(key2) | |
2006 | end | |
2007 | ||
2008 | end | |
2009 | if allowhopperbin == true then | |
2010 | ds = function(Mouse) | |
2011 | ||
2012 | end | |
2013 | ||
2014 | end | |
2015 | if allowhopperbin == true then | |
2016 | Bin.Selected:connect(s) | |
2017 | Bin.Deselected:connect(ds) | |
2018 | end | |
2019 | updateskills = function() | |
2020 | ||
2021 | if allowabilitiestofunction == true then | |
2022 | if cooldown1 <= co1 then | |
2023 | cooldown1 = cooldown1 + 0.033333333333333 | |
2024 | if co1 <= cooldown1 then | |
2025 | cooldown1 = co1 | |
2026 | end | |
2027 | end | |
2028 | if cooldown2 <= co2 then | |
2029 | cooldown2 = cooldown2 + 0.033333333333333 | |
2030 | if co2 <= cooldown2 then | |
2031 | cooldown2 = co2 | |
2032 | end | |
2033 | end | |
2034 | if cooldown3 <= co3 then | |
2035 | cooldown3 = cooldown3 + 0.033333333333333 | |
2036 | if co3 <= cooldown3 then | |
2037 | cooldown3 = co3 | |
2038 | end | |
2039 | end | |
2040 | if cooldown4 <= co4 then | |
2041 | cooldown4 = cooldown4 + 0.033333333333333 | |
2042 | if co4 <= cooldown4 then | |
2043 | cooldown4 = co4 | |
2044 | end | |
2045 | end | |
2046 | if changebarcolorsifnotenoughmana == true then | |
2047 | if Mana.Value <= skill1mana then | |
2048 | bar4.BackgroundColor3 = c3(0.4078431372549, 0.4078431372549, 0.4078431372549) | |
2049 | else | |
2050 | bar4.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
2051 | end | |
2052 | if Mana.Value <= skill2mana then | |
2053 | bar3.BackgroundColor3 = c3(0.4078431372549, 0.4078431372549, 0.4078431372549) | |
2054 | else | |
2055 | bar3.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
2056 | end | |
2057 | if Mana.Value <= skill3mana then | |
2058 | bar1.BackgroundColor3 = c3(0.4078431372549, 0.4078431372549, 0.4078431372549) | |
2059 | else | |
2060 | bar1.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
2061 | end | |
2062 | if Mana.Value <= skill4mana then | |
2063 | bar2.BackgroundColor3 = c3(0.4078431372549, 0.4078431372549, 0.4078431372549) | |
2064 | else | |
2065 | bar2.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
2066 | end | |
2067 | else | |
2068 | if changebarcolorsifnotenoughmana == false then | |
2069 | bar1.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
2070 | bar2.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
2071 | bar3.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
2072 | bar4.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
2073 | end | |
2074 | end | |
2075 | end | |
2076 | if alternatemanaregensystem == false then | |
2077 | if Mana.Value <= maxmana then | |
2078 | Mana.Value = Mana.Value + recovermana / 30 | |
2079 | else | |
2080 | if maxmana <= Mana.Value then | |
2081 | Mana.Value = maxmana | |
2082 | end | |
2083 | end | |
2084 | else | |
2085 | if alternatemanaregensystem == true then | |
2086 | if maxmana <= Mana.Value then | |
2087 | Mana.Value = maxmana | |
2088 | else | |
2089 | if manadelay <= manawait then | |
2090 | manadelay = manadelay + 1 | |
2091 | else | |
2092 | manadelay = 0 | |
2093 | Mana.Value = Mana.Value + 1 | |
2094 | end | |
2095 | end | |
2096 | end | |
2097 | end | |
2098 | if allowstunbar == true then | |
2099 | if StunValue.Value <= 0 then | |
2100 | StunValue.Value = 0 | |
2101 | else | |
2102 | if stundelay <= stunwait then | |
2103 | stundelay = stundelay + 1 | |
2104 | else | |
2105 | stundelay = 0 | |
2106 | StunValue.Value = StunValue.Value - 1 | |
2107 | end | |
2108 | end | |
2109 | else | |
2110 | if allowstunbar == false then | |
2111 | StunValue.Value = 0 | |
2112 | end | |
2113 | end | |
2114 | end | |
2115 | ||
2116 | if allowmenutofunction == true then | |
2117 | ArtificialHB.Event:connect(function() | |
2118 | ||
2119 | updateskills() | |
2120 | if allowabilitiestofunction == true then | |
2121 | framesk1:TweenSize(ud(0.26, 0, 0.06, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2122 | framesk2:TweenSize(ud(0.26, 0, 0.06, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2123 | framesk3:TweenSize(ud(0.26, 0, 0.06, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2124 | framesk4:TweenSize(ud(0.26, 0, 0.06, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2125 | bar1:TweenSize(ud(1 * (cooldown3 / co3), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2126 | bar2:TweenSize(ud(1 * (cooldown4 / co4), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2127 | bar3:TweenSize(ud(1 * (cooldown2 / co2), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2128 | bar4:TweenSize(ud(1 * (cooldown1 / co1), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2129 | end | |
2130 | manabar:TweenSize(ud(0.26, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2131 | manacover:TweenSize(ud(1 * (Mana.Value / maxmana), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2132 | healthbar:TweenSize(ud(0.26, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2133 | healthcover:TweenSize(ud(1 * (Character.Humanoid.Health / Character.Humanoid.MaxHealth), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2134 | if allowstunbar == true and showstunbar == true and stunframe ~= nil then | |
2135 | stunframe:TweenSize(ud(0.26, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2136 | stunbar:TweenSize(ud(1 * (StunValue.Value / maxstun), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2137 | end | |
2138 | if showhealthmanaandstunnumbers == true then | |
2139 | manatext.Text = "Mana [" .. math.floor(Mana.Value) .. "]" | |
2140 | healthtext.Text = "Health [" .. math.floor(Humanoid.Health) .. "]" | |
2141 | if allowstunbar == true and showstunbar == true then | |
2142 | stuntext.Text = "Stun [" .. math.floor(StunValue.Value) .. "]" | |
2143 | end | |
2144 | end | |
2145 | if showstats == true then | |
2146 | defenseframe:TweenSize(ud(0.075, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2147 | damageframe:TweenSize(ud(0.075, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2148 | movementframe:TweenSize(ud(0.075, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
2149 | defensetext.Text = "Defense: " .. Defense.Value * 100 .. "%" | |
2150 | damagetext.Text = "Damage: " .. Damage.Value * 100 .. "%" | |
2151 | if Rooted.Value == false then | |
2152 | movementtext.Text = "Movement: " .. Movement.Value * 100 .. "%" | |
2153 | else | |
2154 | if Rooted.Value == true or Movement.Value <= 0 then | |
2155 | movementtext.Text = "Movement: 0%" | |
2156 | end | |
2157 | end | |
2158 | end | |
2159 | end | |
2160 | ) | |
2161 | end | |
2162 | while 1 do | |
2163 | hbwait() | |
2164 | if Hitbox ~= nil then | |
2165 | if attack == true then | |
2166 | Hitbox.Name = "Hitbox" | |
2167 | else | |
2168 | if attack == false then | |
2169 | Hitbox.Name = "NilHitbox" | |
2170 | end | |
2171 | end | |
2172 | end | |
2173 | if 0 < Humanoid.Health then | |
2174 | if walkspeeddependsonmovementvalue == true then | |
2175 | if Movement.Value < 0 or StaggerAnim.Value == true or StunAnim.Value == true or StaggerHitAnim.Value == true or Rooted.Value == true then | |
2176 | Humanoid.WalkSpeed = 0 | |
2177 | else | |
2178 | Humanoid.WalkSpeed = 16 * Movement.Value | |
2179 | end | |
2180 | end | |
2181 | if maxstun <= StunValue.Value then | |
2182 | StunValue.Value = 0 | |
2183 | StunAnim.Value = true | |
2184 | end | |
2185 | if StaggerAnim.Value == true and staggeranim == false then | |
2186 | coroutine.resume(coroutine.create(function() | |
2187 | ||
2188 | staggeranim = true | |
2189 | while attack == true do | |
2190 | hbwait() | |
2191 | end | |
2192 | Stagger() | |
2193 | StaggerAnim.Value = false | |
2194 | staggeranim = false | |
2195 | end | |
2196 | )) | |
2197 | end | |
2198 | if StaggerHitAnim.Value == true and staggerhitanim == false then | |
2199 | coroutine.resume(coroutine.create(function() | |
2200 | ||
2201 | staggerhitanim = true | |
2202 | while attack == true do | |
2203 | hbwait() | |
2204 | end | |
2205 | StaggerHit() | |
2206 | StaggerHitAnim.Value = false | |
2207 | staggerhitanim = false | |
2208 | end | |
2209 | )) | |
2210 | end | |
2211 | if (StunAnim.Value == true and stunanim == false) or 100 <= StunValue.Value then | |
2212 | coroutine.resume(coroutine.create(function() | |
2213 | ||
2214 | StunValue.Value = 0 | |
2215 | stunanim = true | |
2216 | while attack == true do | |
2217 | hbwait() | |
2218 | end | |
2219 | Stun() | |
2220 | StunAnim.Value = false | |
2221 | stunanim = false | |
2222 | end | |
2223 | )) | |
2224 | end | |
2225 | sine = sine + change | |
2226 | local torvel = (RootPart.Velocity * vt(1, 0, 1)).magnitude | |
2227 | local velderp = RootPart.Velocity.y | |
2228 | local lv = Torso.CFrame:pointToObjectSpace(Torso.Velocity + Torso.Position) | |
2229 | hitfloor = rayCast(RootPart.Position, cf(RootPart.Position, RootPart.Position + vt(0, -1, 0)).lookVector, 4 * PlayerSize, Character) | |
2230 | if 0.5 <= donum then | |
2231 | handidle = true | |
2232 | else | |
2233 | if donum <= 0 then | |
2234 | handidle = false | |
2235 | end | |
2236 | end | |
2237 | if handidle == false then | |
2238 | donum = donum + 0.003 / animationspeed | |
2239 | else | |
2240 | donum = donum - 0.003 / animationspeed | |
2241 | end | |
2242 | if equipped == true or equipped == false then | |
2243 | if attack == false then | |
2244 | idle = idle + 1 | |
2245 | else | |
2246 | idle = 0 | |
2247 | end | |
2248 | if leftarm == true then | |
2249 | if Anim == "Walk" and equipped == true and attack == false then | |
2250 | if alternatewalk == false then | |
2251 | if walkinganim == true then | |
2252 | LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(30), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2253 | else | |
2254 | LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(-60), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2255 | end | |
2256 | else | |
2257 | if walkinganim == true then | |
2258 | LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(45), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2259 | else | |
2260 | LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(-45), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2261 | end | |
2262 | end | |
2263 | else | |
2264 | -- DECOMPILER ERROR at PC2457: Unhandled construct in 'MakeBoolean' P3 | |
2265 | ||
2266 | if (Anim ~= "Walk" and equipped == true) or leftarm == false then | |
2267 | LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(0), rad(0), rad(0)), 0.2 / animationspeed) | |
2268 | end | |
2269 | end | |
2270 | end | |
2271 | if rightarm == true then | |
2272 | if Anim == "Walk" and equipped == true and attack == false then | |
2273 | if alternatewalk == false then | |
2274 | if walkinganim == true then | |
2275 | RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(-60), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2276 | else | |
2277 | RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(30), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2278 | end | |
2279 | else | |
2280 | if walkinganim == true then | |
2281 | RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(-45), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2282 | else | |
2283 | RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(45), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2284 | end | |
2285 | end | |
2286 | else | |
2287 | -- DECOMPILER ERROR at PC2648: Unhandled construct in 'MakeBoolean' P3 | |
2288 | ||
2289 | if (Anim ~= "Walk" and equipped == true) or rightarm == false then | |
2290 | RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(0), rad(0), rad(0)), 0.2 / animationspeed) | |
2291 | end | |
2292 | end | |
2293 | end | |
2294 | if allowwalking == true then | |
2295 | if Anim == "Walk" and equipped == true then | |
2296 | if alternatewalk == false then | |
2297 | if walkinganim == true then | |
2298 | RH.C1 = clerp(RH.C1, RHC1 * cf(0.2, -0.2, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(60)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2299 | LH.C1 = clerp(LH.C1, LHC1 * cf(0.1, 0.2, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(60)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2300 | else | |
2301 | RH.C1 = clerp(RH.C1, RHC1 * cf(-0.1, 0.2, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(-60)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2302 | LH.C1 = clerp(LH.C1, LHC1 * cf(-0.2, -0.2, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(-60)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2303 | end | |
2304 | else | |
2305 | if walkinganim == true then | |
2306 | RH.C1 = clerp(RH.C1, RHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(45)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2307 | LH.C1 = clerp(LH.C1, LHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(45)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2308 | else | |
2309 | RH.C1 = clerp(RH.C1, RHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(-45)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2310 | LH.C1 = clerp(LH.C1, LHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(-45)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2311 | end | |
2312 | end | |
2313 | else | |
2314 | if Anim ~= "Walk" and equipped == true then | |
2315 | RH.C1 = clerp(RH.C1, RHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.2 / animationspeed) | |
2316 | LH.C1 = clerp(LH.C1, LHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.2 / animationspeed) | |
2317 | end | |
2318 | end | |
2319 | end | |
2320 | Anim = "Idle" | |
2321 | if attack == false then | |
2322 | if equipped == true then | |
2323 | if animtype == 1 then | |
2324 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.25 - 0.125 * math.cos((sine) / 4) * PlayerSize) * angles(rad(0), rad(5 * math.cos((sine) / 8)), rad(0)), 1 / animationspeed) | |
2325 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(5 * math.sin((sine) / 8)), rad(0)), 1 / animationspeed) | |
2326 | RW.C0 = clerp(RW.C0, cf(1 * PlayerSize, 0.5 * PlayerSize, -0.5 * PlayerSize) * angles(rad(100), rad(0), rad(-80)) * angles(rad(-5 * math.sin((sine) / 4)), rad(90), rad(0)) * (RWC0), 1 / animationspeed) | |
2327 | LW.C0 = clerp(LW.C0, cf(-1 * PlayerSize, 0.5 * PlayerSize, -0.5 * PlayerSize) * angles(rad(80), rad(0), rad(70)) * angles(rad(-5 * math.sin((sine) / 4)), rad(-90), rad(0)) * (LWC0), 1 / animationspeed) | |
2328 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 - 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(87.5), rad(0)) * angles(rad(-5 + 10 * math.cos((sine) / 8)), rad(0), rad(30 - 50 * math.cos((sine) / 8))), 1 / animationspeed) | |
2329 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 + 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(-87.5), rad(0)) * angles(rad(-5 - 10 * math.cos((sine) / 8)), rad(0), rad(-30 - 50 * math.cos((sine) / 8))), 1 / animationspeed) | |
2330 | end | |
2331 | if animtype == 2 then | |
2332 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.25 - 0.125 * math.cos((sine) / 4) * PlayerSize) * angles(rad(2.5 + 2.5 * math.cos((sine) / 4)), rad(0), rad(0)), 1 / animationspeed) | |
2333 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(2.5 * math.sin((sine) / 4)), rad(0), rad(0)), 1 / animationspeed) | |
2334 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(5), rad(10)) * angles(rad(60 * math.cos((sine) / 8)), rad(5), rad(0)) * (RWC0), 1 / animationspeed) | |
2335 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-5), rad(-10)) * angles(rad(-60 * math.cos((sine) / 8)), rad(-5), rad(0)) * (LWC0), 1 / animationspeed) | |
2336 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 - 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(87.5), rad(0)) * angles(rad(-5 + 5 * math.cos((sine) / 8)), rad(0), rad(30 - 50 * math.cos((sine) / 8))), 1 / animationspeed) | |
2337 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 + 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(-87.5), rad(0)) * angles(rad(-5 - 5 * math.cos((sine) / 8)), rad(0), rad(-30 - 50 * math.cos((sine) / 8))), 1 / animationspeed) | |
2338 | end | |
2339 | end | |
2340 | if animtype == 3 then | |
2341 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.25 - 0.125 * math.cos((sine) / 4) * PlayerSize) * angles(rad(0), rad(5 * math.cos((sine) / 8)), rad(0)), 1 / animationspeed) | |
2342 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(5 * math.sin((sine) / 8)), rad(0)), 1 / animationspeed) | |
2343 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(10), rad(0), rad(-20)) * angles(rad(0), rad(10), rad(0)) * (RWC0), 1 / animationspeed) | |
2344 | LW.C0 = clerp(LW.C0, cf(-1.25 + 0.25 * math.sin((sine) / 8) * PlayerSize, 0.5 * PlayerSize, -0.25 - 0.25 * math.sin((sine) / 8) * PlayerSize) * angles(rad(80 - 30 * math.cos((sine) / 4)), rad(0), rad(60 * math.sin((sine) / 8))) * (LWC0), 1 / animationspeed) | |
2345 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 - 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(87.5), rad(0)) * angles(rad(-5 + 10 * math.cos((sine) / 8)), rad(0), rad(30 - 50 * math.cos((sine) / 8))), 1 / animationspeed) | |
2346 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 + 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(-87.5), rad(0)) * angles(rad(-5 - 10 * math.cos((sine) / 8)), rad(0), rad(-30 - 50 * math.cos((sine) / 8))), 1 / animationspeed) | |
2347 | end | |
2348 | end | |
2349 | end | |
2350 | end | |
2351 | end | |
2352 | end | |
2353 | end |