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,Mouse,mouse,UserInputService,ContextActionService = owner | |
3 | do | |
4 | print("FE Compatibility code by Mokiros") | |
5 | script.Parent = Player.Character | |
6 | ||
7 | --RemoteEvent for communicating | |
8 | local Event = Instance.new("RemoteEvent") | |
9 | Event.Name = "UserInput_Event" | |
10 | ||
11 | --Fake event to make stuff like Mouse.KeyDown work | |
12 | local function fakeEvent() | |
13 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} | |
14 | t.connect = t.Connect | |
15 | return t | |
16 | end | |
17 | ||
18 | --Creating fake input objects with fake variables | |
19 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
20 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
21 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
22 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
23 | end} | |
24 | --Merged 2 functions into one by checking amount of arguments | |
25 | CAS.UnbindAction = CAS.BindAction | |
26 | ||
27 | --This function will trigger the events that have been :Connect()'ed | |
28 | local function te(self,ev,...) | |
29 | local t = m[ev] | |
30 | if t and t._fakeEvent and t.Function then | |
31 | t.Function(...) | |
32 | end | |
33 | end | |
34 | m.TrigEvent = te | |
35 | UIS.TrigEvent = te | |
36 | ||
37 | Event.OnServerEvent:Connect(function(plr,io) | |
38 | if plr~=Player then return end | |
39 | if io.isMouse then | |
40 | m.Target = io.Target | |
41 | m.Hit = io.Hit | |
42 | else | |
43 | local b = io.UserInputState == Enum.UserInputState.Begin | |
44 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
45 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
46 | end | |
47 | for _,t in pairs(CAS.Actions) do | |
48 | for _,k in pairs(t.Keys) do | |
49 | if k==io.KeyCode then | |
50 | t.Function(t.Name,io.UserInputState,io) | |
51 | end | |
52 | end | |
53 | end | |
54 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
55 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
56 | end | |
57 | end) | |
58 | Event.Parent = NLS([==[ | |
59 | local Player = game:GetService("Players").LocalPlayer | |
60 | local Event = script:WaitForChild("UserInput_Event") | |
61 | ||
62 | local UIS = game:GetService("UserInputService") | |
63 | local input = function(io,a) | |
64 | if a then return end | |
65 | --Since InputObject is a client-side instance, we create and pass table instead | |
66 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) | |
67 | end | |
68 | UIS.InputBegan:Connect(input) | |
69 | UIS.InputEnded:Connect(input) | |
70 | ||
71 | local Mouse = Player:GetMouse() | |
72 | local h,t | |
73 | --Give the server mouse data 30 times every second, but only if the values changed | |
74 | --If player is not moving their mouse, client won't fire events | |
75 | while wait(1/30) do | |
76 | if h~=Mouse.Hit or t~=Mouse.Target then | |
77 | h,t=Mouse.Hit,Mouse.Target | |
78 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
79 | end | |
80 | end]==],Player.Character) | |
81 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
82 | end | |
83 | -- | |
84 | print("Script made by xdielivex") | |
85 | print("Olympic revenger") | |
86 | -- | |
87 | ||
88 | Player = owner | |
89 | PlayerGui = Player.PlayerGui | |
90 | Cam = workspace.CurrentCamera | |
91 | Backpack = Player.Backpack | |
92 | Character = Player.Character | |
93 | Humanoid = Character.Humanoid | |
94 | RootPart = Character["HumanoidRootPart"] | |
95 | Torso = Character["Torso"] | |
96 | Head = Character["Head"] | |
97 | RightArm = Character["Right Arm"] | |
98 | LeftArm = Character["Left Arm"] | |
99 | RightLeg = Character["Right Leg"] | |
100 | LeftLeg = Character["Left Leg"] | |
101 | RootJoint = RootPart["RootJoint"] | |
102 | Neck = Torso["Neck"] | |
103 | RightShoulder = Torso["Right Shoulder"] | |
104 | LeftShoulder = Torso["Left Shoulder"] | |
105 | RightHip = Torso["Right Hip"] | |
106 | LeftHip = Torso["Left Hip"] | |
107 | Humanoid.DisplayDistanceType = "None" | |
108 | ||
109 | IT = Instance.new | |
110 | CF = CFrame.new | |
111 | VT = Vector3.new | |
112 | RAD = math.rad | |
113 | C3 = Color3.new | |
114 | UD2 = UDim2.new | |
115 | BRICKC = BrickColor.new | |
116 | ANGLES = CFrame.Angles | |
117 | EULER = CFrame.fromEulerAnglesXYZ | |
118 | COS = math.cos | |
119 | ACOS = math.acos | |
120 | SIN = math.sin | |
121 | ASIN = math.asin | |
122 | ABS = math.abs | |
123 | MRANDOM = math.random | |
124 | FLOOR = math.floor | |
125 | ||
126 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
127 | local NEWMESH = IT(MESH) | |
128 | if MESH == "SpecialMesh" then | |
129 | NEWMESH.MeshType = MESHTYPE | |
130 | if MESHID ~= "nil" and MESHID ~= "" then | |
131 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
132 | end | |
133 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
134 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
135 | end | |
136 | end | |
137 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
138 | NEWMESH.Scale = SCALE | |
139 | NEWMESH.Parent = PARENT | |
140 | return NEWMESH | |
141 | end | |
142 | ||
143 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
144 | local NEWPART = IT("Part") | |
145 | NEWPART.formFactor = FORMFACTOR | |
146 | NEWPART.Reflectance = REFLECTANCE | |
147 | NEWPART.Transparency = TRANSPARENCY | |
148 | NEWPART.CanCollide = false | |
149 | NEWPART.Locked = true | |
150 | NEWPART.Anchored = true | |
151 | if ANCHOR == false then | |
152 | NEWPART.Anchored = false | |
153 | end | |
154 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
155 | NEWPART.Name = NAME | |
156 | NEWPART.Size = SIZE | |
157 | NEWPART.Position = Torso.Position | |
158 | NEWPART.Material = MATERIAL | |
159 | NEWPART:BreakJoints() | |
160 | NEWPART.Parent = PARENT | |
161 | return NEWPART | |
162 | end | |
163 | ||
164 | --//=================================\\ | |
165 | --|| CUSTOMIZATION | |
166 | --\\=================================// | |
167 | ||
168 | Player_Size = 1 --Size of the player. | |
169 | Animation_Speed = 3 | |
170 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
171 | ||
172 | local Speed = 20 | |
173 | local Effects2 = {} | |
174 | ||
175 | ||
176 | --//=================================\\ | |
177 | --|| END OF CUSTOMIZATION | |
178 | --\\=================================// | |
179 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
180 | local label = IT("TextLabel") | |
181 | label.BackgroundTransparency = 1 | |
182 | label.Size = UD2(1, 0, 1, 0) | |
183 | label.Position = UD2(0, 0, 0, 0) | |
184 | label.TextColor3 = TEXTCOLOR | |
185 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
186 | label.TextTransparency = TRANSPARENCY | |
187 | label.FontSize = TEXTFONTSIZE | |
188 | label.Font = TEXTFONT | |
189 | label.BorderSizePixel = BORDERSIZEPIXEL | |
190 | label.TextScaled = false | |
191 | label.Text = TEXT | |
192 | label.Name = NAME | |
193 | label.Parent = PARENT | |
194 | return label | |
195 | end | |
196 | ||
197 | function chatfunc(text) | |
198 | local chat = coroutine.wrap(function() | |
199 | if Character:FindFirstChild("TalkingBillBoard")~= nil then | |
200 | Character:FindFirstChild("TalkingBillBoard"):destroy() | |
201 | end | |
202 | local Bill = Instance.new("BillboardGui",Character) | |
203 | Bill.Size = UDim2.new(0,100,0,40) | |
204 | Bill.StudsOffset = Vector3.new(0,3,0) | |
205 | Bill.Adornee = Character.Head | |
206 | Bill.Name = "TalkingBillBoard" | |
207 | local Hehe = Instance.new("TextLabel",Bill) | |
208 | Hehe.BackgroundTransparency = 1 | |
209 | Hehe.BorderSizePixel = 0 | |
210 | Hehe.Text = "" | |
211 | Hehe.Font = "Bodoni" | |
212 | Hehe.TextSize = 40 | |
213 | Hehe.TextStrokeTransparency = 0 | |
214 | Hehe.Size = UDim2.new(1,0,0.5,0) | |
215 | coroutine.resume(coroutine.create(function() | |
216 | while Hehe ~= nil do | |
217 | swait() | |
218 | Hehe.Position = UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5)) | |
219 | Hehe.Rotation = math.random(-5,5) | |
220 | Hehe.TextColor3 = Color3.new(220, 188, 129) | |
221 | Hehe.TextStrokeColor3 = Color3.new(220, 188, 129) | |
222 | end | |
223 | end)) | |
224 | for i = 1,string.len(text),1 do | |
225 | swait() | |
226 | Hehe.Text = string.sub(text,1,i) | |
227 | end | |
228 | swait(90)--Re[math.random(1, 93)] | |
229 | for i = 0, 1, .025 do | |
230 | swait() | |
231 | Bill.ExtentsOffset = Vector3.new(math.random(-i, i), math.random(-i, i), math.random(-i, i)) | |
232 | Hehe.TextStrokeTransparency = i | |
233 | Hehe.TextTransparency = i | |
234 | end | |
235 | Bill:Destroy() | |
236 | end) | |
237 | chat() | |
238 | end | |
239 | ||
240 | function onChatted(msg) | |
241 | chatfunc(msg) | |
242 | end | |
243 | ||
244 | Player.Chatted:connect(onChatted) | |
245 | --------------------------------- | |
246 | ||
247 | local function weldBetween(a, b) | |
248 | local weldd = Instance.new("ManualWeld") | |
249 | weldd.Part0 = a | |
250 | weldd.Part1 = b | |
251 | weldd.C0 = CFrame.new() | |
252 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
253 | weldd.Parent = a | |
254 | return weldd | |
255 | end | |
256 | ||
257 | --//=================================\\ | |
258 | --|| USEFUL VALUES | |
259 | --\\=================================// | |
260 | ||
261 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
262 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
263 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
264 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
265 | local CHANGEDEFENSE = 0 | |
266 | local CHANGEDAMAGE = 0 | |
267 | local CHANGEMOVEMENT = 0 | |
268 | local ANIM = "Idle" | |
269 | local ATTACK = false | |
270 | local EQUIPPED = false | |
271 | local HOLD = false | |
272 | local COMBO = 1 | |
273 | local Rooted = false | |
274 | local SINE = 0 | |
275 | local KEYHOLD = false | |
276 | local CHANGE = 2 / Animation_Speed | |
277 | local WALKINGANIM = false | |
278 | local WALK = 0 | |
279 | local VALUE1 = false | |
280 | local VALUE2 = false | |
281 | local ROBLOXIDLEANIMATION = IT("Animation") | |
282 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
283 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
284 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
285 | local WEAPONGUI = IT("ScreenGui", PlayerGui) | |
286 | WEAPONGUI.Name = "Weapon GUI" | |
287 | local Weapon = IT("Model") | |
288 | Weapon.Name = "Adds" | |
289 | local Effects = IT("Folder", Weapon) | |
290 | Effects.Name = "Effects" | |
291 | local ANIMATOR = Humanoid.Animator | |
292 | local ANIMATE = Character.Animate | |
293 | local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"} | |
294 | local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"} | |
295 | local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"} | |
296 | local HITBLOCKSOUNDS = {"199148933", "199148947"} | |
297 | local UNANCHOR = true | |
298 | local KILLINSTINCT = 0 | |
299 | ||
300 | local SKILLTEXTCOLOR = C3(1,0,0) | |
301 | ||
302 | --//=================================\\ | |
303 | --\\=================================// | |
304 | ||
305 | ||
306 | --//=================================\\ | |
307 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
308 | --\\=================================// | |
309 | ||
310 | ArtificialHB = Instance.new("BindableEvent", script) | |
311 | ArtificialHB.Name = "ArtificialHB" | |
312 | ||
313 | script:WaitForChild("ArtificialHB") | |
314 | ||
315 | frame = Frame_Speed | |
316 | tf = 0 | |
317 | allowframeloss = false | |
318 | tossremainder = false | |
319 | lastframe = tick() | |
320 | script.ArtificialHB:Fire() | |
321 | ||
322 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
323 | tf = tf + s | |
324 | if tf >= frame then | |
325 | if allowframeloss then | |
326 | script.ArtificialHB:Fire() | |
327 | lastframe = tick() | |
328 | else | |
329 | for i = 1, math.floor(tf / frame) do | |
330 | script.ArtificialHB:Fire() | |
331 | end | |
332 | lastframe = tick() | |
333 | end | |
334 | if tossremainder then | |
335 | tf = 0 | |
336 | else | |
337 | tf = tf - frame * math.floor(tf / frame) | |
338 | end | |
339 | end | |
340 | end) | |
341 | ||
342 | --//=================================\\ | |
343 | --\\=================================// | |
344 | ||
345 | ||
346 | ||
347 | ||
348 | ||
349 | --//=================================\\ | |
350 | --|| SOME FUNCTIONS | |
351 | --\\=================================// | |
352 | ||
353 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
354 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
355 | end | |
356 | ||
357 | function PositiveAngle(NUMBER) | |
358 | if NUMBER >= 0 then | |
359 | NUMBER = 0 | |
360 | end | |
361 | return NUMBER | |
362 | end | |
363 | ||
364 | function NegativeAngle(NUMBER) | |
365 | if NUMBER <= 0 then | |
366 | NUMBER = 0 | |
367 | end | |
368 | return NUMBER | |
369 | end | |
370 | ||
371 | function Swait(NUMBER) | |
372 | if NUMBER == 0 or NUMBER == nil then | |
373 | ArtificialHB.Event:wait() | |
374 | else | |
375 | for i = 1, NUMBER do | |
376 | ArtificialHB.Event:wait() | |
377 | end | |
378 | end | |
379 | end | |
380 | ||
381 | function QuaternionFromCFrame(cf) | |
382 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
383 | local trace = m00 + m11 + m22 | |
384 | if trace > 0 then | |
385 | local s = math.sqrt(1 + trace) | |
386 | local recip = 0.5 / s | |
387 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
388 | else | |
389 | local i = 0 | |
390 | if m11 > m00 then | |
391 | i = 1 | |
392 | end | |
393 | if m22 > (i == 0 and m00 or m11) then | |
394 | i = 2 | |
395 | end | |
396 | if i == 0 then | |
397 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
398 | local recip = 0.5 / s | |
399 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
400 | elseif i == 1 then | |
401 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
402 | local recip = 0.5 / s | |
403 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
404 | elseif i == 2 then | |
405 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
406 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
407 | end | |
408 | end | |
409 | end | |
410 | ||
411 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
412 | local xs, ys, zs = x + x, y + y, z + z | |
413 | local wx, wy, wz = w * xs, w * ys, w * zs | |
414 | local xx = x * xs | |
415 | local xy = x * ys | |
416 | local xz = x * zs | |
417 | local yy = y * ys | |
418 | local yz = y * zs | |
419 | local zz = z * zs | |
420 | return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy)) | |
421 | end | |
422 | ||
423 | function QuaternionSlerp(a, b, t) | |
424 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
425 | local startInterp, finishInterp; | |
426 | if cosTheta >= 0.0001 then | |
427 | if (1 - cosTheta) > 0.0001 then | |
428 | local theta = ACOS(cosTheta) | |
429 | local invSinTheta = 1 / SIN(theta) | |
430 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
431 | finishInterp = SIN(t * theta) * invSinTheta | |
432 | else | |
433 | startInterp = 1 - t | |
434 | finishInterp = t | |
435 | end | |
436 | else | |
437 | if (1 + cosTheta) > 0.0001 then | |
438 | local theta = ACOS(-cosTheta) | |
439 | local invSinTheta = 1 / SIN(theta) | |
440 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
441 | finishInterp = SIN(t * theta) * invSinTheta | |
442 | else | |
443 | startInterp = t - 1 | |
444 | finishInterp = t | |
445 | end | |
446 | end | |
447 | return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp | |
448 | end | |
449 | ||
450 | function Clerp(a, b, t) | |
451 | local qa = {QuaternionFromCFrame(a)} | |
452 | local qb = {QuaternionFromCFrame(b)} | |
453 | local ax, ay, az = a.x, a.y, a.z | |
454 | local bx, by, bz = b.x, b.y, b.z | |
455 | local _t = 1 - t | |
456 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
457 | end | |
458 | ||
459 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
460 | local frame = IT("Frame") | |
461 | frame.BackgroundTransparency = TRANSPARENCY | |
462 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
463 | frame.Position = POSITION | |
464 | frame.Size = SIZE | |
465 | frame.BackgroundColor3 = COLOR | |
466 | frame.BorderColor3 = BORDERCOLOR | |
467 | frame.Name = NAME | |
468 | frame.Parent = PARENT | |
469 | return frame | |
470 | end | |
471 | ||
472 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
473 | local label = IT("TextLabel") | |
474 | label.BackgroundTransparency = 1 | |
475 | label.Size = UD2(1, 0, 1, 0) | |
476 | label.Position = UD2(0, 0, 0, 0) | |
477 | label.TextColor3 = TEXTCOLOR | |
478 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
479 | label.TextTransparency = TRANSPARENCY | |
480 | - | local HandleMesh = CreateMesh("SpecialMesh", HandlePart, "FileMesh", "145815658", "186913315", VT(1,1,1), VT(0, 0, 0)) |
480 | + | |
481 | label.Font = TEXTFONT | |
482 | label.BorderSizePixel = BORDERSIZEPIXEL | |
483 | label.TextScaled = false | |
484 | label.Text = TEXT | |
485 | label.Name = NAME | |
486 | label.Parent = PARENT | |
487 | return label | |
488 | end | |
489 | ||
490 | function NoOutlines(PART) | |
491 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
492 | end | |
493 | ||
494 | ||
495 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
496 | local NEWWELD = IT(TYPE) | |
497 | NEWWELD.Part0 = PART0 | |
498 | NEWWELD.Part1 = PART1 | |
499 | NEWWELD.C0 = C0 | |
500 | NEWWELD.C1 = C1 | |
501 | NEWWELD.Parent = PARENT | |
502 | return NEWWELD | |
503 | end | |
504 | ||
505 | function CreateSound(ID, PARENT, VOLUME, PITCH) | |
506 | local NEWSOUND = nil | |
507 | coroutine.resume(coroutine.create(function() | |
508 | NEWSOUND = IT("Sound", PARENT) | |
509 | NEWSOUND.Volume = VOLUME | |
510 | NEWSOUND.Pitch = PITCH | |
511 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
512 | Swait() | |
513 | NEWSOUND:play() | |
514 | game:GetService("Debris"):AddItem(NEWSOUND, 10) | |
515 | end)) | |
516 | return NEWSOUND | |
517 | end | |
518 | ||
519 | function CFrameFromTopBack(at, top, back) | |
520 | local right = top:Cross(back) | |
521 | return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
522 | end | |
523 | ||
524 | function MakeForm(PART,TYPE) | |
525 | if TYPE == "Cyl" then | |
526 | local MSH = IT("CylinderMesh",PART) | |
527 | elseif TYPE == "Ball" then | |
528 | local MSH = IT("SpecialMesh",PART) | |
529 | MSH.MeshType = "Sphere" | |
530 | elseif TYPE == "Wedge" then | |
531 | local MSH = IT("SpecialMesh",PART) | |
532 | MSH.MeshType = "Wedge" | |
533 | end | |
534 | end | |
535 | ||
536 | Debris = game:GetService("Debris") | |
537 | --//=================================\\ | |
538 | --|| WEAPON CREATION | |
539 | --\\=================================// | |
540 | ||
541 | local HandlePart = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0.2, 3.39, 1.61),false) | |
542 | local HandleMesh = CreateMesh("SpecialMesh", HandlePart, "FileMesh", "145815658", "1215800880", VT(1.5,1.5,1.5), VT(0, 0, 0)) | |
543 | local HandleWeld = CreateWeldOrSnapOrMotor("Weld", HandlePart, RightArm, HandlePart, CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
544 | ||
545 | local DECAL = IT("Decal",HandlePart) | |
546 | DECAL.Texture = "http://www.roblox.com/asset/?id=116830967" | |
547 | ||
548 | for _, c in pairs(Weapon:GetChildren()) do | |
549 | if c.ClassName == "Part" then | |
550 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
551 | end | |
552 | end | |
553 | ||
554 | local A = IT("Attachment",HandlePart) | |
555 | A.Position = VT(0, -1.5, 0) | |
556 | local B = IT("Attachment",HandlePart) | |
557 | B.Position = VT(0, 2.2, 0.2) | |
558 | local Trail = IT("Trail",HandlePart) | |
559 | Trail.Attachment0 = A | |
560 | Trail.Attachment1 = B | |
561 | Trail.Lifetime = 0.1 | |
562 | Trail.Transparency = NumberSequence.new(0.8, 1) | |
563 | Trail.Enabled = false | |
564 | ||
565 | Weapon.Parent = Character | |
566 | ||
567 | Humanoid.Died:connect(function() | |
568 | ATTACK = true | |
569 | end) | |
570 | ||
571 | --//=================================\\ | |
572 | --|| DAMAGING | |
573 | --\\=================================// | |
574 | ||
575 | local asd = Instance.new("ParticleEmitter") | |
576 | asd.Color = ColorSequence.new(Color3.new(0.5, 0, 0), Color3.new(.1, 0, 0)) | |
577 | asd.LightEmission = .1 | |
578 | asd.Size = NumberSequence.new(0.2) | |
579 | asd.Texture = "http://www.roblox.com/asset/?ID=291880914" | |
580 | aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 5)}) | |
581 | bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)}) | |
582 | asd.Transparency = bbb | |
583 | asd.Size = aaa | |
584 | asd.ZOffset = .9 | |
585 | asd.Acceleration = Vector3.new(0, -5, 0) | |
586 | asd.LockedToPart = false | |
587 | asd.EmissionDirection = "Back" | |
588 | asd.Lifetime = NumberRange.new(1, 2) | |
589 | asd.Rotation = NumberRange.new(-100, 100) | |
590 | asd.RotSpeed = NumberRange.new(-100, 100) | |
591 | asd.Speed = NumberRange.new(2) | |
592 | asd.Enabled = false | |
593 | asd.VelocitySpread = 10000 | |
594 | ||
595 | function getbloody(victim,amount) | |
596 | local prtcl = asd:Clone() | |
597 | prtcl.Parent = victim | |
598 | prtcl:Emit(amount) | |
599 | end | |
600 | ||
601 | local TORSOVELOCITY = 0 | |
602 | ||
603 | function Ragdoll(Character2,CharTorso) | |
604 | local svch = Character2 | |
605 | local hum = Character2:findFirstChild("Humanoid") | |
606 | local q = Character2:GetChildren() | |
607 | local CLONE = IT("Model",Effects) | |
608 | local DummyHead = nil | |
609 | for i = 1,#q do | |
610 | if q[i].ClassName ~= "Humanoid" and q[i].ClassName ~= "LocalScript" and q[i].ClassName ~= "Script" and q[i].ClassName ~= "Accessory" and q[i].ClassName ~= "Hat" and q[i].ClassName ~= "Gear" then | |
611 | q[i].Parent = CLONE | |
612 | if q[i].Name == "Head" then | |
613 | DummyHead = CLONE.Head:Clone() | |
614 | q[i]:ClearAllChildren() | |
615 | q[i].Transparency = 1 | |
616 | end | |
617 | else | |
618 | if q[i].ClassName ~= "Humanoid" then | |
619 | q[i]:remove() | |
620 | end | |
621 | end | |
622 | end | |
623 | local chrclone = CLONE | |
624 | ||
625 | for _, c in pairs(Character2:GetChildren()) do | |
626 | if c.ClassName == "Accessory" then | |
627 | c:remove() | |
628 | end | |
629 | end | |
630 | ||
631 | local ch = chrclone:GetChildren() | |
632 | local i | |
633 | for i = 1,#ch do | |
634 | if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" or ch[i].ClassName == "Script" then | |
635 | ch[i]:remove() | |
636 | end | |
637 | end | |
638 | local function Scan(ch) | |
639 | local e | |
640 | for e = 1,#ch do | |
641 | Scan(ch[e]:GetChildren()) | |
642 | if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then | |
643 | ch[e]:remove() | |
644 | end | |
645 | end | |
646 | end | |
647 | Scan(chrclone:GetChildren()) | |
648 | ||
649 | local ch = Character2:GetChildren() | |
650 | local i | |
651 | for i = 1,#ch do | |
652 | if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then | |
653 | ch[i]:remove() | |
654 | end | |
655 | end | |
656 | ||
657 | local ch = Character2:GetChildren() | |
658 | local i | |
659 | for i = 1,#ch do | |
660 | if ch[i].ClassName == "Part" or ch[i].ClassName == "Hat" or ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then | |
661 | ch[i]:remove() | |
662 | end | |
663 | end | |
664 | Character2 = chrclone | |
665 | local Torso2 = Character2.Torso | |
666 | local movevector = Vector3.new() | |
667 | ||
668 | if Torso2 then | |
669 | movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector | |
670 | local Head = Character2:FindFirstChild("Head") | |
671 | if Head then | |
672 | local Neck = Instance.new("Weld") | |
673 | Neck.Name = "Neck" | |
674 | Neck.Part0 = Torso2 | |
675 | Neck.Part1 = Head | |
676 | Neck.C0 = CFrame.new(0, 1.5, 0) | |
677 | Neck.C1 = CFrame.new() | |
678 | Neck.Parent = Torso2 | |
679 | Head:ClearAllChildren() | |
680 | Head.Transparency = 1 | |
681 | ||
682 | end | |
683 | local Limb = Character2:FindFirstChild("Right Arm") | |
684 | if Limb then | |
685 | ||
686 | Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0) | |
687 | local Joint = Instance.new("Glue") | |
688 | Joint.Name = "RightShoulder" | |
689 | Joint.Part0 = Torso2 | |
690 | Joint.Part1 = Limb | |
691 | Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
692 | Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
693 | Joint.Parent = Torso2 | |
694 | ||
695 | local B = Instance.new("Part") | |
696 | B.TopSurface = 0 | |
697 | B.BottomSurface = 0 | |
698 | B.formFactor = "Symmetric" | |
699 | B.Size = Vector3.new(1, 1, 1) | |
700 | B.Transparency = 1 | |
701 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
702 | B.Parent = Character2 | |
703 | local W = Instance.new("Weld") | |
704 | W.Part0 = Limb | |
705 | W.Part1 = B | |
706 | W.C0 = CFrame.new(0, -0.5, 0) | |
707 | W.Parent = Limb | |
708 | ||
709 | end | |
710 | local Limb = Character2:FindFirstChild("Left Arm") | |
711 | if Limb then | |
712 | ||
713 | Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0) | |
714 | local Joint = Instance.new("Glue") | |
715 | Joint.Name = "LeftShoulder" | |
716 | Joint.Part0 = Torso2 | |
717 | Joint.Part1 = Limb | |
718 | Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
719 | Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
720 | Joint.Parent = Torso2 | |
721 | ||
722 | local B = Instance.new("Part") | |
723 | B.TopSurface = 0 | |
724 | B.BottomSurface = 0 | |
725 | B.formFactor = "Symmetric" | |
726 | B.Size = Vector3.new(1, 1, 1) | |
727 | B.Transparency = 1 | |
728 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
729 | B.Parent = Character2 | |
730 | local W = Instance.new("Weld") | |
731 | W.Part0 = Limb | |
732 | W.Part1 = B | |
733 | W.C0 = CFrame.new(0, -0.5, 0) | |
734 | W.Parent = Limb | |
735 | ||
736 | end | |
737 | local Limb = Character2:FindFirstChild("Right Leg") | |
738 | if Limb then | |
739 | ||
740 | Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0) | |
741 | local Joint = Instance.new("Glue") | |
742 | Joint.Name = "RightHip" | |
743 | Joint.Part0 = Torso2 | |
744 | Joint.Part1 = Limb | |
745 | Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
746 | Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
747 | Joint.Parent = Torso2 | |
748 | ||
749 | local B = Instance.new("Part") | |
750 | B.TopSurface = 0 | |
751 | B.BottomSurface = 0 | |
752 | B.formFactor = "Symmetric" | |
753 | B.Size = Vector3.new(1, 1, 1) | |
754 | B.Transparency = 1 | |
755 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
756 | B.Parent = Character2 | |
757 | local W = Instance.new("Weld") | |
758 | W.Part0 = Limb | |
759 | W.Part1 = B | |
760 | W.C0 = CFrame.new(0, -0.5, 0) | |
761 | W.Parent = Limb | |
762 | ||
763 | end | |
764 | local Limb = Character2:FindFirstChild("Left Leg") | |
765 | if Limb then | |
766 | ||
767 | - | function PuddleOfBlood(Position,MaxDrop,Model,MaxSize) |
767 | + | |
768 | - | local HITFLOOR, HITPOS = Raycast(Position, (CF(Position, Position + VT(0, -1, 0))).lookVector, MaxDrop, Model) |
768 | + | |
769 | - | if HITFLOOR ~= nil then |
769 | + | |
770 | - | if HITFLOOR.Parent ~= Weapon and HITFLOOR.Parent ~= Character then |
770 | + | |
771 | - | if HITFLOOR.Name == "BloodPuddle" then |
771 | + | |
772 | - | local DIST = (Position - HITFLOOR.Position).Magnitude |
772 | + | |
773 | - | if (HITFLOOR.Size.Z <= 5 and HITFLOOR.Size.Z < MaxSize) or (HITFLOOR.Size.Z > 5 and HITFLOOR.Size.Z < MaxSize and DIST < HITFLOOR.Size.Z/3) then |
773 | + | |
774 | - | HITFLOOR.Size = HITFLOOR.Size + VT(0.1,0,0.1) |
774 | + | |
775 | ||
776 | local B = Instance.new("Part") | |
777 | - | if HITFLOOR.Anchored == true then |
777 | + | |
778 | - | local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(1,0,1)) |
778 | + | |
779 | - | BLOOD.CFrame = CF(HITPOS) |
779 | + | |
780 | - | MakeForm(BLOOD,"Cyl") |
780 | + | |
781 | - | coroutine.resume(coroutine.create(function() |
781 | + | |
782 | - | Swait(75) |
782 | + | |
783 | - | while true do |
783 | + | |
784 | - | Swait() |
784 | + | |
785 | - | BLOOD.Size = BLOOD.Size - VT(0.02,0,0.02) |
785 | + | |
786 | - | if BLOOD.Size.Z < 0.051 then |
786 | + | |
787 | - | BLOOD:remove() |
787 | + | |
788 | - | break |
788 | + | |
789 | - | end |
789 | + | |
790 | - | end |
790 | + | |
791 | - | end)) |
791 | + | |
792 | local Bar = Instance.new("Part") | |
793 | Bar.TopSurface = 0 | |
794 | Bar.BottomSurface = 0 | |
795 | Bar.formFactor = "Symmetric" | |
796 | Bar.Size = Vector3.new(1, 1, 1) | |
797 | Bar.Transparency = 1 | |
798 | - | function SprayBlood(POSITION,DIRECTION,BloodSize) |
798 | + | |
799 | - | local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(0.5,0.5,0.5),false) |
799 | + | |
800 | - | BLOOD.CFrame = CF(POSITION) |
800 | + | |
801 | - | MakeForm(BLOOD,"Ball") |
801 | + | |
802 | - | local bv = Instance.new("BodyVelocity",BLOOD) |
802 | + | |
803 | - | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) |
803 | + | |
804 | - | bv.velocity = CF(POSITION,DIRECTION+VT(MRANDOM(-3,3)/30,MRANDOM(-3,3)/30,MRANDOM(-3,3)/30)).lookVector*15 |
804 | + | |
805 | - | bv.Name = "MOVE" |
805 | + | |
806 | - | Debris:AddItem(bv,0.05) |
806 | + | |
807 | Character2.Parent = Weapon | |
808 | - | local HASTOUCHEDGROUND = false |
808 | + | |
809 | - | local HIT = BLOOD.Touched:Connect(function(hit) |
809 | + | |
810 | - | if hit.Anchored == true then |
810 | + | |
811 | - | HASTOUCHEDGROUND = true |
811 | + | |
812 | - | PuddleOfBlood(BLOOD.Position+VT(0,1,0),2,BLOOD,BloodSize) |
812 | + | |
813 | DummyHead.Name = "FakeHead" | |
814 | - | end) |
814 | + | |
815 | - | for i = 1, 50 do |
815 | + | |
816 | - | Swait() |
816 | + | |
817 | - | if HASTOUCHEDGROUND == true then |
817 | + | |
818 | - | break |
818 | + | |
819 | local BLOOD = CreatePart(3, Torso2, "Glass", 0, 0, "Maroon", "Blood", VT(0.65,0.2,0.65),false) | |
820 | - | BLOOD.Size = BLOOD.Size * 0.9 |
820 | + | |
821 | MakeForm(BLOOD,"Cyl") | |
822 | - | BLOOD:remove() |
822 | + | |
823 | Character2.Name = "Corpse" | |
824 | local hum2 = svch:findFirstChild("Humanoid") | |
825 | ||
826 | return Character2,Torso2,DummyHead | |
827 | end | |
828 | ||
829 | ||
830 | function Kill(Target) | |
831 | if Target.Parent ~= Weapon and Target:FindFirstChildOfClass("Humanoid") then | |
832 | Target:BreakJoints() | |
833 | local CFRAME = Target:FindFirstChild("Torso").CFrame or Target:FindFirstChild("UpperTorso") | |
834 | local CLONE,TORS2,DummyHead = Ragdoll(Target,Torso) | |
835 | getbloody(DummyHead,45) | |
836 | if TORS2 ~= nil then | |
837 | CreateSound("185688060", TORS2, 10, (math.random(8,12)/10)) | |
838 | CreateSound("337800380", DummyHead, 5, (math.random(8,18)/10)) | |
839 | local HUM = IT("Humanoid") | |
840 | HUM.MaxHealth = 0 | |
841 | HUM.Health = 0 | |
842 | HUM.Name = "CorpseHumanoid" | |
843 | HUM.PlatformStand = true | |
844 | HUM.Parent = CLONE | |
845 | KILLINSTINCT = KILLINSTINCT + 20 | |
846 | - | SprayBlood(DummyHead.CFrame*CF(0,-0.25,0).p,DummyHead.CFrame*CF(0,-0.7,0).p,5) |
846 | + | |
847 | - | SprayBlood(TORS2.CFrame*CF(0,TORS2.Size.Y/2,0).p,TORS2.CFrame*CF(0,TORS2.Size.Y,0).p,10) |
847 | + | |
848 | - | --PuddleOfBlood(DummyHead.CFrame*CF(0,-0.25,0).p,4,CLONE,3) |
848 | + | |
849 | - | --PuddleOfBlood(TORS2.CFrame*CF(0,TORS2.Size.Y/2,0).p,8,CLONE,6) |
849 | + | |
850 | end | |
851 | CLONE:Remove() | |
852 | end)) | |
853 | end | |
854 | end | |
855 | end | |
856 | ||
857 | --//=================================\\ | |
858 | --|| ATTACK FUNCTIONS AND STUFF | |
859 | --\\=================================// | |
860 | ||
861 | function Swing() | |
862 | ATTACK = true | |
863 | Rooted = false | |
864 | for i=0, 1, 0.1 / Animation_Speed do | |
865 | Swait() | |
866 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-25)), 0.7 / Animation_Speed) | |
867 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(25)), 0.7 / Animation_Speed) | |
868 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-5), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed) | |
869 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.5 / Animation_Speed) | |
870 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
871 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
872 | HandleWeld.C1 = Clerp(HandleWeld.C1, CF(0, -0.55, 0) * ANGLES(RAD(-125), RAD(0), RAD(180)), 0.5 / Animation_Speed) | |
873 | end | |
874 | Trail.Enabled = true | |
875 | HandlePart.CanCollide = true | |
876 | CreateSound("185687991", HandlePart, 1, (math.random(8,12)/10)) | |
877 | local HIT = HandlePart.Touched:Connect(function(hit) | |
878 | Kill(hit.Parent) | |
879 | end) | |
880 | for i=0, 0.8, 0.1 / Animation_Speed do | |
881 | Swait() | |
882 | if Speed == 25 and TORSOVELOCITY > 0.3 then | |
883 | RootPart.CFrame = RootPart.CFrame * CF(0,0,-1) | |
884 | end | |
885 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(25)), 0.7 / Animation_Speed) | |
886 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(-25)), 0.7 / Animation_Speed) | |
887 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.5, -0.7) * ANGLES(RAD(15), RAD(0), RAD(90)) * ANGLES(RAD(140), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed) | |
888 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.5 / Animation_Speed) | |
889 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
890 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
891 | HandleWeld.C1 = Clerp(HandleWeld.C1, CF(0, -0.55, 0) * ANGLES(RAD(25), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed) | |
892 | end | |
893 | Trail.Enabled = false | |
894 | HandlePart.CanCollide = false | |
895 | HIT:disconnect() | |
896 | ATTACK = false | |
897 | Rooted = false | |
898 | end | |
899 | ||
900 | function Laugh() | |
901 | ATTACK = true | |
902 | Rooted = true | |
903 | CreateSound("2494559635", Torso, 6, 1) | |
904 | for i=0, 3.5, 0.1 / Animation_Speed do | |
905 | Swait() | |
906 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.35 * COS(SINE / 2)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
907 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(-35 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
908 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.45 - 0.35 * COS(SINE / 2), 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
909 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
910 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.35 * COS(SINE / 2), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
911 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.35 * COS(SINE / 2), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
912 | HandleWeld.C1 = Clerp(HandleWeld.C1, CF(0, -0.55, 0) * ANGLES(RAD(-125), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
913 | end | |
914 | ATTACK = false | |
915 | Rooted = false | |
916 | end | |
917 | ||
918 | --//=================================\\ | |
919 | --|| ASSIGN THINGS TO KEYS | |
920 | --\\=================================// | |
921 | ||
922 | function MouseDown(Mouse) | |
923 | if ATTACK == false then | |
924 | Swing() | |
925 | end | |
926 | end | |
927 | ||
928 | function MouseUp(Mouse) | |
929 | HOLD = false | |
930 | end | |
931 | ||
932 | function KeyDown(Key) | |
933 | KEYHOLD = true | |
934 | - | if Key == "b" and ATTACK == false then |
934 | + | |
935 | Laugh() | |
936 | - | Speed = 25 |
936 | + | |
937 | - | elseif Speed == 25 then |
937 | + | |
938 | - | Speed = 10 |
938 | + | |
939 | sick.Pitch = 1 | |
940 | sick.Volume = 1 | |
941 | sick:Play() | |
942 | if Speed == 10 then | |
943 | Speed = 20 | |
944 | end | |
945 | end | |
946 | end | |
947 | ||
948 | function KeyUp(Key) | |
949 | KEYHOLD = false | |
950 | end | |
951 | ||
952 | Mouse.Button1Down:connect(function(NEWKEY) | |
953 | MouseDown(NEWKEY) | |
954 | end) | |
955 | Mouse.Button1Up:connect(function(NEWKEY) | |
956 | MouseUp(NEWKEY) | |
957 | end) | |
958 | Mouse.KeyDown:connect(function(NEWKEY) | |
959 | KeyDown(NEWKEY) | |
960 | end) | |
961 | Mouse.KeyUp:connect(function(NEWKEY) | |
962 | KeyUp(NEWKEY) | |
963 | end) | |
964 | ||
965 | --//=================================\\ | |
966 | --\\=================================// | |
967 | ||
968 | ||
969 | function unanchor() | |
970 | if UNANCHOR == true then | |
971 | g = Character:GetChildren() | |
972 | for i = 1, #g do | |
973 | if g[i].ClassName == "Part" then | |
974 | g[i].Anchored = false | |
975 | end | |
976 | end | |
977 | end | |
978 | end | |
979 | ||
980 | ||
981 | --//=================================\\ | |
982 | --|| WRAP THE WHOLE SCRIPT UP | |
983 | --\\=================================// | |
984 | ||
985 | Humanoid.Changed:connect(function(Jump) | |
986 | if Jump == "Jump" and (Disable_Jump == true) then | |
987 | Humanoid.Jump = false | |
988 | end | |
989 | end) | |
990 | ||
991 | Speed = 10 | |
992 | ||
993 | local naeeym2 = Instance.new("BillboardGui",Character) | |
994 | naeeym2.AlwaysOnTop = true | |
995 | naeeym2.Size = UDim2.new(5,35,2,35) | |
996 | naeeym2.StudsOffset = Vector3.new(0,1,0) | |
997 | naeeym2.Adornee = Character.Head | |
998 | naeeym2.Name = "Name" | |
999 | naeeym2.PlayerToHideFrom = Player | |
1000 | local tecks2 = Instance.new("TextLabel",naeeym2) | |
1001 | tecks2.BackgroundTransparency = 1 | |
1002 | tecks2.TextScaled = true | |
1003 | tecks2.BorderSizePixel = 0 | |
1004 | tecks2.Text = "PSYCHO" | |
1005 | tecks2.Font = "Antique" | |
1006 | tecks2.TextSize = 30 | |
1007 | tecks2.TextStrokeTransparency = 0 | |
1008 | tecks2.TextColor3 = Color3.new(0.8,0,0) | |
1009 | tecks2.TextStrokeColor3 = Color3.new(0.8,0,0) | |
1010 | tecks2.Size = UDim2.new(1,0,0.5,0) | |
1011 | tecks2.Parent = naeeym2 | |
1012 | ||
1013 | while true do | |
1014 | ANIMATE.Parent = nil | |
1015 | local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION) | |
1016 | IDLEANIMATION:Play() | |
1017 | SINE = SINE + CHANGE | |
1018 | TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
1019 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
1020 | local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position) | |
1021 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character) | |
1022 | local WALKSPEEDVALUE = 8 / (Humanoid.WalkSpeed / 8) | |
1023 | if ANIM == "Walk" and TORSOVELOCITY > 1 then | |
1024 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 * (Humanoid.WalkSpeed / 8) / Animation_Speed) | |
1025 | Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)), 0.2 * (Humanoid.WalkSpeed / 8) / Animation_Speed) | |
1026 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 8) / Animation_Speed) | |
1027 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 8) / Animation_Speed) | |
1028 | elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then | |
1029 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1030 | Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1031 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1032 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1033 | end | |
1034 | if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then | |
1035 | ANIM = "Jump" | |
1036 | if ATTACK == false then | |
1037 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1038 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 * Player_Size, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1039 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1040 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1041 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1042 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
1043 | HandleWeld.C1 = Clerp(HandleWeld.C1, CF(0, -0.55, 0) * ANGLES(RAD(-165), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1044 | end | |
1045 | elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then | |
1046 | ANIM = "Fall" | |
1047 | if ATTACK == false then | |
1048 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1049 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1050 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1051 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1052 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
1053 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
1054 | HandleWeld.C1 = Clerp(HandleWeld.C1, CF(0, -0.55, 0) * ANGLES(RAD(-85), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1055 | end | |
1056 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
1057 | ANIM = "Idle" | |
1058 | if ATTACK == false then | |
1059 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1060 | if VALUE1 == false then | |
1061 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1062 | end | |
1063 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.45 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1064 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1065 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1066 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1067 | HandleWeld.C1 = Clerp(HandleWeld.C1, CF(0, -0.55, 0) * ANGLES(RAD(-125), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1068 | if VALUE1 == false and MRANDOM(1,200) == 1 then | |
1069 | coroutine.resume(coroutine.create(function() | |
1070 | VALUE1 = true | |
1071 | for i = 1, 25 do | |
1072 | Swait() | |
1073 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(-5), RAD((15+MRANDOM(-15,15)/15)), RAD(0)), 3 / Animation_Speed) | |
1074 | end | |
1075 | VALUE1 = false | |
1076 | end)) | |
1077 | end | |
1078 | end | |
1079 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
1080 | ANIM = "Walk" | |
1081 | WALK = WALK + 1 / Animation_Speed | |
1082 | if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 8 / Player_Size)) then | |
1083 | WALK = 0 | |
1084 | if WALKINGANIM == true then | |
1085 | WALKINGANIM = false | |
1086 | elseif WALKINGANIM == false then | |
1087 | WALKINGANIM = true | |
1088 | end | |
1089 | end | |
1090 | --RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 8) / Animation_Speed) | |
1091 | --LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 8) / Animation_Speed) | |
1092 | if ATTACK == false then | |
1093 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1 * COS(SINE / (WALKSPEEDVALUE/2))) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1094 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 8 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(25), RAD(0)), 0.15 / Animation_Speed) | |
1095 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.35 - 0.15 * COS(SINE / (WALKSPEEDVALUE / 2)), 0) * ANGLES(RAD(-20), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1096 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed) | |
1097 | RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, -0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed) | |
1098 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed) | |
1099 | HandleWeld.C1 = Clerp(HandleWeld.C1, CF(0, -0.75 + 0.3 * COS(SINE / (WALKSPEEDVALUE/2)), 0) * ANGLES(RAD(-145), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1100 | end | |
1101 | end | |
1102 | unanchor() | |
1103 | Humanoid.MaxHealth = "inf" | |
1104 | Humanoid.Health = "inf" | |
1105 | if Rooted == false then | |
1106 | Disable_Jump = false | |
1107 | Humanoid.WalkSpeed = Speed | |
1108 | elseif Rooted == true then | |
1109 | Disable_Jump = true | |
1110 | Humanoid.WalkSpeed = 0 | |
1111 | end | |
1112 | - | PuddleOfBlood(HandlePart.CFrame*CF(0,1,0).p,3,HandlePart,2) |
1112 | + | |
1113 | KILLINSTINCT = KILLINSTINCT - 0.1 | |
1114 | end | |
1115 | if Head:FindFirstChild("face") then | |
1116 | end | |
1117 | Trail.Color = ColorSequence.new(C3(1,1-KILLINSTINCT/70,1-KILLINSTINCT/70)) | |
1118 | local MATHS = {"0","1"} | |
1119 | Humanoid.Name = MATHS[MRANDOM(1,#MATHS)].."P"..MATHS[MRANDOM(1,#MATHS)].."S"..MATHS[MRANDOM(1,#MATHS)].."Y"..MATHS[MRANDOM(1,#MATHS)].."C"..MATHS[MRANDOM(1,#MATHS)].."H"..MATHS[MRANDOM(1,#MATHS)].."O"..MATHS[MRANDOM(1,#MATHS)] | |
1120 | Humanoid.PlatformStand = false | |
1121 | script.Name = Humanoid.Name | |
1122 | if math.random(1,70-Speed) == 1 then | |
1123 | tecks2.Text = "FAILURE" | |
1124 | elseif math.random(1,70-Speed) == 2 then | |
1125 | tecks2.Text = "Die!" | |
1126 | elseif math.random(1,70-Speed) == 3 then | |
1127 | tecks2.Text = "WORTHLESS" | |
1128 | else | |
1129 | if KILLINSTINCT > 0 then | |
1130 | if KILLINSTINCT < 100 then | |
1131 | if MRANDOM(1,math.ceil(100-KILLINSTINCT)) == 1 then | |
1132 | tecks2.Text = "HA AH AHA HA HA HA HA" | |
1133 | else | |
1134 | tecks2.Text = "My revenge won't be stopped." | |
1135 | end | |
1136 | elseif KILLINSTINCT >= 100 then | |
1137 | if MRANDOM(1,5) == 1 then | |
1138 | tecks2.Text = "The Sparta was waiting for this fight" | |
1139 | end | |
1140 | else | |
1141 | tecks2.Text = "Burn in hell!" | |
1142 | end | |
1143 | else | |
1144 | tecks2.Text = "My revenge is not done yet" | |
1145 | end | |
1146 | end | |
1147 | DECAL.Transparency = 1-(KILLINSTINCT/25) | |
1148 | Swait() | |
1149 | if Head:FindFirstChildOfClass("Sound") then | |
1150 | Head:FindFirstChildOfClass("Sound"):remove() | |
1151 | end | |
1152 | if KILLINSTINCT > 100 then | |
1153 | KILLINSTINCT = 100 | |
1154 | end | |
1155 | sick.Parent = Character | |
1156 | script.Parent = PlayerGui | |
1157 | end | |
1158 | ||
1159 | --//=================================\\ | |
1160 | --\\=================================// | |
1161 | ||
1162 | ||
1163 | ||
1164 | ||
1165 | ||
1166 | --//====================================================\\-- | |
1167 | --|| END OF SCRIPT | |
1168 | --\\====================================================//-- |