SHOW:
|
|
- or go back to the newest paste.
1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
3 | local Player,game,owner = owner,game | |
4 | local RealPlayer = Player | |
5 | do | |
6 | print("FE Compatibility code V2 by Mokiros") | |
7 | local RealPlayer = RealPlayer | |
8 | script.Parent = RealPlayer.Character | |
9 | ||
10 | --Fake event to make stuff like Mouse.KeyDown work | |
11 | local Disconnect_Function = function(this) | |
12 | this[1].Functions[this[2]] = nil | |
13 | end | |
14 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}} | |
15 | local FakeEvent_Metatable = {__index={ | |
16 | Connect = function(this,f) | |
17 | local i = tostring(math.random(0,10000)) | |
18 | while this.Functions[i] do | |
19 | i = tostring(math.random(0,10000)) | |
20 | end | |
21 | this.Functions[i] = f | |
22 | return setmetatable({this,i},Disconnect_Metatable) | |
23 | end | |
24 | }} | |
25 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
26 | local function fakeEvent() | |
27 | return setmetatable({Functions={}},FakeEvent_Metatable) | |
28 | end | |
29 | ||
30 | --Creating fake input objects with fake variables | |
31 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()} | |
32 | FakeMouse.keyUp = FakeMouse.KeyUp | |
33 | FakeMouse.keyDown = FakeMouse.KeyDown | |
34 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
35 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
36 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
37 | end} | |
38 | --Merged 2 functions into one by checking amount of arguments | |
39 | CAS.UnbindAction = CAS.BindAction | |
40 | ||
41 | --This function will trigger the events that have been :Connect()'ed | |
42 | local function TriggerEvent(self,ev,...) | |
43 | for _,f in pairs(self[ev].Functions) do | |
44 | f(...) | |
45 | end | |
46 | end | |
47 | FakeMouse.TriggerEvent = TriggerEvent | |
48 | UIS.TriggerEvent = TriggerEvent | |
49 | ||
50 | --Client communication | |
51 | local Event = Instance.new("RemoteEvent") | |
52 | Event.Name = "UserInput_Event" | |
53 | Event.OnServerEvent:Connect(function(plr,io) | |
54 | if plr~=RealPlayer then return end | |
55 | FakeMouse.Target = io.Target | |
56 | FakeMouse.Hit = io.Hit | |
57 | if not io.isMouse then | |
58 | local b = io.UserInputState == Enum.UserInputState.Begin | |
59 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
60 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
61 | end | |
62 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
63 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
64 | end | |
65 | for _,t in pairs(CAS.Actions) do | |
66 | for _,k in pairs(t.Keys) do | |
67 | if k==io.KeyCode then | |
68 | t.Function(t.Name,io.UserInputState,io) | |
69 | end | |
70 | end | |
71 | end | |
72 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
73 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
74 | end | |
75 | end) | |
76 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event") | |
77 | local Mouse = owner:GetMouse() | |
78 | local UIS = game:GetService("UserInputService") | |
79 | local input = function(io,RobloxHandled) | |
80 | if RobloxHandled then return end | |
81 | --Since InputObject is a client-side instance, we create and pass table instead | |
82 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
83 | end | |
84 | UIS.InputBegan:Connect(input) | |
85 | UIS.InputEnded:Connect(input) | |
86 | local h,t | |
87 | --Give the server mouse data every second frame, but only if the values changed | |
88 | --If player is not moving their mouse, client won't fire events | |
89 | local HB = game:GetService("RunService").Heartbeat | |
90 | while true do | |
91 | if h~=Mouse.Hit or t~=Mouse.Target then | |
92 | h,t=Mouse.Hit,Mouse.Target | |
93 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
94 | end | |
95 | --Wait 2 frames | |
96 | for i=1,2 do | |
97 | HB:Wait() | |
98 | end | |
99 | end]==],script) | |
100 | ||
101 | ----Sandboxed game object that allows the usage of client-side methods and services | |
102 | --Real game object | |
103 | local RealGame = game | |
104 | ||
105 | --Metatable for fake service | |
106 | local FakeService_Metatable = { | |
107 | __index = function(self,k) | |
108 | local s = rawget(self,"_RealService") | |
109 | if s then | |
110 | return typeof(s[k])=="function" | |
111 | and function(_,...)return s[k](s,...)end or s[k] | |
112 | end | |
113 | end, | |
114 | __newindex = function(self,k,v) | |
115 | local s = rawget(self,"_RealService") | |
116 | if s then s[k]=v end | |
117 | end | |
118 | } | |
119 | local function FakeService(t,RealService) | |
120 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
121 | return setmetatable(t,FakeService_Metatable) | |
122 | end | |
123 | ||
124 | --Fake game object | |
125 | local FakeGame = { | |
126 | GetService = function(self,s) | |
127 | return rawget(self,s) or RealGame:GetService(s) | |
128 | end, | |
129 | Players = FakeService({ | |
130 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player) | |
131 | },"Players"), | |
132 | UserInputService = FakeService(UIS,"UserInputService"), | |
133 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
134 | RunService = FakeService({ | |
135 | _btrs = {}, | |
136 | RenderStepped = RealGame:GetService("RunService").Heartbeat, | |
137 | BindToRenderStep = function(self,name,_,fun) | |
138 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
139 | end, | |
140 | UnbindFromRenderStep = function(self,name) | |
141 | self._btrs[name]:Disconnect() | |
142 | end, | |
143 | },"RunService") | |
144 | } | |
145 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
146 | FakeGame.service = FakeGame.GetService | |
147 | FakeService(FakeGame,game) | |
148 | --Changing owner to fake player object to support owner:GetMouse() | |
149 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
150 | end | |
151 | ||
152 | me = game.Players.silver22352 | |
153 | char = me.Character | |
154 | Modelname = "Warhammah" | |
155 | Toolname = "Warhammar" | |
156 | Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"} | |
157 | necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
158 | selected = false | |
159 | effectOn = false | |
160 | Hurt = false | |
161 | Leghurt = false | |
162 | Deb = true | |
163 | LegDeb = true | |
164 | Able = true | |
165 | Resting = false | |
166 | RestingAnim = false | |
167 | AbleG = true | |
168 | Prop = {Damage = 42, Legdmg = 34, AS = 28, ShockDMG = 50, Rage = 7000000, RageIncome = 7000, MaxRage = 7000000} | |
169 | Prop.AS = Prop.AS/300 | |
170 | Cam = workspace.CurrentCamera | |
171 | ||
172 | ToolIcon = "http://www.roblox.com/asset/?id=49192762" | |
173 | MouseIc = "http://www.roblox.com/asset/?id=49192792" | |
174 | MouseDo = "http://www.roblox.com/asset/?id=49192819" | |
175 | ||
176 | Add = { | |
177 | Sphere = function(P) | |
178 | local m = Instance.new("SpecialMesh",P) | |
179 | m.MeshType = "Sphere" | |
180 | return m | |
181 | end, | |
182 | BF = function(P) | |
183 | local bf = Instance.new("BodyForce",P) | |
184 | bf.force = Vector3.new(0, P:GetMass()*187, 0) | |
185 | return bf | |
186 | end, | |
187 | BP = function(P) | |
188 | local bp = Instance.new("BodyPosition",P) | |
189 | bp.maxForce = Vector3.new(math.huge, 0, math.huge) | |
190 | bp.P = 14000 | |
191 | return bp | |
192 | end, | |
193 | BG = function(P) | |
194 | local bg = Instance.new("BodyGyro",P) | |
195 | bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge) | |
196 | bg.P = 14000 | |
197 | return bg | |
198 | end, | |
199 | Mesh = function(P, ID, x, y, z) | |
200 | local m = Instance.new("SpecialMesh") | |
201 | m.MeshId = ID | |
202 | m.Scale = Vector3.new(x, y, z) | |
203 | m.Parent = P | |
204 | return m | |
205 | end, | |
206 | Sound = function(P, ID, vol, pitch) | |
207 | local s = Instance.new("Sound") | |
208 | s.SoundId = ID | |
209 | s.Volume = vol | |
210 | s.Pitch = pitch | |
211 | s.Parent = P | |
212 | return s | |
213 | end | |
214 | } | |
215 | ||
216 | function find(tab, arg) | |
217 | local ah = nil | |
218 | for i,v in pairs(tab) do | |
219 | if v == arg then | |
220 | ah = v | |
221 | end | |
222 | end | |
223 | return ah | |
224 | end | |
225 | ||
226 | function getAllParts(from) | |
227 | local t = {} | |
228 | function getParts(where) | |
229 | for i, v in pairs(where:children()) do | |
230 | if v:IsA("BasePart") then | |
231 | if v.Parent ~= char and v.Parent.Parent ~= char then | |
232 | table.insert(t, v) | |
233 | end | |
234 | end | |
235 | getParts(v) | |
236 | end | |
237 | end | |
238 | getParts(workspace) | |
239 | return t | |
240 | end | |
241 | ||
242 | function RayCast(pos1, pos2, maxDist, forward) | |
243 | local list = getAllParts(workspace) | |
244 | local pos0 = pos1 | |
245 | for dist = 1, maxDist, forward do | |
246 | pos0 = (CFrame.new(pos1, pos2) * CFrame.new(0, 0, -dist)).p | |
247 | for _, v in pairs(list) do | |
248 | local pos3 = v.CFrame:pointToObjectSpace(pos0) | |
249 | local s = v.Size | |
250 | if pos3.x > -(s.x/2) and pos3.x < (s.x/2) and pos3.y > -(s.y/2) and pos3.y < (s.y/2) and pos3.z > -(s.z/2) and pos3.x < (s.z/2) and v.CanCollide and v:GetMass() > 14 then | |
251 | return pos0, v | |
252 | end | |
253 | end | |
254 | end | |
255 | return pos0, nil | |
256 | end | |
257 | ||
258 | function Part(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break) | |
259 | local p = Instance.new("Part") | |
260 | p.formFactor = "Custom" | |
261 | p.Anchored = Anchor | |
262 | p.CanCollide = Collide | |
263 | p.Transparency = Tran | |
264 | p.Reflectance = Ref | |
265 | p.BrickColor = BrickColor.new(Color) | |
266 | for _, Surf in pairs(Surfaces) do | |
267 | p[Surf] = "Smooth" | |
268 | end | |
269 | p.Size = Vector3.new(X, Y, Z) | |
270 | if Break then | |
271 | p:BreakJoints() | |
272 | else p:MakeJoints() end | |
273 | p.Parent = Parent | |
274 | p.Locked = true | |
275 | return p | |
276 | end | |
277 | ||
278 | function Weld(p0, p1, x, y, z, a, b, c) | |
279 | local w = Instance.new("Weld") | |
280 | w.Parent = p0 | |
281 | w.Part0 = p0 | |
282 | w.Part1 = p1 | |
283 | w.C1 = CFrame.new(x,y,z) * CFrame.Angles(a,b,c) | |
284 | return w | |
285 | end | |
286 | ||
287 | function ComputePos(pos1, pos2) | |
288 | local pos3 = Vector3.new(pos2.x, pos1.y, pos2.z) | |
289 | return CFrame.new(pos1, pos3) | |
290 | end | |
291 | ||
292 | function getHumanoid(c) | |
293 | local h = nil | |
294 | for i,v in pairs(c:children()) do | |
295 | if v:IsA("Humanoid") and c ~= char then | |
296 | if v.Health > 0 then | |
297 | h = v | |
298 | end | |
299 | end | |
300 | end | |
301 | return h | |
302 | end | |
303 | ||
304 | for i,v in pairs(char:children()) do | |
305 | if v.Name == Modelname then | |
306 | v:remove() | |
307 | end | |
308 | end | |
309 | ||
310 | pcall(function() me.PlayerGui:findFirstChild("RaigMeter",true):remove() end) | |
311 | ||
312 | Sc = Instance.new("ScreenGui",me:findFirstChild("PlayerGui")) | |
313 | Sc.Name = "RaigMeter" | |
314 | ||
315 | Fr = Instance.new("Frame",Sc) | |
316 | Fr.Size = UDim2.new(0, 250, 0, 28) | |
317 | Fr.Position = UDim2.new(0.5, -125, 0, 5) | |
318 | Fr.BackgroundColor3 = Color3.new(0.8, 0.3, 0.1) | |
319 | ||
320 | Met = Instance.new("Frame", Fr) | |
321 | Met.Size = UDim2.new(1, -10, 1, -6) | |
322 | Met.Position = UDim2.new(0, 5, 0, 3) | |
323 | Met.BackgroundColor3 = Color3.new(0, 0, 0) | |
324 | Met.BorderSizePixel = 0 | |
325 | ||
326 | Meter = Instance.new("ImageLabel", Met) | |
327 | Meter.Size = UDim2.new(Prop.Rage/Prop.MaxRage, 0, 1, -2) | |
328 | Meter.Position = UDim2.new(0, 0, 0, 1) | |
329 | Meter.Image = "http://www.roblox.com/asset/?id=48965808" | |
330 | Meter.BorderSizePixel = 0 | |
331 | Meter.BackgroundColor3 = Color3.new(1, 0.6, 0.1) | |
332 | ||
333 | Tx = Instance.new("TextLabel", Met) | |
334 | Tx.Size = UDim2.new(0, 0, 1, 0) | |
335 | Tx.Position = UDim2.new(0, 5, 0, 0) | |
336 | Tx.Text = Prop.Rage.." / "..Prop.MaxRage | |
337 | Tx.Font = "ArialBold" | |
338 | Tx.FontSize = "Size18" | |
339 | Tx.BackgroundTransparency = 1 | |
340 | Tx.TextColor3 = Color3.new(1, 0, 0) | |
341 | Tx.TextXAlignment = "Left" | |
342 | ||
343 | laast = Prop.Rage | |
344 | coroutine.resume(coroutine.create(function() | |
345 | while true do | |
346 | wait() | |
347 | if Prop.Rage > Prop.MaxRage then Prop.Rage = Prop.MaxRage end | |
348 | if laast ~= Prop.Rage then | |
349 | Meter.Size = UDim2.new(Prop.Rage/Prop.MaxRage, 0, 1, -2) | |
350 | laast = Prop.Rage | |
351 | Tx.Text = Prop.Rage.." / "..Prop.MaxRage | |
352 | end | |
353 | end | |
354 | end)) | |
355 | ||
356 | torso = char.Torso | |
357 | neck = torso.Neck | |
358 | hum = char.Humanoid | |
359 | Rarm = char["Right Arm"] | |
360 | Larm = char["Left Arm"] | |
361 | Rleg = char["Right Leg"] | |
362 | Lleg = char["Left Leg"] | |
363 | ||
364 | hc = Instance.new("Humanoid") | |
365 | hc.Health = 0 | |
366 | hc.MaxHealth = 0 | |
367 | ||
368 | slash = Add.Sound(nil, "rbxasset://sounds//swordslash.wav", 0.9, 0.8) | |
369 | hitsound = Add.Sound(nil, "http://www.roblox.com/asset/?id=2801263", 0.7, 0.6) | |
370 | charge = Add.Sound(nil, "http://www.roblox.com/asset/?id=2101137", 0.8, 0.65) | |
371 | boom = Add.Sound(nil, "http://www.roblox.com/asset/?id=2691586", 0.8, 0.3) | |
372 | smashsound = Add.Sound(nil, "http://www.roblox.com/asset/?id=2692806", 0.8, 0.35) | |
373 | boomboom = Add.Sound(nil, "http://www.roblox.com/asset/?id=2760979", 1, 0.18) | |
374 | equip = Add.Sound(nil, "rbxasset://sounds\\unsheath.wav", 0.6, 0.7) | |
375 | ||
376 | function PlaySound(sound, pitch) | |
377 | local s = sound:clone() | |
378 | if pitch ~= nil then | |
379 | if tonumber(pitch) then | |
380 | s.Pitch = tonumber(pitch) | |
381 | end | |
382 | end | |
383 | s.Parent = torso | |
384 | s.PlayOnRemove = true | |
385 | coroutine.resume(coroutine.create(function() | |
386 | wait() | |
387 | s:remove() | |
388 | end)) | |
389 | end | |
390 | ||
391 | Mo = Instance.new("Model") | |
392 | Mo.Name = Modelname | |
393 | ||
394 | RABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
395 | LABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
396 | RLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
397 | LLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
398 | ||
399 | RABW = Weld(torso, RABrick, -1.5, -0.5, 0, 0, 0, 0) | |
400 | LABW = Weld(torso, LABrick, 1.5, -0.5, 0, 0, 0, 0) | |
401 | RLBW = Weld(torso, RLBrick, -0.5, 1.2, 0, 0, 0, 0) | |
402 | LLBW = Weld(torso, LLBrick, 0.5, 1.2, 0, 0, 0, 0) | |
403 | ||
404 | RAW = Weld(RABrick, nil, 0, 0.5, 0, 0, 0, 0) | |
405 | LAW = Weld(LABrick, nil, 0, 0.5, 0, 0, 0, 0) | |
406 | RLW = Weld(RLBrick, nil, 0, 0.8, 0, 0, 0, 0) | |
407 | LLW = Weld(LLBrick, nil, 0, 0.8, 0, 0, 0, 0) | |
408 | ||
409 | HB = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true) | |
410 | HBW = Weld(Rarm, HB, 0, 1, 0, 0, 0, 0) | |
411 | HW = Weld(HB, nil, 0, -1.3, 0, math.pi/2, 0, 0) | |
412 | ||
413 | TH = Weld(torso, nil, -0.8, 0.1, 0, 0, math.pi/2, math.rad(-140)) | |
414 | ||
415 | RAWStand, LAWStand, RLWStand, LLWStand, HWStand = nil | |
416 | ||
417 | handle = Part(Mo, false, false, 0, 0, "Navy blue", 0.4, 5, 0.4, true) | |
418 | handle.Name = "Handle" | |
419 | Instance.new("SpecialMesh",handle) | |
420 | ||
421 | maintip = Part(Mo, false, false, 1, 0, "Bright yellow", 0.6, 0.5, 0.6, true) | |
422 | Weld(handle, maintip, 0, -1.8, 0, 0, 0, 0) | |
423 | ||
424 | DMGParts = {} | |
425 | ||
426 | for i = 0, 135, 45 do | |
427 | local tip = Part(Mo, false, false, 0, 0, "Dark grey", 0.54, 1.3, 2.2, true) | |
428 | Instance.new("BlockMesh",tip) | |
429 | Weld(maintip, tip, 0, 0, 0, 0, 0, math.rad(i)) | |
430 | table.insert(DMGParts, tip) | |
431 | for a = -0.9, 0.9, 1.8 do | |
432 | for x = 0, math.pi, math.pi do | |
433 | local spike = Part(Mo, false, false, 0, 0, "Medium grey", 0.3, 0.5, 0.3, true) | |
434 | local w = Weld(tip, spike, 0, 0, 0, 0, 0, 0) | |
435 | w.C0 = CFrame.new(0, 0, a) * CFrame.Angles(x, 0, 0) | |
436 | w.C1 = CFrame.new(0, -1, 0) | |
437 | Add.Mesh(spike, "http://www.roblox.com/asset/?id=1033714", 0.14, 1, 0.14) | |
438 | local trim = Part(Mo, false, false, 0, 0, "Really black", 0.67, 0.1, 0.5, true) | |
439 | local w2 = Weld(tip, trim, 0, 0, 0, 0, 0, 0) | |
440 | w2.C0 = CFrame.new(0, 0, a) * CFrame.Angles(x, 0, 0) | |
441 | w2.C1 = CFrame.new(0, -0.58, 0) | |
442 | end | |
443 | end | |
444 | end | |
445 | ||
446 | spiketip = Part(Mo, false, false, 0, 0.2, "Navy blue", 0.3, 0.8, 0.3, true) | |
447 | Weld(handle, spiketip, 0, -3.1, 0, 0, 0, 0) | |
448 | Add.Mesh(spiketip, "http://www.roblox.com/asset/?id=1033714", 0.17, 2, 0.17) | |
449 | ||
450 | table.insert(DMGParts, spiketip) | |
451 | ||
452 | local handletip1 = Part(Mo, false, false, 0, 0.2, "Really black", 0.5, 0.5, 0.5, true) | |
453 | local w1 = Weld(handle, handletip1, 0, 0, 0, 0, 0, 0) | |
454 | w1.C0 = CFrame.new(0, -2.6, 0) | |
455 | Add.Mesh(handletip1, "http://www.roblox.com/asset/?id=9756362", 0.85, 0.75, 0.85) | |
456 | ||
457 | local handletip2 = Part(Mo, false, false, 0, 0.2, "Dark grey", 0.5, 0.5, 0.5, true) | |
458 | Weld(handletip1, handletip2, 0, 0, 0, 0, math.rad(45), 0) | |
459 | Add.Mesh(handletip2, "http://www.roblox.com/asset/?id=9756362", 0.95, 0.5, 0.95) | |
460 | ||
461 | ||
462 | Mo.Parent = char | |
463 | TH.Part1 = handle | |
464 | ||
465 | function showdmg(dmg, p, pos) | |
466 | local mo = Instance.new("Model") | |
467 | mo.Name = dmg | |
468 | local pa = Part(mo, false, true, 0, 0, "Bright red", 0.8, 0.3, 0.8, true) | |
469 | pa.CFrame = CFrame.new(p.Position) * CFrame.new(0, pos, 0) | |
470 | pa.Name = "Head" | |
471 | local hah = hc:clone() | |
472 | hah.Parent = mo | |
473 | local bp = Add.BP(pa) | |
474 | bp.maxForce = Vector3.new(math.huge, math.huge, math.huge) | |
475 | bp.position = p.Position + Vector3.new(0, 3+pos, 0) | |
476 | Add.BG(pa) | |
477 | coroutine.resume(coroutine.create(function() | |
478 | wait() | |
479 | mo.Parent = workspace | |
480 | wait(1.4) | |
481 | mo:remove() | |
482 | end)) | |
483 | end | |
484 | ||
485 | ||
486 | function damage(hum, p, num, dm1, dm2) | |
487 | local dmg = math.random(dm1, dm2) | |
488 | hum.Health = hum.Health - dmg | |
489 | showdmg(dmg, p, num) | |
490 | return dmg | |
491 | end | |
492 | ||
493 | function brickdamage(hit) | |
494 | local h = getHumanoid(hit.Parent) | |
495 | if h ~= nil and Hurt and Deb then | |
496 | Deb = false | |
497 | local dmg = damage(h, maintip, 0, Prop.Damage/4, Prop.Damage) | |
498 | PlaySound(hitsound) | |
499 | Prop.Rage = math.floor(Prop.Rage + (dmg*Prop.RageIncome)) | |
500 | wait(0.3) | |
501 | Deb = true | |
502 | end | |
503 | end | |
504 | ||
505 | function legdamage(hit) | |
506 | local h = getHumanoid(hit.Parent) | |
507 | if h ~= nil and Leghurt and LegDeb then | |
508 | LegDeb = false | |
509 | local dmg = damage(h, Rleg, 0, Prop.Legdmg/2, Prop.Legdmg) | |
510 | PlaySound(hitsound) | |
511 | Prop.Rage = math.floor(Prop.Rage + (dmg*Prop.RageIncome)) | |
512 | coroutine.resume(coroutine.create(function() | |
513 | local haha = math.random(1,3) | |
514 | if haha == 1 then | |
515 | h.PlatformStand = true | |
516 | wait() | |
517 | local ps = getAllParts(h.Parent) | |
518 | for i, v in pairs(ps) do | |
519 | if v.Anchored == false then | |
520 | v.Velocity = CFrame.new(handle.Position, v.Position).lookVector * 40 | |
521 | v.RotVelocity = Vector3.new(math.random(-30, 30), math.random(-30, 30), math.random(-30, 30)) | |
522 | end | |
523 | end | |
524 | wait(0.8) | |
525 | h.PlatformStand = false | |
526 | end | |
527 | end)) | |
528 | wait(0.2) | |
529 | LegDeb = true | |
530 | end | |
531 | end | |
532 | ||
533 | for i, v in pairs({Rleg, Lleg}) do | |
534 | v.Touched:connect(legdamage) | |
535 | end | |
536 | ||
537 | for i,v in pairs(DMGParts) do | |
538 | v.Touched:connect(brickdamage) | |
539 | end | |
540 | ||
541 | if script.Parent.className ~= "HopperBin" then | |
542 | h = Instance.new("HopperBin",me.Backpack) | |
543 | h.Name = Toolname | |
544 | h.TextureId = ToolIcon | |
545 | script.Parent = h | |
546 | end | |
547 | ||
548 | bin = script.Parent | |
549 | ||
550 | function StartEffect(part) | |
551 | effectOn = true | |
552 | local lastPoint = part.Position | |
553 | coroutine.resume(coroutine.create(function() | |
554 | while effectOn do | |
555 | wait() | |
556 | local point = CFrame.new(lastPoint, part.Position) * CFrame.Angles(-math.pi/2, 0, 0) | |
557 | local mag = (lastPoint - part.Position).magnitude | |
558 | local p = Part(workspace, true, false, 0.1, 0, "Institutional white", 1, 1, 1, true) | |
559 | local m = Instance.new("SpecialMesh",p) | |
560 | p.CFrame = point * CFrame.new(0, mag/2, 0) | |
561 | m.Scale = Vector3.new(1.2, mag+0.6, 1.2) | |
562 | lastPoint = part.Position | |
563 | coroutine.resume(coroutine.create(function() for i = 0.1, 1, 0.9/5 do wait() p.Transparency = i end p:remove() end)) | |
564 | end | |
565 | end)) | |
566 | end | |
567 | ||
568 | function EndEffect() | |
569 | effectOn = false | |
570 | end | |
571 | ||
572 | function detach(bool) | |
573 | LLW.C0 = CFrame.new(0, 0, 0) | |
574 | RLW.C0 = CFrame.new(0, 0, 0) | |
575 | LAW.C0 = CFrame.new(0,0,0) | |
576 | RAW.C0 = CFrame.new(0, 0, 0) | |
577 | if bool then | |
578 | LLW.Part1 = nil | |
579 | RLW.Part1 = nil | |
580 | RAW.Part1 = nil | |
581 | LAW.Part1 = nil | |
582 | end | |
583 | end | |
584 | ||
585 | function attach() | |
586 | RAW.Part1 = Rarm | |
587 | LAW.Part1 = Larm | |
588 | RLW.Part1 = Rleg | |
589 | LLW.Part1 = Lleg | |
590 | end | |
591 | ||
592 | function normal() | |
593 | neck.C0 = necko | |
594 | RAW.C0 = RAWStand | |
595 | LAW.C0 = LAWStand | |
596 | RLW.C0 = RLWStand | |
597 | LLW.C0 = LLWStand | |
598 | RAW.C1 = CFrame.new(0, 0.5, 0) | |
599 | LAW.C1 = CFrame.new(0, 0.5, 0) | |
600 | RLW.C1 = CFrame.new(0, 0.8, 0) | |
601 | LLW.C1 = CFrame.new(0, 0.8, 0) | |
602 | HW.C0 = HWStand | |
603 | end | |
604 | ||
605 | function idleanim() | |
606 | attach() | |
607 | for i = 0, 10, 10/22 do | |
608 | RAW.C0 = RAWStand * CFrame.Angles(0, math.rad(i), 0) | |
609 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-i), 0, 0) | |
610 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(i/8), 0, math.rad(-i/6)) | |
611 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-i/8), 0, math.rad(i/6)) | |
612 | neck.C0 = necko * CFrame.Angles(math.rad(-i/2), 0, 0) | |
613 | if selected == false or torso.Velocity.magnitude > 2 or Able == false or RestingAnim == true then break end | |
614 | wait() | |
615 | end | |
616 | wait() | |
617 | for i = 10, 0, -10/29 do | |
618 | RAW.C0 = RAWStand * CFrame.Angles(0, math.rad(i), 0) | |
619 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-i), 0, 0) | |
620 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(i/8), 0, math.rad(-i/6)) | |
621 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-i/8), 0, math.rad(i/6)) | |
622 | neck.C0 = necko * CFrame.Angles(math.rad(-i/2), 0, 0) | |
623 | if selected == false or torso.Velocity.magnitude > 2 or Able == false or RestingAnim == true then break end | |
624 | wait() | |
625 | end | |
626 | normal() | |
627 | end | |
628 | ||
629 | function runanim() | |
630 | RLW.Part1 = nil | |
631 | LLW.Part1 = nil | |
632 | end | |
633 | ||
634 | coroutine.resume(coroutine.create(function() | |
635 | while true do | |
636 | wait() | |
637 | if selected and Able == true and RestingAnim == false then | |
638 | if torso.Velocity.magnitude < 2 then | |
639 | idleanim() | |
640 | wait() | |
641 | else | |
642 | runanim() | |
643 | wait() | |
644 | end | |
645 | end | |
646 | end | |
647 | end)) | |
648 | ||
649 | function selectanim() | |
650 | if RestingAnim == false and Able == true then | |
651 | local ah = CFrame.Angles(0, 0, math.rad(90)) | |
652 | RAW.Part1 = Rarm | |
653 | for i = 0, 270, 270/5 do | |
654 | RAW.C0 = CFrame.new(0, 0, -i/500) * CFrame.Angles(math.rad(i), math.rad(i/4), 0) | |
655 | neck.C0 = necko * CFrame.Angles(0, 0, math.rad(-i/5)) | |
656 | wait() | |
657 | end | |
658 | HW.C0 = ah | |
659 | HW.Part1 = handle | |
660 | TH.Part1 = nil | |
661 | PlaySound(equip) | |
662 | for i = 270, 70, -200/13 do | |
663 | RAW.C0 = CFrame.new(0, 0, -i/500) * CFrame.Angles(math.rad(i), math.rad(i/4), 0) | |
664 | neck.C0 = necko * CFrame.Angles(math.rad((i-270)/7), 0, math.rad(-i/5)) | |
665 | wait() | |
666 | end | |
667 | attach() | |
668 | for i = 70, 120, 50/8 do | |
669 | local asd = i-70 | |
670 | RAW.C0 = CFrame.new(-(i-70)/240, 0, -i/500) * CFrame.Angles(math.rad(70), math.rad(70/4+(i-70)), math.rad(-(i-70)/4)) | |
671 | LAW.C0 = CFrame.Angles(math.rad(asd*1.5), 0, math.rad(asd/2)) * CFrame.new(asd/100, -asd/70, 0) | |
672 | HW.C0 = ah * CFrame.Angles(0, 0, math.rad(-asd*1.8)) | |
673 | neck.C0 = necko * CFrame.Angles(math.rad(-200/7+(asd/2)), 0, math.rad(-70/5+(asd/5))) | |
674 | RLW.C0 = CFrame.Angles(0, 0, math.rad(asd/4)) | |
675 | LLW.C0 = CFrame.Angles(0, 0, math.rad(-asd/4)) | |
676 | wait() | |
677 | end | |
678 | if RAWStand == nil then | |
679 | RAWStand = RAW.C0 | |
680 | LAWStand = LAW.C0 | |
681 | RLWStand = RLW.C0 | |
682 | LLWStand = LLW.C0 | |
683 | HWStand = HW.C0 | |
684 | end | |
685 | normal() | |
686 | end | |
687 | end | |
688 | ||
689 | function deselanim() | |
690 | if RestingAnim == false and Able == true then | |
691 | local ah = CFrame.Angles(0, 0, math.rad(90)) | |
692 | for i = 120, 70, -50/8 do | |
693 | local asd = i-70 | |
694 | RAW.C0 = CFrame.new(-(i-70)/240, 0, -i/500) * CFrame.Angles(math.rad(70), math.rad(70/4+(i-70)), math.rad(-(i-70)/4)) | |
695 | LAW.C0 = CFrame.Angles(math.rad(asd*1.5), 0, math.rad(asd/2)) * CFrame.new(asd/100, -asd/70, 0) | |
696 | HW.C0 = ah * CFrame.Angles(0, 0, math.rad(-asd*1.8)) | |
697 | neck.C0 = necko * CFrame.Angles(math.rad(-200/7+(asd/2)), 0, math.rad(-70/5+(asd/5))) | |
698 | RLW.C0 = CFrame.Angles(0, 0, math.rad(asd/4)) | |
699 | LLW.C0 = CFrame.Angles(0, 0, math.rad(-asd/4)) | |
700 | wait() | |
701 | end | |
702 | LLW.Part1 = nil | |
703 | RLW.Part1 = nil | |
704 | LAW.Part1 = nil | |
705 | for i = 70, 270, 200/13 do | |
706 | RAW.C0 = CFrame.new(0, 0, -i/500) * CFrame.Angles(math.rad(i), math.rad(i/4), 0) | |
707 | neck.C0 = necko * CFrame.Angles(math.rad((i-270)/7), 0, math.rad(-i/5)) | |
708 | wait() | |
709 | end | |
710 | HW.C0 = ah | |
711 | HW.Part1 = nil | |
712 | TH.Part1 = handle | |
713 | for i = 270, 0, -270/6 do | |
714 | RAW.C0 = CFrame.new(0, 0, -i/500) * CFrame.Angles(math.rad(i), math.rad(i/4), 0) | |
715 | neck.C0 = necko * CFrame.Angles(0, 0, math.rad(-i/5)) | |
716 | wait() | |
717 | end | |
718 | neck.C0 = necko | |
719 | detach(true) | |
720 | end | |
721 | end | |
722 | ||
723 | function smash(mouse) | |
724 | attach() | |
725 | local mouseHit = mouse | |
726 | local Orig = torso.CFrame | |
727 | local bg = Add.BG(torso) | |
728 | local bp = Add.BP(torso) | |
729 | bp.position = Orig.p | |
730 | local CF = ComputePos(Orig.p, mouseHit) | |
731 | local CF2 = CF | |
732 | bg.cframe = CF2 | |
733 | PlaySound(slash) | |
734 | for i = 0, 1, Prop.AS*1.1 do | |
735 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(80*i), 0, math.rad(45*i)) * CFrame.new(0, -0.4*i, 0) | |
736 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(75*i), 0, math.rad(40*i)) * CFrame.new(0, -0.5*i, 0) | |
737 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(20*i), math.rad(16*i), math.rad(-8*i)) | |
738 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-30*i), math.rad(-16*i), math.rad(8*i)) | |
739 | HW.C0 = HWStand * CFrame.Angles(0, 0, math.rad(30*i)) | |
740 | neck.C0 = necko * CFrame.Angles(math.rad(-35*i), 0, math.rad(-10*i)) | |
741 | wait() | |
742 | end | |
743 | bp.position = CF * CFrame.new(0, 0, -1.1).p | |
744 | StartEffect(maintip) | |
745 | Hurt = true | |
746 | for i = 0, 1, Prop.AS*1.5 do | |
747 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(70-150*i), math.rad(-45*i), math.rad(45-140*i)) * CFrame.new(0, -0.4, 0) | |
748 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(75-180*i), math.rad(80*i), math.rad(40-20*i)) * CFrame.new(0, -0.5, 0) | |
749 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(20-50*i), math.rad(16-16*i), math.rad(-8+8*i)) | |
750 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-30+40*i), math.rad(-16+16*i), math.rad(8-8*i)) | |
751 | HW.C0 = HWStand * CFrame.Angles(math.rad(-48*i), 0, math.rad(30)) | |
752 | neck.C0 = necko * CFrame.Angles(math.rad(-35+75*i), 0, math.rad(-10+26*i)) | |
753 | wait() | |
754 | end | |
755 | Hurt = false | |
756 | EndEffect() | |
757 | PlaySound(smashsound) | |
758 | bp.position = CF * CFrame.new(0, 0, -1.9).p | |
759 | for i = 0, 1, Prop.AS do | |
760 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(70-150+80*i), math.rad(-45+45*i), math.rad(45-140+95*i)) * CFrame.new(0, -0.4+0.4*i, 0) | |
761 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(75-180+105*i), math.rad(80-80*i), math.rad(20-20*i)) * CFrame.new(0, -0.5+0.5*i, 0) | |
762 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(20-50+30*i), 0, 0) | |
763 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-30+40-10*i), 0, 0) | |
764 | HW.C0 = HWStand * CFrame.Angles(math.rad(-48+48*i), 0, math.rad(30-30*i)) | |
765 | neck.C0 = necko * CFrame.Angles(math.rad(-35+75-40*i), 0, math.rad(-10+26-16*i)) | |
766 | wait() | |
767 | end | |
768 | normal() | |
769 | bg:remove() | |
770 | bp:remove() | |
771 | end | |
772 | ||
773 | function swing(mouse) | |
774 | attach() | |
775 | local mouseHit = mouse | |
776 | local Orig = torso.CFrame | |
777 | local bg = Add.BG(torso) | |
778 | local bp = Add.BP(torso) | |
779 | bp.position = Orig.p | |
780 | local CF = ComputePos(Orig.p, mouseHit) | |
781 | local CF2 = CF | |
782 | bg.cframe = CF2 | |
783 | PlaySound(slash) | |
784 | for i = 0, 1, Prop.AS*1.5 do | |
785 | RAW.C0 = RAWStand * CFrame.Angles(0, math.rad(-140*i), 0) * CFrame.new(0, 0, 0) | |
786 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(25*i), 0, math.rad(20*i)) * CFrame.new(0, -0.4*i, 0) | |
787 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(20*i), 0, 0) | |
788 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-10*i), 0, 0) | |
789 | HW.C0 = HWStand * CFrame.Angles(0, math.rad(-10*i), 0) | |
790 | neck.C0 = necko * CFrame.Angles(0, 0, math.rad(-50*i)) | |
791 | bg.cframe = CF2 * CFrame.Angles(0, math.rad(-40*i), 0) | |
792 | wait() | |
793 | end | |
794 | Hurt = true | |
795 | StartEffect(maintip) | |
796 | for i = 0, 1, Prop.AS*1.3 do | |
797 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(70*i), math.rad(-140), 0) * CFrame.new(0, -0.9*i, 0) | |
798 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(25), 0, math.rad(20-100*i)) * CFrame.new(0, -0.4+0.6*i, 0) | |
799 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(20), 0, 0) | |
800 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-10), 0, 0) | |
801 | HW.C0 = HWStand * CFrame.Angles(math.rad(-70*i), math.rad(-15), 0) * CFrame.new(0, 0, -0.9*i) | |
802 | neck.C0 = necko * CFrame.Angles(0, 0, math.rad(-50+90*i)) | |
803 | bg.cframe = CF2 * CFrame.Angles(0, math.rad(-40+80*i), 0) | |
804 | wait() | |
805 | end | |
806 | EndEffect() | |
807 | Hurt = false | |
808 | for i = 0, 1, Prop.AS*0.8 do | |
809 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(70-70*i), math.rad(-140+140*i), 0) * CFrame.new(0, -0.9+0.9*i, 0) | |
810 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(25-25*i), 0, math.rad(20-100+80*i)) * CFrame.new(0, -0.4+0.6-0.2*i, 0) | |
811 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(20-20*i), 0, 0) | |
812 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-10+10*i), 0, 0) | |
813 | HW.C0 = HWStand * CFrame.Angles(math.rad(-70+70*i), math.rad(-15+15*i), 0) * CFrame.new(0, 0, -0.9+0.9*i) | |
814 | neck.C0 = necko * CFrame.Angles(0, 0, math.rad(-50+90-40*i)) | |
815 | bg.cframe = CF2 * CFrame.Angles(0, math.rad(40-40*i), 0) | |
816 | wait() | |
817 | end | |
818 | normal() | |
819 | bg:remove() | |
820 | bp:remove() | |
821 | end | |
822 | ||
823 | function stab(mouse) | |
824 | attach() | |
825 | local mouseHit = mouse | |
826 | local Orig = torso.CFrame | |
827 | local bg = Add.BG(torso) | |
828 | local bp = Add.BP(torso) | |
829 | bp.position = Orig.p | |
830 | local CF = ComputePos(Orig.p, mouseHit) | |
831 | local CF2 = CF | |
832 | bg.cframe = CF2 | |
833 | PlaySound(slash) | |
834 | for i = 0, 1, Prop.AS do | |
835 | RAW.C0 = RAWStand * CFrame.new(0, 0.6*i, 0) * CFrame.Angles(math.rad(-60*i), math.rad(-40*i), math.rad(-30*i)) * CFrame.new(-0.45*i, 0, 0) | |
836 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-50*i), 0, math.rad(40*i)) * CFrame.new(0, -0.6*i, 0) | |
837 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(3*i), math.rad(20*i), math.rad(-10*i)) | |
838 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-3*i), math.rad(-20*i), math.rad(10*i)) | |
839 | HW.C0 = HWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, 0, 1*i) | |
840 | neck.C0 = necko * CFrame.Angles(math.rad(25*i), 0, math.rad(-45*i)) | |
841 | bg.cframe = CF2 * CFrame.Angles(0, math.rad(-30*i), 0) | |
842 | wait() | |
843 | end | |
844 | StartEffect(maintip) | |
845 | Hurt = true | |
846 | bp.position = CF * CFrame.new(0, 0, -0.6).p | |
847 | for i = 0, 1, Prop.AS*1.5 do | |
848 | RAW.C0 = RAWStand * CFrame.new(0, 0.6-0.8*i, 0) * CFrame.Angles(math.rad(-60+100*i), math.rad(-40), math.rad(-30+70*i)) * CFrame.new(-0.45, 0, 0) | |
849 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-50+60*i), 0, math.rad(40-30*i)) * CFrame.new(0, -0.6-0.4*i, 0) | |
850 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(3-18*i), math.rad(20-40*i), math.rad(-10+20*i)) | |
851 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-3+18*i), math.rad(-20+40*i), math.rad(10-20*i)) | |
852 | HW.C0 = HWStand * CFrame.Angles(math.rad(-70*i), 0, 0) * CFrame.new(0, 0, 1-1.4*i) | |
853 | neck.C0 = necko * CFrame.Angles(math.rad(25-20*i), 0, math.rad(-45+35*i)) | |
854 | bg.cframe = CF2 * CFrame.Angles(0, math.rad(-30+45*i), 0) | |
855 | wait() | |
856 | end | |
857 | Hurt = false | |
858 | EndEffect() | |
859 | bp.position = CF.p | |
860 | for i = 0, 1, Prop.AS*1.1 do | |
861 | RAW.C0 = RAWStand * CFrame.new(0, 0.6-0.8+0.2*i, 0) * CFrame.Angles(math.rad(-60+100-40*i), math.rad(-40+40*i), math.rad(-30+70-40*i)) * CFrame.new(-0.45+0.45*i, 0, 0) | |
862 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-50+60-10*i), 0, math.rad(40-30-10*i)) * CFrame.new(0, -0.6-0.4+1*i, 0) | |
863 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(3-18+15*i), math.rad(20-40+20*i), math.rad(-10+20-10*i)) | |
864 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-3+18-15*i), math.rad(-20+40-20*i), math.rad(10-20+10*i)) | |
865 | HW.C0 = HWStand * CFrame.Angles(math.rad(-70+70*i), 0, 0) * CFrame.new(0, 0, 1-1.4+0.4*i) | |
866 | neck.C0 = necko * CFrame.Angles(math.rad(5-5*i), 0, math.rad(-10+10*i)) | |
867 | bg.cframe = CF2 * CFrame.Angles(0, math.rad(-30+45-15*i), 0) | |
868 | wait() | |
869 | end | |
870 | normal() | |
871 | bg:remove() | |
872 | bp:remove() | |
873 | end | |
874 | ||
875 | function epicsmashfunc(hit) | |
876 | local ch = hit.Parent | |
877 | local h = getHumanoid(ch) | |
878 | local t, head = ch:findFirstChild("Torso"), ch:findFirstChild("Head") | |
879 | return h, t, head | |
880 | end | |
881 | ||
882 | function epicsmash(mouse) | |
883 | if Prop.Rage >= 50 then | |
884 | attach() | |
885 | local mouseHit = mouse | |
886 | local Orig = torso.CFrame | |
887 | local bg = Add.BG(torso) | |
888 | local bp = Add.BP(torso) | |
889 | bp.position = Orig.p | |
890 | local CF = ComputePos(Orig.p, mouseHit) | |
891 | bg.cframe = CF | |
892 | local hu, to, head = nil, nil, nil | |
893 | local Epic = true | |
894 | local conn = Lleg.Touched:connect(function(hit) | |
895 | if Epic then | |
896 | hu, to, head = epicsmashfunc(hit) | |
897 | if hu and to and head then Epic = false end | |
898 | end | |
899 | end) | |
900 | PlaySound(slash) | |
901 | for i = 0, 1, 0.12 do | |
902 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(-160*i), math.rad(-30*i), math.rad(-80*i)) * CFrame.new(0, 0, 0) | |
903 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-80*i), 0, math.rad(-70*i)) * CFrame.new(0, -0.4*i, 0.6*i) | |
904 | RLW.C0 = RLWStand * CFrame.Angles(0, 0, math.rad(20*i)) * CFrame.new(0, 0, 0) | |
905 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(115*i), 0, math.rad(-40*i)) * CFrame.new(0, -0.8*i, 0) | |
906 | HW.C0 = HWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, 0, 2*i) | |
907 | neck.C0 = necko * CFrame.Angles(0, 0, math.rad(52*i)) | |
908 | bg.cframe = CF * CFrame.Angles(math.rad(10*i), math.rad(-45*i), math.rad(-15*i)) | |
909 | wait() | |
910 | end | |
911 | conn:disconnect() | |
912 | if hu and to and head then | |
913 | Prop.Rage = Prop.Rage - 50 | |
914 | hu.PlatformStand = true | |
915 | local bg2 = Add.BG(to) | |
916 | bg2.P = 6000 | |
917 | bg2.cframe = CF * CFrame.Angles(math.rad(90), math.rad(180), math.rad(90)) | |
918 | local bp2 = Add.BP(to) | |
919 | bp2.position = CF * CFrame.new(-1, -4, -4).p | |
920 | bp2.P = 5000 | |
921 | wait(0.1) | |
922 | for i = 0, 1, 0.045 do | |
923 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(-160+270*i), math.rad(-30+20*i), math.rad(-80+120*i)) | |
924 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-80+140*i), 0, math.rad(-70+120*i)) * CFrame.new(0, -0.4-0.1*i, 0.6-0.6*i) | |
925 | RLW.C0 = RLWStand * CFrame.Angles(0, 0, math.rad(20-20*i)) * CFrame.new(0, 0, 0) | |
926 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(115-115*i), 0, math.rad(-40+40*i)) * CFrame.new(0, -0.8+0.8*i, 0) | |
927 | HW.C0 = HWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, 0, 2-2*i) | |
928 | neck.C0 = necko * CFrame.Angles(0, 0, math.rad(52-37*i)) | |
929 | bg.cframe = CF * CFrame.Angles(math.rad(10-10*i), math.rad(-45+35*i), math.rad(-15+15*i)) | |
930 | wait() | |
931 | end | |
932 | PlaySound(slash) | |
933 | bp2:remove() | |
934 | bg2:remove() | |
935 | wait(0.2) | |
936 | StartEffect(maintip) | |
937 | for i = 0, 1, 0.1 do | |
938 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(-160+270-190*i), math.rad(-30+20-35*i), math.rad(-80+120-135*i)) | |
939 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-80+140-150*i), math.rad(60*i), math.rad(-70+120-40*i)) * CFrame.new(0, -0.4-0.1, 0) | |
940 | RLW.C0 = RLWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, 0, 0) | |
941 | LLW.C0 = LLWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, 0, 0) | |
942 | HW.C0 = HWStand * CFrame.Angles(math.rad(-55*i), 0, math.rad(30*i)) * CFrame.new(0, 0, -1*i) | |
943 | neck.C0 = necko * CFrame.Angles(0, 0, math.rad(52-37+30*i)) | |
944 | bg.cframe = CF * CFrame.Angles(math.rad(10-10), math.rad(-45+35-30*i), math.rad(-15+15)) | |
945 | wait() | |
946 | end | |
947 | coroutine.resume(coroutine.create(function() | |
948 | local frr = Cam.CoordinateFrame | |
949 | for i = 1, math.random(3,6) do | |
950 | wait() | |
951 | Cam.CoordinateFrame = frr * CFrame.new(math.random(-6,6)/10, math.random(-6,6)/10, math.random(-6,6)/10) | |
952 | end | |
953 | end)) | |
954 | PlaySound(smashsound) | |
955 | EndEffect() | |
956 | local pos = head.Position | |
957 | if (pos - maintip.Position).magnitude < 2 then | |
958 | damage(hu, head, 0.3, hu.Health, hu.Health) | |
959 | head:remove() | |
960 | PlaySound(hitsound) | |
961 | for i = 1, math.random(7, 17) do | |
962 | local hmm = math.random(1,6) | |
963 | if hmm < 6 then | |
964 | local cols = {"Bright red", "Really red"} | |
965 | local p = Part(workspace, false, false, 0, 0, cols[math.random(1,#cols)], math.random(2,10)/10, 0.2, math.random(2,10)/10) | |
966 | p.CFrame = CFrame.new(pos) * CFrame.new(math.random(-6,6)/10, math.random(-4,2)/10, math.random(-6, 6)/10) | |
967 | p.Velocity = Vector3.new(math.random(-15, 15), math.random(5, 40), math.random(-15, 15)) | |
968 | p.RotVelocity = Vector3.new(math.random(-25,25), math.random(-25,25), math.random(-25,25)) | |
969 | else | |
970 | local cols = {"Institutional white", "White"} | |
971 | local p = Part(workspace, false, false, 0, 0, cols[math.random(1,#cols)], math.random(4,13)/10, 0.3, math.random(2,3)/10) | |
972 | p.CFrame = CFrame.new(pos) * CFrame.new(math.random(-6,6)/10, math.random(-4,2)/10, math.random(-6, 6)/10) | |
973 | p.Velocity = Vector3.new(math.random(-15, 15), math.random(5, 40), math.random(-15, 15)) | |
974 | p.RotVelocity = Vector3.new(math.random(-25,25), math.random(-25,25), math.random(-25,25)) | |
975 | end | |
976 | end | |
977 | end | |
978 | for i = 0, 1, 0.06 do | |
979 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(-160+270-190+80*i), math.rad(-30+20-35+45*i), math.rad(-80+120-135+95*i)) | |
980 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-80+140-150+90*i), math.rad(60-60*i), math.rad(10-10*i)) * CFrame.new(0, -0.4-0.1+0.5*i, 0) | |
981 | RLW.C0 = RLWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, 0, 0) | |
982 | LLW.C0 = LLWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, 0, 0) | |
983 | HW.C0 = HWStand * CFrame.Angles(math.rad(-55+55*i), 0, math.rad(30-30*i)) * CFrame.new(0, 0, -1+1*i) | |
984 | neck.C0 = necko * CFrame.Angles(0, 0, math.rad(45-45*i)) | |
985 | bg.cframe = CF * CFrame.Angles(0, math.rad(-45+35-20+30*i), 0) | |
986 | wait() | |
987 | end | |
988 | else | |
989 | for i = 0, 1, 0.08 do | |
990 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(-160+160*i), math.rad(-30+30*i), math.rad(-80+80*i)) * CFrame.new(0, 0, 0) | |
991 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-80+80*i), 0, math.rad(-70+70*i)) * CFrame.new(0, -0.4+0.4*i, 0.6-0.6*i) | |
992 | RLW.C0 = RLWStand * CFrame.Angles(0, 0, math.rad(20-20*i)) * CFrame.new(0, 0, 0) | |
993 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(115-115*i), 0, math.rad(-40+40*i)) * CFrame.new(0, -0.8+0.8*i, 0) | |
994 | HW.C0 = HWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, 0, 2-2*i) | |
995 | neck.C0 = necko * CFrame.Angles(0, 0, math.rad(52-52*i)) | |
996 | bg.cframe = CF * CFrame.Angles(math.rad(10-10*i), math.rad(-45+45*i), math.rad(-15+15*i)) | |
997 | wait() | |
998 | end | |
999 | bg:remove() | |
1000 | bp:remove() | |
1001 | normal() | |
1002 | end | |
1003 | normal() | |
1004 | bg:remove() | |
1005 | bp:remove() | |
1006 | end | |
1007 | end | |
1008 | ||
1009 | ||
1010 | function shockwave(mouse) | |
1011 | local p, t = RayCast(torso.Position, torso.CFrame * CFrame.new(0, -5, 0).p, 5, 1) | |
1012 | if Prop.Rage >= 80 and t then | |
1013 | Prop.Rage = Prop.Rage - 80 | |
1014 | attach() | |
1015 | local mouseHit = mouse | |
1016 | local Orig = torso.CFrame | |
1017 | local bg = Add.BG(torso) | |
1018 | local bp = Add.BP(torso) | |
1019 | bp.position = Orig.p | |
1020 | bp.maxForce = Vector3.new(math.huge, math.huge, math.huge) | |
1021 | bp.P = 5000 | |
1022 | local CF = ComputePos(Orig.p, mouseHit) | |
1023 | bg.cframe = CF | |
1024 | PlaySound(charge) | |
1025 | for i = 0, 1, 0.07 do | |
1026 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(-110*i), math.rad(-40*i), math.rad(-50*i)) * CFrame.new(0.2*i, 0, 0.2*i) | |
1027 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-100*i), 0, math.rad(-40*i)) * CFrame.new(-0.2*i, -0.4*i, 0.5*i) | |
1028 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(15*i), 0, math.rad(-10*i)) * CFrame.new(0, 0.7*i, -0.8*i) | |
1029 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-75*i), 0, math.rad(10*i)) * CFrame.new(0, 0.4*i, 0.2*i) | |
1030 | HW.C0 = HWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, 0, 1.6*i) | |
1031 | neck.C0 = necko * CFrame.Angles(math.rad(30*i), 0, 0) | |
1032 | bg.cframe = CF * CFrame.Angles(0, 0, 0) | |
1033 | bp.position = Orig.p + Vector3.new(0, -1.9*i, 0) | |
1034 | wait() | |
1035 | end | |
1036 | for i = 0, 1, 0.04 do | |
1037 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(-110+220*i), math.rad(-40+50*i), math.rad(-50+90*i)) * CFrame.new(0.2-0.2*i, -0.85*i, 0.2-0.2*i) | |
1038 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-100+185*i), 0, math.rad(-40+75*i)) * CFrame.new(-0.2-0.2*i, -0.4-0.05*i, 0.5-0.5*i) | |
1039 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(15-25*i), 0, math.rad(-10+6*i)) * CFrame.new(0, 0.7-0.7*i, -0.8+0.8*i) | |
1040 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-75+65*i), 0, math.rad(10-6*i)) * CFrame.new(0, 0.4-0.4*i, 0.2-0.2*i) | |
1041 | HW.C0 = HWStand * CFrame.Angles(math.rad(-15*i), 0, 0) * CFrame.new(0, 0, 1.6-2.1*i) | |
1042 | neck.C0 = necko * CFrame.Angles(math.rad(30-70*i), 0, 0) | |
1043 | bg.cframe = CF * CFrame.Angles(0, 0, 0) | |
1044 | bp.position = Orig.p + Vector3.new(0, -1.9+17*i, 0) | |
1045 | wait() | |
1046 | end | |
1047 | bp.P = 12001 | |
1048 | wait(0.1) | |
1049 | StartEffect(maintip) | |
1050 | PlaySound(slash) | |
1051 | for i = 0, 1, 0.1 do | |
1052 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(110-150*i), math.rad(10-30*i), math.rad(40-90*i)) * CFrame.new(0, -0.85+0.85*i, -0.8*i) | |
1053 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(85-125*i), 0, math.rad(35)) * CFrame.new(0, -0.45+0.1, 0) | |
1054 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(-10+25*i), 0, math.rad(-4+4*i)) * CFrame.new(0, 0.5*i, -0.8*i) | |
1055 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-10-35*i), 0, math.rad(4-4*i)) * CFrame.new(0, 0.4*i, 0.2*i) | |
1056 | HW.C0 = HWStand * CFrame.Angles(math.rad(-15-10*i), 0, 0) * CFrame.new(0, 0, -0.5+0.7*i) | |
1057 | neck.C0 = necko * CFrame.Angles(math.rad(-40+75*i), 0, math.rad(-20*i)) | |
1058 | bg.cframe = CF * CFrame.Angles(0, math.rad(380*i), 0) | |
1059 | bp.position = Orig.p + Vector3.new(0, 15.1-16.7*i, 0) | |
1060 | wait() | |
1061 | end | |
1062 | coroutine.resume(coroutine.create(function() | |
1063 | local frr = Cam.CoordinateFrame | |
1064 | for i = 1, math.random(10,16) do | |
1065 | wait() | |
1066 | Cam.CoordinateFrame = frr * CFrame.new(math.random(-15,15)/10, math.random(-15,15)/10, math.random(-15,15)/10) | |
1067 | end | |
1068 | end)) | |
1069 | PlaySound(smashsound) | |
1070 | local pos = CF * CFrame.new(-2, -3, -3).p | |
1071 | EndEffect() | |
1072 | local p = Part(workspace, true, false, 0, 0, "Black", 1, 1, 1, true) | |
1073 | p.CFrame = CFrame.new(pos) | |
1074 | local p2 = Part(workspace, true, false, 0, 0, "Black", 1, 1, 1, true) | |
1075 | p2.CFrame = CFrame.new(pos) | |
1076 | local p3 = Part(workspace, true, false, 0, 0, "Black", 1, 1, 1, true) | |
1077 | p3.CFrame = CFrame.new(pos) | |
1078 | local m3 = Instance.new("SpecialMesh",p3) | |
1079 | m3.MeshType = "Sphere" | |
1080 | PlaySound(boom) | |
1081 | local m2 = Instance.new("CylinderMesh",p2) | |
1082 | local m = Add.Mesh(p, "http://www.roblox.com/asset/?id=20329976", 1, 1.2, 1) | |
1083 | local tab = {} | |
1084 | coroutine.resume(coroutine.create(function() | |
1085 | for x = 0, 1.04, 0.04 do | |
1086 | wait() | |
1087 | local thing = 33*x | |
1088 | m.Scale = Vector3.new(21*x, 5*x, 21*x) | |
1089 | m2.Scale = Vector3.new(thing, 1, thing) | |
1090 | m3.Scale = Vector3.new(thing*0.93, thing*0.7, thing*0.93) | |
1091 | p.Transparency = x | |
1092 | p2.Transparency = x | |
1093 | p3.Transparency = x | |
1094 | for i, v in pairs(workspace:children()) do | |
1095 | local h = getHumanoid(v) | |
1096 | local to = v:findFirstChild("Torso") | |
1097 | if h ~= nil and to ~= nil and find(tab, v) == nil then | |
1098 | if (to.Position - pos).magnitude < (thing/2) then | |
1099 | damage(h, to, 0.5, Prop.ShockDMG/2, Prop.ShockDMG) | |
1100 | to.Velocity = CFrame.new(pos, to.Position).lookVector * 60 | |
1101 | to.RotVelocity = Vector3.new(math.random(-30, 30), math.random(-30, 30), math.random(-30, 30)) | |
1102 | h.PlatformStand = true | |
1103 | table.insert(tab, v) | |
1104 | coroutine.resume(coroutine.create(function() wait(1.2) h.PlatformStand = false end)) | |
1105 | end | |
1106 | end | |
1107 | end | |
1108 | end | |
1109 | p:remove() | |
1110 | p2:remove() | |
1111 | p3:remove() | |
1112 | end)) | |
1113 | wait(0.8) | |
1114 | for i = 0, 1, Prop.AS*0.8 do | |
1115 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(110-150+40*i), math.rad(10-30+20*i), math.rad(40-90+50*i)) * CFrame.new(0, 0, -0.8+0.8*i) | |
1116 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(85-125+40*i), 0, math.rad(35-35*i)) * CFrame.new(0, -0.45+0.1+0.35*i, 0) | |
1117 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(-10+25-15*i), 0, 0) * CFrame.new(0, 0.5-0.5*i, -0.8+0.8*i) | |
1118 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-10-35+45*i), 0, 0) * CFrame.new(0, 0.4-0.4*i, 0.2-0.2*i) | |
1119 | HW.C0 = HWStand * CFrame.Angles(math.rad(-15-10+25*i), 0, 0) * CFrame.new(0, 0, -0.5+0.7-0.2*i) | |
1120 | neck.C0 = necko * CFrame.Angles(math.rad(-40+75-35*i), 0, math.rad(-20+20*i)) | |
1121 | bg.cframe = CF * CFrame.Angles(0, 0, 0) | |
1122 | bp.position = Orig.p + Vector3.new(0, 15.1-16.7+1.6*i, 0) | |
1123 | wait() | |
1124 | end | |
1125 | normal() | |
1126 | bg:remove() | |
1127 | bp:remove() | |
1128 | end | |
1129 | end | |
1130 | ||
1131 | function flipsmash(mouse) | |
1132 | local Orig = torso.CFrame | |
1133 | local mouseHit = mouse | |
1134 | local CF = ComputePos(Orig.p, mouseHit) | |
1135 | local p, t = RayCast(torso.Position, torso.Position + Vector3.new(0, -5, 0), 5, 0.5) | |
1136 | local ahp = (CF * CFrame.new(0, 0, -14.5)) | |
1137 | local p2, t2 = RayCast(ahp.p, (ahp * CFrame.new(0, -5, 0)).p, 5, 0.5) | |
1138 | if t and t2 and Prop.Rage >= 90 then | |
1139 | Prop.Rage = Prop.Rage - 90 | |
1140 | attach() | |
1141 | local bg = Add.BG(torso) | |
1142 | local bp = Add.BP(torso) | |
1143 | bp.position = Orig.p | |
1144 | bp.maxForce = Vector3.new(math.huge, math.huge, math.huge) | |
1145 | bg.cframe = CF | |
1146 | local cen = CF * CFrame.new(0, -1.2, -1.5-6.5) | |
1147 | for i = 0, 1, 0.08 do | |
1148 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(-100*i), math.rad(-50*i), math.rad(-50*i)) * CFrame.new(0.2*i, 0, 0.2*i) | |
1149 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-100*i), 0, math.rad(-40*i)) * CFrame.new(-0.2*i, -0.4*i, 0.5*i) | |
1150 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(15*i), 0, math.rad(-10*i)) * CFrame.new(0, 0.7*i, -1*i) | |
1151 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-75*i), 0, math.rad(10*i)) * CFrame.new(0, 0.4*i, 0) | |
1152 | HW.C0 = HWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, 0, 1.6*i) | |
1153 | neck.C0 = necko * CFrame.Angles(math.rad(30*i), 0, 0) | |
1154 | bg.cframe = CF * CFrame.Angles(0, 0, 0) | |
1155 | bp.position = CF * CFrame.new(0, -1.2*i, -1.5*i).p | |
1156 | wait() | |
1157 | end | |
1158 | wait(0.15) | |
1159 | hum.PlatformStand = true | |
1160 | for i = 0, 1, 0.13 do | |
1161 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(-100-70*i), math.rad(-50), math.rad(-50)) * CFrame.new(0.2, 0, 0.2) | |
1162 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-100-50*i), 0, math.rad(-40+30*i)) * CFrame.new(-0.2, -0.4, 0.5) | |
1163 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(15-10*i), 0, math.rad(-10)) * CFrame.new(0, 0.7-0.7*i, -1+1*i) | |
1164 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-75+70*i), 0, math.rad(10)) * CFrame.new(0, 0.4-0.4*i, 0) | |
1165 | HW.C0 = HWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, 0, 1.6) | |
1166 | neck.C0 = necko * CFrame.Angles(math.rad(30-40*i), 0, 0) | |
1167 | bg.cframe = CF * CFrame.Angles(math.rad(-90*i), 0, 0) | |
1168 | bp.position = cen * CFrame.Angles(math.rad(180-45*i), 0, 0) * CFrame.new(0, 0, -6.5).p | |
1169 | wait() | |
1170 | end | |
1171 | PlaySound(slash) | |
1172 | for i = 0, 1, 0.13 do | |
1173 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(-100-70-80*i), math.rad(-50+60*i), math.rad(-50+90*i)) * CFrame.new(0.2-0.2*i, -0.85*i, 0.2-0.2*i) | |
1174 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-100-50-125*i), 0, math.rad(-40+30+45*i)) * CFrame.new(-0.2+0.2*i, -0.4-0.5*i, 0.5-0.5*i) | |
1175 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(5), 0, math.rad(-10)) * CFrame.new(0, 0, 0) | |
1176 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-5), 0, math.rad(10)) * CFrame.new(0, 0, 0) | |
1177 | HW.C0 = HWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, 0, 1.6-2.6*i) | |
1178 | neck.C0 = necko * CFrame.Angles(math.rad(-10), 0, 0) | |
1179 | bg.cframe = CF * CFrame.Angles(math.rad(-90-90*i), 0, 0) | |
1180 | bp.position = cen * CFrame.Angles(math.rad(180-45-45*i), 0, 0) * CFrame.new(0, 0, -6.5).p | |
1181 | wait() | |
1182 | end | |
1183 | StartEffect(maintip) | |
1184 | PlaySound(slash) | |
1185 | for i = 0, 1, 0.06 do | |
1186 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(110-150*i), math.rad(10-50*i), math.rad(40-85*i)) * CFrame.new(0, -0.85+0.45*i, 0) | |
1187 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(85-130*i), 0, math.rad(35)) * CFrame.new(0, -0.9+0.3*i, 0) | |
1188 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(5-80*i), 0, math.rad(-10)) * CFrame.new(0, 0.4*i, 0) | |
1189 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-5+20*i), 0, math.rad(10)) * CFrame.new(0, 0.7*i, -1*i) | |
1190 | HW.C0 = HWStand * CFrame.Angles(math.rad(-35+10*i), 0, 0) * CFrame.new(0, 0, 1.6-2.6) | |
1191 | neck.C0 = necko * CFrame.Angles(math.rad(-10+50*i), 0, 0) | |
1192 | bg.cframe = CF * CFrame.Angles(math.rad(-180-190*i), 0, 0) | |
1193 | bp.position = cen * CFrame.Angles(math.rad(90-90*i), 0, 0) * CFrame.new(0, 0, -6.5).p | |
1194 | wait() | |
1195 | end | |
1196 | coroutine.resume(coroutine.create(function() | |
1197 | local frr = Cam.CoordinateFrame | |
1198 | for i = 1, math.random(13,20) do | |
1199 | wait() | |
1200 | Cam.CoordinateFrame = frr * CFrame.new(math.random(-15,15)/10, math.random(-15,15)/10, math.random(-15,15)/10) | |
1201 | end | |
1202 | end)) | |
1203 | PlaySound(smashsound) | |
1204 | PlaySound(boomboom) | |
1205 | EndEffect() | |
1206 | local poo = Vector3.new(maintip.Position.x, t2.Position.y + t2.Size.y/2, maintip.Position.z) | |
1207 | local siz = math.random(65,115)/10 | |
1208 | local partie = Part(workspace, true, false, 1, 0, "White", siz, 0.2, siz, true) | |
1209 | partie.CFrame = CFrame.new(poo) * CFrame.Angles(0, math.rad(math.random(0, 360)), 0) | |
1210 | local decc = Instance.new("Decal",partie) | |
1211 | decc.Shiny = 0 | |
1212 | decc.Specular = 0 | |
1213 | decc.Texture = "http://www.roblox.com/asset/?id=49173398" | |
1214 | decc.Face = "Top" | |
1215 | local count = 0 | |
1216 | for i, v in pairs(workspace:children()) do | |
1217 | local h = getHumanoid(v) | |
1218 | local to = v:findFirstChild("Torso") | |
1219 | if h ~= nil and to ~= nil then | |
1220 | if (to.Position - poo).magnitude < 15 then | |
1221 | count = count + 1 | |
1222 | local Maxhp = h.MaxHealth | |
1223 | if Maxhp > 5000 then Maxhp = 5000 end | |
1224 | damage(h, to, 0.5, 0, Maxhp+5) | |
1225 | to.Velocity = CFrame.new(poo, to.Position).lookVector * 30 | |
1226 | to.Velocity = to.Velocity + Vector3.new(0, 60, 0) | |
1227 | to.RotVelocity = Vector3.new(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1228 | h.PlatformStand = true | |
1229 | coroutine.resume(coroutine.create(function() wait(1.2) h.PlatformStand = false end)) | |
1230 | if count >= 2 then break end | |
1231 | end | |
1232 | end | |
1233 | end | |
1234 | coroutine.resume(coroutine.create(function() wait(math.random(7,14)) partie:remove() end)) | |
1235 | wait(0.6) | |
1236 | for i = 0, 1, 0.06 do | |
1237 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(110-150+40*i), math.rad(10-50+40*i), math.rad(40-85+45*i)) * CFrame.new(0, -0.85+0.45+0.4*i, 0) | |
1238 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(85-130+45*i), 0, math.rad(35-35*i)) * CFrame.new(0, -0.9+0.3+0.6*i, 0) | |
1239 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(5-80+75*i), 0, math.rad(-10+10*i)) * CFrame.new(0, 0.4-0.4*i, 0) | |
1240 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-5+20-15*i), 0, math.rad(10-10*i)) * CFrame.new(0, 0.7-0.7*i, -1+1*i) | |
1241 | HW.C0 = HWStand * CFrame.Angles(math.rad(-35+10+25*i), 0, 0) * CFrame.new(0, 0, 1.6-2.6+1*i) | |
1242 | neck.C0 = necko * CFrame.Angles(math.rad(-10+50-40*i), 0, 0) | |
1243 | bg.cframe = CF * CFrame.Angles(0, 0, 0) | |
1244 | bp.position = cen * CFrame.new(0, 1.2*i, -6.5).p | |
1245 | wait() | |
1246 | end | |
1247 | hum.PlatformStand = false | |
1248 | normal() | |
1249 | bg:remove() | |
1250 | bp:remove() | |
1251 | end | |
1252 | end | |
1253 | ||
1254 | function spin(mouse) | |
1255 | attach() | |
1256 | local mouseHit = mouse | |
1257 | local Orig = torso.CFrame | |
1258 | local CF = ComputePos(Orig.p, mouseHit) | |
1259 | local p, t = RayCast(torso.Position, CF * CFrame.new(0, -7, -1.5).p, 5, 0.5) | |
1260 | if t then | |
1261 | local bg = Add.BG(torso) | |
1262 | local bp = Add.BP(torso) | |
1263 | bp.maxForce = Vector3.new(math.huge, math.huge, math.huge) | |
1264 | bp.position = Orig.p | |
1265 | bg.cframe = CF | |
1266 | PlaySound(slash) | |
1267 | for i = 0, 1, 0.11 do | |
1268 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(20*i), math.rad(120*i), math.rad(20*i)) * CFrame.new(0, 0, 0) | |
1269 | RAW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(100*i), 0, math.rad(20*i)) | |
1270 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(60*i), 0, math.rad(40*i)) * CFrame.new(0, -0.8*i, 0) | |
1271 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(10*i), 0, 0) * CFrame.new(0, 0.3*i, -0.2*i) | |
1272 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-25*i), 0, 0) | |
1273 | HW.C0 = HWStand * CFrame.Angles(0, 0, 0) | |
1274 | neck.C0 = necko * CFrame.Angles(math.rad(-15*i), 0, math.rad(-30*i)) | |
1275 | bg.cframe = CF * CFrame.Angles(0, 0, 0) | |
1276 | wait() | |
1277 | end | |
1278 | local posg = CF * CFrame.new(0, -0.6, -4) | |
1279 | PlaySound(hitsound, 0.9) | |
1280 | for i = 0, 1, 0.13 do | |
1281 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(20-20*i), math.rad(120+10*i), math.rad(20)) * CFrame.new(0, -0.8*i, 0.4*i) | |
1282 | RAW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(100-60*i), 0, math.rad(20-20*i)) | |
1283 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(60-40*i), 0, math.rad(40-50*i)) * CFrame.new(0, -0.8+0.3*i, 0) | |
1284 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(10-10*i), 0, 0) * CFrame.new(0, 0.3-0.3*i, -0.2+0.2*i) | |
1285 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-25+25*i), 0, 0) | |
1286 | HW.C0 = HWStand * CFrame.Angles(0, 0, math.rad(-35*i)) * CFrame.new(0, 0, -0.6*i) | |
1287 | neck.C0 = necko * CFrame.Angles(math.rad(-15+25*i), 0, math.rad(-30+30*i)) | |
1288 | bg.cframe = CF * CFrame.Angles(0, 0, 0) | |
1289 | bp.position = CF * CFrame.new(0, 1*i, -2*i).p | |
1290 | wait() | |
1291 | end | |
1292 | hum.PlatformStand = true | |
1293 | bg.Parent = handle | |
1294 | bg.cframe = CF * CFrame.Angles(math.pi, math.pi, 0) | |
1295 | bp.Parent = handle | |
1296 | bp.position = posg.p | |
1297 | StartEffect(Lleg) | |
1298 | Leghurt = true | |
1299 | PlaySound(slash) | |
1300 | for i = 0, 1, 0.09 do | |
1301 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(-90*i), math.rad(130-40*i), math.rad(20-40*i)) * CFrame.new(0, -0.8+0.8*i, 0.4-0.4*i) | |
1302 | RAW.C1 = CFrame.new(0, 0.5+0.5*i, 0) * CFrame.Angles(math.rad(100-60+60*i), 0, 0) | |
1303 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(60-40-20+60*i), 0, math.rad(40-50+10*i)) * CFrame.new(0, -0.8+0.3-0.5*i, 0) | |
1304 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(15*i), 0, 0) | |
1305 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-20*i), 0, 0) | |
1306 | HW.C0 = HWStand * CFrame.Angles(0, 0, math.rad(-35)) * CFrame.new(0, 0, 1*i) | |
1307 | neck.C0 = necko * CFrame.Angles(math.rad(10-35*i), 0, 0) | |
1308 | bg.cframe = CF * CFrame.Angles(math.pi, math.pi+math.rad(90*i), 0) | |
1309 | wait() | |
1310 | end | |
1311 | for i = 0, 1, 0.055 do | |
1312 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(-90), math.rad(90), math.rad(-20)) * CFrame.new(0, 0, 0) | |
1313 | RAW.C1 = CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(100), 0, 0) | |
1314 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(60), 0, 0) * CFrame.new(0, -1, 0) | |
1315 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(15+10*i), 0, 0) | |
1316 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-20-5*i), 0, 0) | |
1317 | HW.C0 = HWStand * CFrame.Angles(0, 0, math.rad(-35)) * CFrame.new(0, 0, 1) | |
1318 | neck.C0 = necko * CFrame.Angles(math.rad(-25), 0, 0) | |
1319 | bg.cframe = CF * CFrame.Angles(math.pi, math.pi+math.rad(90+270*i), 0) | |
1320 | wait() | |
1321 | end | |
1322 | EndEffect() | |
1323 | Leghurt = false | |
1324 | for i = 0, 1, 0.12 do | |
1325 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(-90+90*i), math.rad(90+40*i), math.rad(-20+40*i)) * CFrame.new(0, -0.8*i, 0.4*i) | |
1326 | RAW.C1 = CFrame.new(0, 1-0.5*i, 0) * CFrame.Angles(math.rad(100-60*i), 0, 0) | |
1327 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(60-60*i), 0, 0) * CFrame.new(0, -1+0.5*i, 0) | |
1328 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(15+10-25*i), 0, 0) | |
1329 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(-20-5+25*i), 0, 0) | |
1330 | HW.C0 = HWStand * CFrame.Angles(0, 0, math.rad(-35)) * CFrame.new(0, 0, 1) | |
1331 | neck.C0 = necko * CFrame.Angles(math.rad(-25+25*i), 0, 0) | |
1332 | bg.cframe = CF * CFrame.Angles(math.pi, math.pi+math.rad(360), 0) | |
1333 | wait() | |
1334 | end | |
1335 | bg.Parent = torso | |
1336 | bp.Parent = torso | |
1337 | bg.cframe = CF | |
1338 | for i = 0, 1, 0.14 do | |
1339 | RAW.C0 = RAWStand * CFrame.Angles(0, math.rad(90+40-130*i), math.rad(-20+40-20*i)) * CFrame.new(0, -0.8+0.8*i, 0.4-0.4*i) | |
1340 | RAW.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(math.rad(100-60-40*i), 0, 0) | |
1341 | LAW.C0 = LAWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, -1+0.5+0.5*i, 0) | |
1342 | RLW.C0 = RLWStand * CFrame.Angles(0, 0, 0) | |
1343 | LLW.C0 = LLWStand * CFrame.Angles(0, 0, 0) | |
1344 | HW.C0 = HWStand * CFrame.Angles(0, 0, math.rad(-35+35*i)) * CFrame.new(0, 0, 1-1*i) | |
1345 | neck.C0 = necko * CFrame.Angles(0, 0, 0) | |
1346 | bp.position = CF * CFrame.new(0, 0, -2+1*i).p | |
1347 | bg.cframe = CF | |
1348 | wait() | |
1349 | end | |
1350 | hum.PlatformStand = false | |
1351 | normal() | |
1352 | bg:remove() | |
1353 | bp:remove() | |
1354 | end | |
1355 | end | |
1356 | ||
1357 | function rest() | |
1358 | local Orig = torso.CFrame | |
1359 | local CF = ComputePos(Orig.p, Orig * CFrame.new(0, 0, -5).p) | |
1360 | local p, t = RayCast(CF.p, CF * CFrame.new(0, -6, 0.5).p, 6, 0.5) | |
1361 | if t then | |
1362 | attach() | |
1363 | local bg = Add.BG(torso) | |
1364 | local bp = Add.BP(torso) | |
1365 | bp.maxForce = Vector3.new(math.huge, math.huge, math.huge) | |
1366 | bp.position = CF.p | |
1367 | bg.cframe = CF | |
1368 | local cen = CF * CFrame.new(0, -2.5, 0) | |
1369 | RestingAnim = true | |
1370 | hum.PlatformStand = true | |
1371 | local standup = function() | |
1372 | Resting = false | |
1373 | bp.Parent = torso | |
1374 | cen = ComputePos(torso.CFrame.p, torso.CFrame * CFrame.new(0, 0, -5).p) * CFrame.new(0, 0, -2.5) | |
1375 | for i = 1, 0, -0.12 do | |
1376 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(50), math.rad(-20-20*i), math.rad(60*i)) | |
1377 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-40-70*i), 0, math.rad(-30-10*i)) * CFrame.new(0, -0.6*i, 0.4+0.2*i) | |
1378 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(55+25*i), 0, math.rad(15)) * CFrame.new(0, 0, -0.4) | |
1379 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(55+25*i), 0, math.rad(-15)) * CFrame.new(0, 0, -0.4) | |
1380 | neck.C0 = necko * CFrame.Angles(math.rad(10-15*i), 0, 0) | |
1381 | HW.C0 = HWStand * CFrame.Angles(math.rad(40*i), 0, 0) * CFrame.new(0, 0, 0.2+0.8*i) | |
1382 | bg.cframe = CF * CFrame.Angles(math.rad(-10+20*i), 0, 0) | |
1383 | bp.position = cen * CFrame.Angles(math.rad(180+45+45*i), 0, 0) * CFrame.new(0, -2.5, 0.4*i).p | |
1384 | wait() | |
1385 | end | |
1386 | for i = 1, 0, -0.17 do | |
1387 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(50*i), math.rad(-20*i), 0) | |
1388 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-40*i), 0, math.rad(-30*i)) * CFrame.new(0, 0, 0.4*i) | |
1389 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(55*i), 0, math.rad(15*i)) * CFrame.new(0, -0.4*i, -0.4*i) | |
1390 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(55*i), 0, math.rad(-15*i)) * CFrame.new(0, -0.4*i, -0.4*i) | |
1391 | neck.C0 = necko * CFrame.Angles(math.rad(10*i), 0, 0) | |
1392 | HW.C0 = HWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, 0, 0.2*i) | |
1393 | bg.cframe = CF * CFrame.Angles(math.rad(-10*i), 0, 0) | |
1394 | bp.position = cen * CFrame.Angles(math.rad(180+45*i), 0, 0) * CFrame.new(0, -2.5, 0).p | |
1395 | wait() | |
1396 | end | |
1397 | hum.PlatformStand = false | |
1398 | bg:remove() | |
1399 | bp:remove() | |
1400 | normal() | |
1401 | Able = true | |
1402 | RestingAnim = false | |
1403 | end | |
1404 | local connec = hum.Changed:connect(function() | |
1405 | if hum.PlatformStand == false then | |
1406 | coroutine.resume(coroutine.create(function() | |
1407 | standup() | |
1408 | end)) | |
1409 | standup = nil | |
1410 | connec:disconnect() | |
1411 | end | |
1412 | end) | |
1413 | local lasthp = hum.Health | |
1414 | local conn = hum.HealthChanged:connect(function(hp) | |
1415 | if lasthp - hp > 0.8 then | |
1416 | hum.PlatformStand = false | |
1417 | conn:disconnect() | |
1418 | end | |
1419 | lasthp = hp | |
1420 | end) | |
1421 | coroutine.resume(coroutine.create(function() | |
1422 | repeat wait() until Resting | |
1423 | while Resting do | |
1424 | wait() | |
1425 | if torso.Velocity.magnitude > 4 then | |
1426 | hum.PlatformStand = false | |
1427 | break | |
1428 | end | |
1429 | end | |
1430 | end)) | |
1431 | for i = 0, 1, 0.1 do | |
1432 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(50*i), math.rad(-20*i), 0) | |
1433 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-40*i), 0, math.rad(-30*i)) * CFrame.new(0, 0, 0.4*i) | |
1434 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(55*i), 0, math.rad(15*i)) * CFrame.new(0, 0, -0.4*i) | |
1435 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(55*i), 0, math.rad(-15*i)) * CFrame.new(0, 0, -0.4*i) | |
1436 | neck.C0 = necko * CFrame.Angles(math.rad(10*i), 0, 0) | |
1437 | HW.C0 = HWStand * CFrame.Angles(0, 0, 0) * CFrame.new(0, 0, 0.2*i) | |
1438 | bg.cframe = CF * CFrame.Angles(math.rad(-10*i), 0, 0) | |
1439 | bp.position = cen * CFrame.Angles(math.rad(180+45*i), 0, 0) * CFrame.new(0, -2.5, 0).p | |
1440 | wait() | |
1441 | end | |
1442 | for i = 0, 1, 0.07 do | |
1443 | RAW.C0 = RAWStand * CFrame.Angles(math.rad(50), math.rad(-20-20*i), math.rad(60*i)) | |
1444 | LAW.C0 = LAWStand * CFrame.Angles(math.rad(-40-70*i), 0, math.rad(-30-10*i)) * CFrame.new(0, -0.6*i, 0.4+0.2*i) | |
1445 | RLW.C0 = RLWStand * CFrame.Angles(math.rad(55+25*i), 0, math.rad(15)) * CFrame.new(0, -0.4*i, -0.4) | |
1446 | LLW.C0 = LLWStand * CFrame.Angles(math.rad(55+25*i), 0, math.rad(-15)) * CFrame.new(0, -0.4*i, -0.4) | |
1447 | neck.C0 = necko * CFrame.Angles(math.rad(10-15*i), 0, 0) | |
1448 | HW.C0 = HWStand * CFrame.Angles(math.rad(40*i), 0, 0) * CFrame.new(0, 0, 0.2+0.8*i) | |
1449 | bg.cframe = CF * CFrame.Angles(math.rad(-10+20*i), 0, 0) | |
1450 | bp.position = cen * CFrame.Angles(math.rad(180+45+45*i), 0, 0) * CFrame.new(0, -2.5, 0.4*i).p | |
1451 | wait() | |
1452 | end | |
1453 | Resting = true | |
1454 | coroutine.resume(coroutine.create(function() | |
1455 | wait(0.4) | |
1456 | bp.Parent = nil | |
1457 | end)) | |
1458 | coroutine.resume(coroutine.create(function() | |
1459 | while Resting and selected do | |
1460 | wait(math.random(350,800)/1000) | |
1461 | hum.Health = hum.Health + math.random(1,2) | |
1462 | Prop.Rage = Prop.Rage + 1 | |
1463 | end | |
1464 | hum.PlatformStand = false | |
1465 | end)) | |
1466 | end | |
1467 | end | |
1468 | ||
1469 | function select(mouse) | |
1470 | mouse.Icon = MouseIc | |
1471 | selectanim() | |
1472 | selected = true | |
1473 | mouse.Button1Down:connect(function() | |
1474 | if Able and RestingAnim == false and hum.Sit == false then | |
1475 | Able = false | |
1476 | swing(mouse.Hit.p) | |
1477 | Able = true | |
1478 | end | |
1479 | end) | |
1480 | mouse.Button1Down:connect(function() | |
1481 | mouse.Icon = MouseDo | |
1482 | mouse.Button1Up:wait() | |
1483 | mouse.Icon = MouseIc | |
1484 | end) | |
1485 | mouse.KeyDown:connect(function(key) | |
1486 | key = key:lower() | |
1487 | if Able and RestingAnim == false and hum.Sit == false then | |
1488 | if key == "q" then | |
1489 | Able = false | |
1490 | smash(mouse.Hit.p) | |
1491 | Able = true | |
1492 | elseif key == "e" then | |
1493 | Able = false | |
1494 | swing(mouse.Hit.p) | |
1495 | Able = true | |
1496 | elseif key == "r" then | |
1497 | Able = false | |
1498 | stab(mouse.Hit.p) | |
1499 | Able = true | |
1500 | elseif key == "f" then | |
1501 | Able = false | |
1502 | epicsmash(mouse.Hit.p) | |
1503 | Able = true | |
1504 | elseif key == "z" then | |
1505 | Able = false | |
1506 | shockwave(mouse.Hit.p) | |
1507 | Able = true | |
1508 | elseif key == "x" then | |
1509 | Able = false | |
1510 | flipsmash(mouse.Hit.p) | |
1511 | Able = true | |
1512 | elseif key == "t" then | |
1513 | Able = false | |
1514 | spin(mouse.Hit.p) | |
1515 | Able = true | |
1516 | end | |
1517 | end | |
1518 | if Able then | |
1519 | if key == "g" and AbleG then | |
1520 | AbleG = false | |
1521 | if Resting == true then | |
1522 | Resting = false | |
1523 | else | |
1524 | rest() | |
1525 | end | |
1526 | wait(0.8) | |
1527 | AbleG = true | |
1528 | end | |
1529 | end | |
1530 | end) | |
1531 | end | |
1532 | ||
1533 | function deselect(mouse) | |
1534 | selected = false | |
1535 | deselanim() | |
1536 | end | |
1537 | ||
1538 | bin.Selected:connect(select) | |
1539 | bin.Deselected:connect(deselect) |