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 | --[[Psychov3 A remake/script By makhail07 | |
84 | ||
85 | ||
86 | No this is not a fucking edit just becuase the walks look the same. | |
87 | Now please go be a skid somewhere else. | |
88 | ||
89 | Description:A murderer? | |
90 | ||
91 | ]]-- | |
92 | ||
93 | local IDs = {340106355,927529620,876981900} | |
94 | ||
95 | function swait(num) | |
96 | if num==0 or num==nil then | |
97 | game:service'RunService'.Stepped:wait(0) | |
98 | else | |
99 | for i=0,num do | |
100 | game:service'RunService'.Stepped:wait(0) | |
101 | end | |
102 | end | |
103 | end | |
104 | function thread(f) | |
105 | coroutine.resume(coroutine.create(f)) | |
106 | end | |
107 | function clerp(a, b, t) | |
108 | local qa = { | |
109 | QuaternionFromCFrame(a) | |
110 | } | |
111 | local qb = { | |
112 | QuaternionFromCFrame(b) | |
113 | } | |
114 | local ax, ay, az = a.x, a.y, a.z | |
115 | local bx, by, bz = b.x, b.y, b.z | |
116 | local _t = 1 - t | |
117 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
118 | end | |
119 | function QuaternionFromCFrame(cf) | |
120 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
121 | local trace = m00 + m11 + m22 | |
122 | if trace > 0 then | |
123 | local s = math.sqrt(1 + trace) | |
124 | local recip = 0.5 / s | |
125 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
126 | else | |
127 | local i = 0 | |
128 | if m00 < m11 then | |
129 | i = 1 | |
130 | end | |
131 | if m22 > (i == 0 and m00 or m11) then | |
132 | i = 2 | |
133 | end | |
134 | if i == 0 then | |
135 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
136 | local recip = 0.5 / s | |
137 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
138 | elseif i == 1 then | |
139 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
140 | local recip = 0.5 / s | |
141 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
142 | elseif i == 2 then | |
143 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
144 | local recip = 0.5 / s | |
145 | return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
146 | end | |
147 | end | |
148 | end | |
149 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
150 | local xs, ys, zs = x + x, y + y, z + z | |
151 | local wx, wy, wz = w * xs, w * ys, w * zs | |
152 | local xx = x * xs | |
153 | local xy = x * ys | |
154 | local xz = x * zs | |
155 | local yy = y * ys | |
156 | local yz = y * zs | |
157 | local zz = z * zs | |
158 | 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)) | |
159 | end | |
160 | function QuaternionSlerp(a, b, t) | |
161 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
162 | local startInterp, finishInterp | |
163 | if cosTheta >= 1.0E-4 then | |
164 | if 1 - cosTheta > 1.0E-4 then | |
165 | local theta = math.acos(cosTheta) | |
166 | local invSinTheta = 1 / math.sin(theta) | |
167 | startInterp = math.sin((1 - t) * theta) * invSinTheta | |
168 | finishInterp = math.sin(t * theta) * invSinTheta | |
169 | else | |
170 | startInterp = 1 - t | |
171 | finishInterp = t | |
172 | end | |
173 | elseif 1 + cosTheta > 1.0E-4 then | |
174 | local theta = math.acos(-cosTheta) | |
175 | local invSinTheta = 1 / math.sin(theta) | |
176 | startInterp = math.sin((t - 1) * theta) * invSinTheta | |
177 | finishInterp = math.sin(t * theta) * invSinTheta | |
178 | else | |
179 | startInterp = t - 1 | |
180 | finishInterp = t | |
181 | end | |
182 | 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 | |
183 | end | |
184 | function rayCast(Position, Direction, Range, Ignore) | |
185 | return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore) | |
186 | end | |
187 | --Wait what okay | |
188 | wait() | |
189 | local plr = owner | |
190 | local char = plr.Character | |
191 | local hum = char.Humanoid | |
192 | local ra = char["Right Arm"] | |
193 | local la= char["Left Arm"] | |
194 | local rl= char["Right Leg"] | |
195 | local ll = char["Left Leg"] | |
196 | local hed = char.Head | |
197 | local root = char.HumanoidRootPart | |
198 | local rootj = root.RootJoint | |
199 | local tors = char.Torso | |
200 | local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
201 | local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0) | |
202 | local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0) | |
203 | local maincolor = BrickColor.new("Magenta") | |
204 | cf = CFrame.new | |
205 | angles = CFrame.Angles | |
206 | attack = false | |
207 | euler=CFrame.fromEulerAnglesXYZ | |
208 | equipped = false | |
209 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
210 | RSH, LSH = nil, nil | |
211 | RW = Instance.new("Weld") | |
212 | LW = Instance.new("Weld") | |
213 | RH = tors["Right Hip"] | |
214 | LH = tors["Left Hip"] | |
215 | RSH = tors["Right Shoulder"] | |
216 | LSH = tors["Left Shoulder"] | |
217 | RSH.Parent = nil | |
218 | LSH.Parent = nil | |
219 | RW.Name = "RW" | |
220 | RW.Part0 = tors | |
221 | RW.C0 = CFrame.new(1.5, 0.5, 0) | |
222 | RW.C1 = CFrame.new(0, 0.5, 0) | |
223 | RW.Part1 = ra | |
224 | RW.Parent = tors | |
225 | LW.Name = "LW" | |
226 | LW.Part0 = tors | |
227 | LW.C0 = CFrame.new(-1.5, 0.5, 0) | |
228 | LW.C1 = CFrame.new(0, 0.5, 0) | |
229 | LW.Part1 = la | |
230 | LW.Parent = tors | |
231 | print('User is '..plr.Name) | |
232 | Effects = {} | |
233 | ||
234 | ArtificialHB = Instance.new("BindableEvent", script) | |
235 | ArtificialHB.Name = "Heartbeat" | |
236 | ||
237 | script:WaitForChild("Heartbeat") | |
238 | ||
239 | frame = 1 / 60 | |
240 | tf = 0 | |
241 | allowframeloss = false | |
242 | tossremainder = false | |
243 | lastframe = tick() | |
244 | script.Heartbeat:Fire() | |
245 | ||
246 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
247 | tf = tf + s | |
248 | if tf >= frame then | |
249 | if allowframeloss then | |
250 | script.Heartbeat:Fire() | |
251 | lastframe = tick() | |
252 | else | |
253 | for i = 1, math.floor(tf / frame) do | |
254 | script.Heartbeat:Fire() | |
255 | end | |
256 | lastframe = tick() | |
257 | end | |
258 | if tossremainder then | |
259 | tf = 0 | |
260 | else | |
261 | tf = tf - frame * math.floor(tf / frame) | |
262 | end | |
263 | end | |
264 | end) | |
265 | local RbxUtility = LoadLibrary("RbxUtility") | |
266 | local Create = RbxUtility.Create | |
267 | ||
268 | ||
269 | CFuncs = { | |
270 | Part = { | |
271 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
272 | local Part = Create("Part")({ | |
273 | Parent = Parent, | |
274 | Reflectance = Reflectance, | |
275 | Transparency = Transparency, | |
276 | CanCollide = false, | |
277 | Locked = true, | |
278 | BrickColor = BrickColor.new(tostring(BColor)), | |
279 | Name = Name, | |
280 | Size = Size, | |
281 | Material = Material | |
282 | }) | |
283 | RemoveOutlines(Part) | |
284 | return Part | |
285 | end | |
286 | }, | |
287 | Mesh = { | |
288 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
289 | local Msh = Create(Mesh)({ | |
290 | Parent = Part, | |
291 | Offset = OffSet, | |
292 | Scale = Scale | |
293 | }) | |
294 | if Mesh == "SpecialMesh" then | |
295 | Msh.MeshType = MeshType | |
296 | Msh.MeshId = MeshId | |
297 | end | |
298 | return Msh | |
299 | end | |
300 | }, | |
301 | Mesh = { | |
302 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
303 | local Msh = Create(Mesh)({ | |
304 | Parent = Part, | |
305 | Offset = OffSet, | |
306 | Scale = Scale | |
307 | }) | |
308 | if Mesh == "SpecialMesh" then | |
309 | Msh.MeshType = MeshType | |
310 | Msh.MeshId = MeshId | |
311 | end | |
312 | return Msh | |
313 | end | |
314 | }, | |
315 | Weld = { | |
316 | Create = function(Parent, Part0, Part1, C0, C1) | |
317 | local Weld = Create("Weld")({ | |
318 | Parent = Parent, | |
319 | Part0 = Part0, | |
320 | Part1 = Part1, | |
321 | C0 = C0, | |
322 | C1 = C1 | |
323 | }) | |
324 | return Weld | |
325 | end | |
326 | }, | |
327 | Sound = { | |
328 | Create = function(id, par, vol, pit) | |
329 | coroutine.resume(coroutine.create(function() | |
330 | local S = Create("Sound")({ | |
331 | Volume = vol, | |
332 | Pitch = pit or 1, | |
333 | SoundId = id, | |
334 | Parent = par or workspace | |
335 | }) | |
336 | wait() | |
337 | S:play() | |
338 | game:GetService("Debris"):AddItem(S, 6) | |
339 | end)) | |
340 | end | |
341 | }, | |
342 | ParticleEmitter = { | |
343 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
344 | local fp = Create("ParticleEmitter")({ | |
345 | Parent = Parent, | |
346 | Color = ColorSequence.new(Color1, Color2), | |
347 | LightEmission = LightEmission, | |
348 | Size = Size, | |
349 | Texture = Texture, | |
350 | Transparency = Transparency, | |
351 | ZOffset = ZOffset, | |
352 | Acceleration = Accel, | |
353 | Drag = Drag, | |
354 | LockedToPart = LockedToPart, | |
355 | VelocityInheritance = VelocityInheritance, | |
356 | EmissionDirection = EmissionDirection, | |
357 | Enabled = Enabled, | |
358 | Lifetime = LifeTime, | |
359 | Rate = Rate, | |
360 | Rotation = Rotation, | |
361 | RotSpeed = RotSpeed, | |
362 | Speed = Speed, | |
363 | VelocitySpread = VelocitySpread | |
364 | }) | |
365 | return fp | |
366 | end | |
367 | } | |
368 | } | |
369 | function RemoveOutlines(part) | |
370 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
371 | end | |
372 | function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
373 | local Part = Create("Part")({ | |
374 | formFactor = FormFactor, | |
375 | Parent = Parent, | |
376 | Reflectance = Reflectance, | |
377 | Transparency = Transparency, | |
378 | CanCollide = false, | |
379 | Locked = true, | |
380 | BrickColor = BrickColor.new(tostring(BColor)), | |
381 | Name = Name, | |
382 | Size = Size, | |
383 | Material = Material | |
384 | }) | |
385 | RemoveOutlines(Part) | |
386 | return Part | |
387 | end | |
388 | function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
389 | local Msh = Create(Mesh)({ | |
390 | Parent = Part, | |
391 | Offset = OffSet, | |
392 | Scale = Scale | |
393 | }) | |
394 | if Mesh == "SpecialMesh" then | |
395 | Msh.MeshType = MeshType | |
396 | Msh.MeshId = MeshId | |
397 | end | |
398 | return Msh | |
399 | end | |
400 | function CreateWeld(Parent, Part0, Part1, C0, C1) | |
401 | local Weld = Create("Weld")({ | |
402 | Parent = Parent, | |
403 | Part0 = Part0, | |
404 | Part1 = Part1, | |
405 | C0 = C0, | |
406 | C1 = C1 | |
407 | }) | |
408 | return Weld | |
409 | end | |
410 | EffectModel = Instance.new("Model", char) | |
411 | Effects = { | |
412 | Block = { | |
413 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
414 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
415 | prt.Anchored = true | |
416 | prt.CFrame = cframe | |
417 | local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
418 | game:GetService("Debris"):AddItem(prt, 10) | |
419 | if Type == 1 or Type == nil then | |
420 | table.insert(Effects, { | |
421 | prt, | |
422 | "Block1", | |
423 | delay, | |
424 | x3, | |
425 | y3, | |
426 | z3, | |
427 | msh | |
428 | }) | |
429 | elseif Type == 2 then | |
430 | table.insert(Effects, { | |
431 | prt, | |
432 | "Block2", | |
433 | delay, | |
434 | x3, | |
435 | y3, | |
436 | z3, | |
437 | msh | |
438 | }) | |
439 | else | |
440 | table.insert(Effects, { | |
441 | prt, | |
442 | "Block3", | |
443 | delay, | |
444 | x3, | |
445 | y3, | |
446 | z3, | |
447 | msh | |
448 | }) | |
449 | end | |
450 | end | |
451 | }, | |
452 | Sphere = { | |
453 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
454 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
455 | prt.Anchored = true | |
456 | prt.CFrame = cframe | |
457 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
458 | game:GetService("Debris"):AddItem(prt, 10) | |
459 | table.insert(Effects, { | |
460 | prt, | |
461 | "Cylinder", | |
462 | delay, | |
463 | x3, | |
464 | y3, | |
465 | z3, | |
466 | msh | |
467 | }) | |
468 | end | |
469 | }, | |
470 | Cylinder = { | |
471 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
472 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
473 | prt.Anchored = true | |
474 | prt.CFrame = cframe | |
475 | local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
476 | game:GetService("Debris"):AddItem(prt, 10) | |
477 | table.insert(Effects, { | |
478 | prt, | |
479 | "Cylinder", | |
480 | delay, | |
481 | x3, | |
482 | y3, | |
483 | z3, | |
484 | msh | |
485 | }) | |
486 | end | |
487 | }, | |
488 | Wave = { | |
489 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
490 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
491 | prt.Anchored = true | |
492 | prt.CFrame = cframe | |
493 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://431164262", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60)) | |
494 | game:GetService("Debris"):AddItem(prt, 10) | |
495 | table.insert(Effects, { | |
496 | prt, | |
497 | "Cylinder", | |
498 | delay, | |
499 | x3 / 60, | |
500 | y3 / 60, | |
501 | z3 / 60, | |
502 | msh | |
503 | }) | |
504 | end | |
505 | }, | |
506 | Ring = { | |
507 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
508 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
509 | prt.Anchored = true | |
510 | prt.CFrame = cframe | |
511 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
512 | game:GetService("Debris"):AddItem(prt, 10) | |
513 | table.insert(Effects, { | |
514 | prt, | |
515 | "Cylinder", | |
516 | delay, | |
517 | x3, | |
518 | y3, | |
519 | z3, | |
520 | msh | |
521 | }) | |
522 | end | |
523 | }, | |
524 | Break = { | |
525 | Create = function(brickcolor, cframe, x1, y1, z1) | |
526 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
527 | prt.Anchored = true | |
528 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
529 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
530 | local num = math.random(10, 50) / 1000 | |
531 | game:GetService("Debris"):AddItem(prt, 10) | |
532 | table.insert(Effects, { | |
533 | prt, | |
534 | "Shatter", | |
535 | num, | |
536 | prt.CFrame, | |
537 | math.random() - math.random(), | |
538 | 0, | |
539 | math.random(50, 100) / 100 | |
540 | }) | |
541 | end | |
542 | } | |
543 | } | |
544 | function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
545 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
546 | prt.Anchored = true | |
547 | prt.CFrame = cframe | |
548 | local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
549 | game:GetService("Debris"):AddItem(prt, 10) | |
550 | if Type == 1 or Type == nil then | |
551 | table.insert(Effects, { | |
552 | prt, | |
553 | "Block1", | |
554 | delay, | |
555 | x3, | |
556 | y3, | |
557 | z3, | |
558 | msh | |
559 | }) | |
560 | elseif Type == 2 then | |
561 | table.insert(Effects, { | |
562 | prt, | |
563 | "Block2", | |
564 | delay, | |
565 | x3, | |
566 | y3, | |
567 | z3, | |
568 | msh | |
569 | }) | |
570 | elseif Type == 3 then | |
571 | table.insert(Effects, { | |
572 | prt, | |
573 | "Block3", | |
574 | delay, | |
575 | x3, | |
576 | y3, | |
577 | z3, | |
578 | msh | |
579 | }) | |
580 | end | |
581 | end | |
582 | function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
583 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
584 | prt.Anchored = true | |
585 | prt.CFrame = cframe | |
586 | local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
587 | game:GetService("Debris"):AddItem(prt, 10) | |
588 | table.insert(Effects, { | |
589 | prt, | |
590 | "Cylinder", | |
591 | delay, | |
592 | x3, | |
593 | y3, | |
594 | z3, | |
595 | msh | |
596 | }) | |
597 | end | |
598 | function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
599 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
600 | prt.Anchored = true | |
601 | prt.CFrame = cframe * CFrame.new(x1, y1, z1) | |
602 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
603 | game:GetService("Debris"):AddItem(prt, 10) | |
604 | table.insert(Effects, { | |
605 | prt, | |
606 | "Cylinder", | |
607 | delay, | |
608 | x3, | |
609 | y3, | |
610 | z3, | |
611 | msh | |
612 | }) | |
613 | end | |
614 | function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
615 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
616 | prt.Anchored = true | |
617 | prt.CFrame = cframe | |
618 | local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
619 | game:GetService("Debris"):AddItem(prt, 10) | |
620 | table.insert(Effects, { | |
621 | prt, | |
622 | "Cylinder", | |
623 | delay, | |
624 | x3, | |
625 | y3, | |
626 | z3, | |
627 | msh | |
628 | }) | |
629 | end | |
630 | function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
631 | local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
632 | prt.Anchored = true | |
633 | prt.CFrame = cframe | |
634 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
635 | game:GetService("Debris"):AddItem(prt, 10) | |
636 | table.insert(Effects, { | |
637 | prt, | |
638 | "Cylinder", | |
639 | delay, | |
640 | x3, | |
641 | y3, | |
642 | z3, | |
643 | msh | |
644 | }) | |
645 | end | |
646 | function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
647 | local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
648 | prt.Anchored = true | |
649 | prt.CFrame = cframe | |
650 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
651 | game:GetService("Debris"):AddItem(prt, 10) | |
652 | table.insert(Effects, { | |
653 | prt, | |
654 | "Cylinder", | |
655 | delay, | |
656 | x3, | |
657 | y3, | |
658 | z3, | |
659 | msh | |
660 | }) | |
661 | end | |
662 | function BreakEffect(brickcolor, cframe, x1, y1, z1) | |
663 | local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
664 | prt.Anchored = true | |
665 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
666 | local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
667 | local num = math.random(10, 50) / 1000 | |
668 | game:GetService("Debris"):AddItem(prt, 10) | |
669 | table.insert(Effects, { | |
670 | prt, | |
671 | "Shatter", | |
672 | num, | |
673 | prt.CFrame, | |
674 | math.random() - math.random(), | |
675 | 0, | |
676 | math.random(50, 100) / 100 | |
677 | }) | |
678 | end | |
679 | function part(formfactor,parent,reflectance,transparency,brickcolor,name,size) | |
680 | local fp=Instance.new("Part") | |
681 | fp.formFactor=formfactor | |
682 | fp.Parent=parent | |
683 | fp.Reflectance=reflectance | |
684 | fp.Transparency=transparency | |
685 | fp.CanCollide=false | |
686 | fp.Locked=true | |
687 | fp.BrickColor=brickcolor | |
688 | fp.Name=name | |
689 | fp.Size=size | |
690 | fp.Position=tors.Position | |
691 | RemoveOutlines(fp) | |
692 | fp.Material="SmoothPlastic" | |
693 | fp:BreakJoints() | |
694 | return fp | |
695 | end | |
696 | ||
697 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
698 | local mesh=Instance.new(Mesh) | |
699 | mesh.Parent=part | |
700 | if Mesh=="SpecialMesh" then | |
701 | mesh.MeshType=meshtype | |
702 | if meshid~="nil" then | |
703 | mesh.MeshId="http://www.roblox.com/asset/?id="..meshid | |
704 | end | |
705 | end | |
706 | mesh.Offset=offset | |
707 | mesh.Scale=scale | |
708 | return mesh | |
709 | end | |
710 | function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
711 | local prt=part(3,char,0,0,brickcolor,"Effect",Vector3.new(0.5,0.5,0.5)) | |
712 | prt.Anchored=true | |
713 | prt.Material = "Neon" | |
714 | prt.CFrame=cframe | |
715 | prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
716 | msh=mesh("BlockMesh",prt,"","",Vector3.new(0,0,0),Vector3.new(x1,y1,z1)) | |
717 | game:GetService("Debris"):AddItem(prt,5) | |
718 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
719 | for i=0,1,delay do | |
720 | swait() | |
721 | Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
722 | Part.Transparency=i | |
723 | Mesh.Scale=Mesh.Scale+Vector3.new(x3,y3,z3) | |
724 | end | |
725 | Part.Parent=nil | |
726 | end),prt,msh) | |
727 | end | |
728 | function MagicShockTrailAlt2(origcolor2,cframe,x1,y1,z1,x3,y3,z3,delay,rottype) | |
729 | local prt=part(3,char,0,0,origcolor2,"Effect",Vector3.new(0.5,0.5,0.5)) | |
730 | prt.Anchored=true | |
731 | prt.Material = "Neon" | |
732 | prt.CFrame=cframe | |
733 | msh=mesh("BlockMesh",prt,"","",Vector3.new(0,0,0),Vector3.new(x1,y1,z1)) | |
734 | game:GetService("Debris"):AddItem(prt,5) | |
735 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
736 | local rtype = rottype | |
737 | for i=0,1,delay do | |
738 | swait() | |
739 | if rtype == 1 then | |
740 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
741 | elseif rtype == 2 then | |
742 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
743 | end | |
744 | prt.Transparency=i | |
745 | Mesh.Scale=Mesh.Scale+Vector3.new(x3,y3,z3) | |
746 | end | |
747 | Part.Parent=nil | |
748 | end),prt,msh) | |
749 | end | |
750 | Thetown = Instance.new("Sound",tors) | |
751 | Thetown.SoundId = "rbxassetid://900450645" | |
752 | Thetown.Volume = 1.5 | |
753 | Thetown.Looped = true | |
754 | Thetown:Play() | |
755 | ||
756 | ||
757 | ||
758 | ||
759 | --[[ | |
760 | Thanks for using Build-To-Lua by jarredbcv. | |
761 | ]]-- | |
762 | ||
763 | New = function(Object, Parent, Name, Data) | |
764 | local Object = Instance.new(Object) | |
765 | for Index, Value in pairs(Data or {}) do | |
766 | Object[Index] = Value | |
767 | end | |
768 | Object.Parent = Parent | |
769 | Object.Name = Name | |
770 | return Object | |
771 | end | |
772 | ||
773 | Knife = New("Model",char,"Knife",{}) | |
774 | Handle = New("Part",Knife,"Handle",{BrickColor = BrickColor.new("Bright green"),Transparency = 1,Transparency = 1,Size = Vector3.new(1.65882361, 1.99058843, 1.65882361),CFrame = CFrame.new(82.2077255, 1.57540321, 117.400002, 0, 0, -1, 1, 0, 0, 0, -1, 0),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.294118, 0.592157, 0.294118),}) | |
775 | Mesh = New("BlockMesh",Handle,"Mesh",{Scale = Vector3.new(0.600000024, 0.200000003, 1.20000005),}) | |
776 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Really red"),Reflectance = 0.40000000596046,FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(81.3119583, 1.46481109, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1, 0, 0),}) | |
777 | Mesh = New("SpecialMesh",Brick,"Mesh",{Scale = Vector3.new(0.0666666701, 0.266666681, 0.0666666701),MeshType = Enum.MeshType.Wedge,}) | |
778 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(-0.110592127, 0, 0.895767212, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
779 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Really red"),Reflectance = 0.40000000596046,FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(81.2456055, 1.685987, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1, 0, 0),}) | |
780 | Mesh = New("BlockMesh",Brick,"Mesh",{Scale = Vector3.new(0.0666666701, 0.466666669, 0.0666666701),}) | |
781 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(0.110583782, 0, 0.962120056, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
782 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Really red"),Reflectance = 0.40000000596046,FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(81.5110245, 1.57540321, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1, 0, 0),}) | |
783 | Mesh = New("BlockMesh",Brick,"Mesh",{Scale = Vector3.new(0.0666666701, 0.333333343, 0.0666666701),}) | |
784 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(0, 0, 0.69670105, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
785 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Mid gray"),Reflectance = 0.40000000596046,FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(81.9533539, 1.57540321, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.803922, 0.803922, 0.803922),}) | |
786 | Mesh = New("BlockMesh",Brick,"Mesh",{Scale = Vector3.new(0.0666666701, 0.333333343, 0.0666666701),}) | |
787 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(0, 0, 0.254371643, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
788 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Mid gray"),Reflectance = 0.40000000596046,FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 1.32705891, 1.65882361),CFrame = CFrame.new(82.1745453, 1.6859839, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.803922, 0.803922, 0.803922),}) | |
789 | Mesh = New("BlockMesh",Brick,"Mesh",{Scale = Vector3.new(0.0666666701, 1.16666663, 0.0666666701),}) | |
790 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(0.110580683, 0, 0.0331802368, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
791 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Black"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(83.9108047, 1.57541645, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
792 | Mesh = New("CylinderMesh",Brick,"Mesh",{Scale = Vector3.new(0.24000001, 0.0800000057, 0.24000001),}) | |
793 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(1.32322311e-05, 0, -1.70307922, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
794 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Really red"),Reflectance = 0.40000000596046,FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 1.32705891, 1.65882361),CFrame = CFrame.new(82.1745529, 1.46481287, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1, 0, 0),}) | |
795 | Mesh = New("BlockMesh",Brick,"Mesh",{Scale = Vector3.new(0.0666666701, 1.16666663, 0.0666666701),}) | |
796 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(-0.110590339, 0, 0.0331726074, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
797 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Mid gray"),Reflectance = 0.40000000596046,FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(82.3957291, 1.57539487, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.803922, 0.803922, 0.803922),}) | |
798 | Mesh = New("BlockMesh",Brick,"Mesh",{Scale = Vector3.new(0.0666666701, 0.333333343, 0.0666666701),}) | |
799 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(-8.34465027e-06, 0, -0.18800354, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
800 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Really red"),Reflectance = 0.40000000596046,FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(81.0465393, 1.685987, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1, 0, 0),}) | |
801 | Mesh = New("SpecialMesh",Brick,"Mesh",{Scale = Vector3.new(0.0666666701, 0.13333334, 0.0666666701),MeshType = Enum.MeshType.Wedge,}) | |
802 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(0.110583782, 0, 1.16118622, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
803 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Black"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(83.9550476, 1.57542157, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
804 | Mesh = New("CylinderMesh",Brick,"Mesh",{Scale = Vector3.new(0.220000014, 0.0733333379, 0.220000014),}) | |
805 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(1.83582306e-05, 0, -1.74732208, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
806 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Black"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(82.9707947, 1.57539833, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
807 | Mesh = New("BlockMesh",Brick,"Mesh",{Scale = Vector3.new(0.200000003, 0.0666666701, 0.333333343),}) | |
808 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(-4.88758087e-06, 0, -0.763069153, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
809 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Black"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(82.9311295, 1.94298697, 117.400002, 0.406722844, -0.913551688, -3.65672458e-05, -0.913551688, -0.406722814, 2.31264985e-05, -3.59999867e-05, 2.39999936e-05, -1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
810 | Mesh = New("BlockMesh",Brick,"Mesh",{Scale = Vector3.new(0.13333334, 0.0666666701, 0.200000003),}) | |
811 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0.406722844, -0.913551688, -3.59999867e-05, -0.913551688, -0.406722814, 2.39999936e-05, -3.65672458e-05, 2.31264985e-05, -1),C1 = CFrame.new(0.367583752, 0, -0.723403931, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
812 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Really red"),Reflectance = 0.40000000596046,FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(81.1571426, 1.57541645, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1, 0, 0),}) | |
813 | Mesh = New("SpecialMesh",Brick,"Mesh",{Scale = Vector3.new(0.0666666701, 0.200000018, 0.0666666701),MeshType = Enum.MeshType.Wedge,}) | |
814 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(1.32322311e-05, 0, 1.05058289, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
815 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Mid gray"),Reflectance = 0.40000000596046,FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(82.8380737, 1.57540321, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.803922, 0.803922, 0.803922),}) | |
816 | Mesh = New("BlockMesh",Brick,"Mesh",{Scale = Vector3.new(0.0666666701, 0.333333343, 0.0666666701),}) | |
817 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(0, 0, -0.630348206, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
818 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Really red"),Reflectance = 0.40000000596046,FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(81.3119583, 1.57540166, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1, 0, 0),}) | |
819 | Mesh = New("BlockMesh",Brick,"Mesh",{Scale = Vector3.new(0.0666666701, 0.266666681, 0.0666666701),}) | |
820 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(-1.54972076e-06, 0, 0.895767212, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
821 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Black"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(83.424202, 1.57539666, 117.400002, 4.80000017e-05, -1, -2.3040001e-09, 4.80000017e-05, 0, 1, -1, -4.80000017e-05, 4.80000017e-05),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
822 | Mesh = New("CylinderMesh",Brick,"Mesh",{Scale = Vector3.new(0.200000003, 1.4000001, 0.200000003),}) | |
823 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 4.80000017e-05, 4.80000017e-05, -1, -1, 0, -4.80000017e-05, -2.3040001e-09, 1, 4.80000017e-05),C1 = CFrame.new(-6.55651093e-06, 0, -1.21647644, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
824 | Brick = New("Part",Knife,"Brick",{BrickColor = BrickColor.new("Black"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1.65882361, 0.663529456, 1.65882361),CFrame = CFrame.new(83.0150146, 1.21046209, 117.400002, 0.406722844, -0.913551688, -3.65672458e-05, -0.913551688, -0.406722814, 2.31264985e-05, -3.59999867e-05, 2.39999936e-05, -1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.105882, 0.164706, 0.207843),}) | |
825 | Mesh = New("BlockMesh",Brick,"Mesh",{Scale = Vector3.new(0.13333334, 0.0666666701, 0.200000003),}) | |
826 | mot = New("Motor",Brick,"mot",{Part0 = Brick,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0.406722844, -0.913551688, -3.59999867e-05, -0.913551688, -0.406722814, 2.39999936e-05, -3.65672458e-05, 2.31264985e-05, -1),C1 = CFrame.new(-0.36494112, 0, -0.807289124, 0, 1, 0, 0, 0, -1, -1, 0, 0),}) | |
827 | ||
828 | ||
829 | ||
830 | for _,v in next, Knife:GetChildren() do | |
831 | if v:IsA'BasePart' then | |
832 | v.CanCollide = false | |
833 | end | |
834 | end | |
835 | local NewInstance = function(instance,parent,properties) | |
836 | local inst = Instance.new(instance,parent) | |
837 | if(properties)then | |
838 | for i,v in next, properties do | |
839 | pcall(function() inst[i] = v end) | |
840 | end | |
841 | end | |
842 | return inst; | |
843 | end | |
844 | local HW = NewInstance('Weld',char,{Part0=ra,Part1=Handle,C0 = CFrame.new(0,-1,1.3)*CFrame.Angles(math.rad(0),0,math.rad(90))}) | |
845 | local Hitbox = New("Part",Knife,"Hitbox",{Size=Vector3.new(1,1,2),CanCollide=false,Transparency=1}) | |
846 | local HitboxWeld = New("Weld",Knife,"Weldie",{Part0=Hitbox,Part1=Handle,C0=CFrame.new(0,0,0)}) | |
847 | ||
848 | --Thanks to sugarie/CK or as some call em shuggy x3 | |
849 | local p1mit = Instance.new("ParticleEmitter",Hitbox) | |
850 | p1mit.Texture = "http://www.roblox.com/asset/?id=243132757" | |
851 | p1mit.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.new(.6,0,0)),ColorSequenceKeypoint.new(1,Color3.new(.6,0,0))}) | |
852 | p1mit.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,.1),NumberSequenceKeypoint.new(1,.1)}) | |
853 | p1mit.Lifetime = NumberRange.new(1) | |
854 | p1mit.Rate = 20 | |
855 | p1mit.Acceleration = Vector3.new(0,-10,0) | |
856 | p1mit.Speed = NumberRange.new(0) | |
857 | ||
858 | ||
859 | local p2mit = Instance.new("ParticleEmitter",Hitbox) | |
860 | p2mit.Texture = "http://www.roblox.com/asset/?id=243132757" | |
861 | p2mit.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.new(.6,0,0)),ColorSequenceKeypoint.new(1,Color3.new(.6,0,0))}) | |
862 | p2mit.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,.1),NumberSequenceKeypoint.new(1,.1)}) | |
863 | p2mit.Lifetime = NumberRange.new(1) | |
864 | p2mit.Rate = 10 | |
865 | p2mit.Acceleration = Vector3.new(0,-10,0) | |
866 | p2mit.Speed = NumberRange.new(0) | |
867 | ||
868 | ||
869 | kachow=Instance.new("Sound",tors) | |
870 | kachow.Volume = 1 | |
871 | kachow.Looped = false | |
872 | kachow.Pitch = .5 | |
873 | kachow.SoundId = "rbxassetid://12222208" | |
874 | ||
875 | Stab=Instance.new("Sound",tors) | |
876 | Stab.Volume = 1 | |
877 | Stab.Looped = false | |
878 | Stab.Pitch = .5 | |
879 | Stab.SoundId = "rbxassetid://429400881" | |
880 | ||
881 | WashDING=Instance.new("Sound",tors) | |
882 | WashDING.Volume = 1 | |
883 | WashDING.Looped = false | |
884 | WashDING.Pitch = .5 | |
885 | WashDING.SoundId = "rbxassetid://62339698" | |
886 | ||
887 | local crosshair = Instance.new("BillboardGui",char) | |
888 | crosshair.Size = UDim2.new(10,0,10,0) | |
889 | crosshair.Enabled = false | |
890 | ||
891 | local imgl = Instance.new("ImageLabel",crosshair) | |
892 | imgl.Position = UDim2.new(0,0,0,0) | |
893 | imgl.Size = UDim2.new(1,0,1,0) | |
894 | imgl.Image = "rbxassetid://233522684" | |
895 | imgl.BackgroundTransparency = 1 | |
896 | imgl.ImageColor3 = Color3.new(.6,0,0) | |
897 | local img2 = Instance.new("ImageLabel",crosshair) | |
898 | img2.Position = UDim2.new(0,0,0,0) | |
899 | img2.Size = UDim2.new(1,0,1,0) | |
900 | img2.Image = "rbxassetid://233522684" | |
901 | img2.BackgroundTransparency = 1 | |
902 | img2.ImageColor3 = Color3.new(.6,0,0) | |
903 | ||
904 | -- Explosive Hitbox | |
905 | function ExHitbox(rad,pos,damage,env,toim) | |
906 | local E = Instance.new("Explosion") | |
907 | E.Position = pos | |
908 | E.Parent = workspace | |
909 | E.BlastRadius = rad | |
910 | E.BlastPressure = 0 | |
911 | E.Visible = false | |
912 | E.Hit:connect(function(hit) | |
913 | if hit and hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid") and notWhitelisted(hit.Parent) and hit.Parent:FindFirstChildOfClass("Humanoid").Health > 0 and hit.Parent ~= char and not hit.Parent:FindFirstChild("HitPsy3") then | |
914 | for _,ch in next, hit.Parent:children() do | |
915 | if ch:IsA'BasePart' then | |
916 | local efff = p1mit:Clone() | |
917 | efff.Enabled = true | |
918 | efff.Parent = ch | |
919 | delay(1,function() | |
920 | efff.Enabled = false | |
921 | end) | |
922 | end | |
923 | end | |
924 | hit.Parent:BreakJoints() | |
925 | if(target == hit.Parent)then | |
926 | target = nil | |
927 | end | |
928 | delay(2,function() | |
929 | WashDING:Play() | |
930 | --pcall(game.Destroy,duder:FindFirstChildOfClass"Humanoid") | |
931 | for _,v in next, hit.Parent:children() do | |
932 | if v:IsA"BasePart" then | |
933 | v.BrickColor = BrickColor.new"Lime green" | |
934 | v.Transparency = 1 | |
935 | local bodpos = Instance.new("BodyPosition",v) | |
936 | bodpos.Position = v.Position + Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
937 | local emi = p1mit:Clone() | |
938 | emi.LightEmission = 1 | |
939 | emi.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.new(0,1,1)),ColorSequenceKeypoint.new(1,Color3.new(1,1,0))}) | |
940 | emi.Parent = v | |
941 | emi.Enabled = true | |
942 | for i = 1, 5 do | |
943 | local trace = Instance.new("Part",v) | |
944 | trace.Size = Vector3.new(1,1,1) | |
945 | trace.Transparency = 1 | |
946 | trace.Anchored = true | |
947 | trace.CFrame = (root.CFrame + root.CFrame.lookVector * (5*i)) | |
948 | game:service'Debris':AddItem(trace,.25) | |
949 | end | |
950 | local trace = Instance.new("Part",v) | |
951 | trace.BrickColor = BrickColor.new("Really red") | |
952 | trace.CanCollide = false | |
953 | trace.Size = Vector3.new(1,1,1) | |
954 | trace.BottomSurface = 0 | |
955 | trace.TopSurface = 0 | |
956 | trace.Anchored = true | |
957 | trace.CFrame = v.CFrame + v.CFrame.lookVector * 12.5 | |
958 | trace.Material = "Neon" | |
959 | local tracem = Instance.new("SpecialMesh",trace) | |
960 | tracem.MeshType = "Sphere" | |
961 | tracem.Scale = Vector3.new(1,1,50) | |
962 | coroutine.wrap(function() | |
963 | for i = 0, 1, .1 do | |
964 | trace.Transparency = i | |
965 | wait() | |
966 | end | |
967 | trace:destroy(); | |
968 | end)() | |
969 | game:service'Debris':AddItem(v,1) | |
970 | end | |
971 | end | |
972 | end) | |
973 | end | |
974 | end) | |
975 | end | |
976 | -- Damage | |
977 | function fuckingmurderem(vro,suicide) | |
978 | if(vro == char or vro and notWhitelisted(vro))then | |
979 | local humR = vro:FindFirstChild"HumanoidRootPart" | |
980 | local huma = vro:FindFirstChildOfClass"Humanoid" | |
981 | local hed = vro:FindFirstChild"Head" | |
982 | NewInstance("BoolValue",vro,{Name = 'HitPsy3',Value = true}) | |
983 | if(humR) then | |
984 | humR:destroy() | |
985 | end | |
986 | if(huma)then | |
987 | huma:ChangeState(Enum.HumanoidStateType.Physics) | |
988 | huma.PlatformStand = true | |
989 | end | |
990 | if(humR or huma) then | |
991 | if(plr.UserId == 19909695 or plr.UserId ~= 5719877)then | |
992 | delay(2,function() | |
993 | if(vro == target)then | |
994 | target = nil | |
995 | end | |
996 | ||
997 | vro:BreakJoints() | |
998 | WashDING:Play() | |
999 | --pcall(game.Destroy,vro:FindFirstChildOfClass"Humanoid") | |
1000 | for _,v in next, vro:children() do | |
1001 | if v:IsA"BasePart" then | |
1002 | v.BrickColor = BrickColor.new"Lime green" | |
1003 | v.Transparency = 1 | |
1004 | local bodpos = Instance.new("BodyPosition",v) | |
1005 | bodpos.Position = v.Position + Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
1006 | local emi = p1mit:Clone() | |
1007 | emi.LightEmission = 1 | |
1008 | emi.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.new(1,0,0)),ColorSequenceKeypoint.new(1,Color3.new(1,0,0))}) | |
1009 | emi.Parent = v | |
1010 | emi.Enabled = true | |
1011 | for i = 1, 5 do | |
1012 | local trace = Instance.new("Part",v) | |
1013 | trace.Size = Vector3.new(1,1,1) | |
1014 | trace.Transparency = 1 | |
1015 | trace.Anchored = true | |
1016 | trace.CFrame = (root.CFrame + root.CFrame.lookVector * (5*i)) | |
1017 | game:service'Debris':AddItem(trace,.25) | |
1018 | end | |
1019 | local trace = Instance.new("Part",v) | |
1020 | trace.BrickColor = BrickColor.new("Really red") | |
1021 | trace.CanCollide = false | |
1022 | trace.Size = Vector3.new(1,1,1) | |
1023 | trace.BottomSurface = 0 | |
1024 | trace.TopSurface = 0 | |
1025 | trace.Anchored = true | |
1026 | trace.CFrame = v.CFrame + v.CFrame.lookVector * 12.5 | |
1027 | trace.Material = "Neon" | |
1028 | local tracem = Instance.new("SpecialMesh",trace) | |
1029 | tracem.MeshType = "Sphere" | |
1030 | tracem.Scale = Vector3.new(1,1,50) | |
1031 | coroutine.wrap(function() | |
1032 | for i = 0, 1, .1 do | |
1033 | trace.Transparency = i | |
1034 | wait() | |
1035 | end | |
1036 | trace:destroy(); | |
1037 | end)() | |
1038 | game:service'Debris':AddItem(v,1) | |
1039 | end | |
1040 | end | |
1041 | end) | |
1042 | else | |
1043 | vro:BreakJoints() | |
1044 | end | |
1045 | end | |
1046 | end | |
1047 | end | |
1048 | local doingDamage = false; | |
1049 | function notWhitelisted(char) | |
1050 | local player = game:service'Players':GetPlayerFromCharacter(char) | |
1051 | if(not player or player.UserId ~= 19909695 or plr.UserId ~= 5719877)then | |
1052 | return true; | |
1053 | else | |
1054 | return false | |
1055 | end | |
1056 | end | |
1057 | Hitbox.Touched:connect(function(t) | |
1058 | if(doingDamage and t and t.Parent)then | |
1059 | local hum = t.Parent:FindFirstChildOfClass'Humanoid' | |
1060 | local hed = t.Parent:FindFirstChild'Head' | |
1061 | if(t.Parent ~= char and notWhitelisted(t.Parent))then | |
1062 | if(hum and hum.Health > 0 and not t.Parent:FindFirstChild'HitPsy3')then | |
1063 | p1mit.Enabled = true | |
1064 | Stab:Play() | |
1065 | fuckingmurderem(t.Parent) | |
1066 | wait(.5) | |
1067 | p1mit.Enabled = false | |
1068 | end | |
1069 | end | |
1070 | end | |
1071 | end) | |
1072 | ||
1073 | -- Keystroke system | |
1074 | local lastKeypress = time(); | |
1075 | local Keystroke = "" | |
1076 | local KeystrokeKeys = { | |
1077 | [Enum.KeyCode.W] = true, | |
1078 | [Enum.KeyCode.A] = true, | |
1079 | [Enum.KeyCode.S] = true, | |
1080 | [Enum.KeyCode.D] = true, | |
1081 | [Enum.KeyCode.C] = true, | |
1082 | [Enum.KeyCode.F] = true, | |
1083 | [Enum.KeyCode.X] = true, | |
1084 | } | |
1085 | ||
1086 | ||
1087 | ||
1088 | local Keystrokes = { | |
1089 | ['DSC'] = {"Murder",function() | |
1090 | attack=true | |
1091 | hum.WalkSpeed = 0 | |
1092 | kachow:Play() | |
1093 | local BodVel = Instance.new("BodyVelocity",tors) | |
1094 | BodVel.P = 10000 | |
1095 | BodVel.MaxForce = Vector3.new(BodVel.P,BodVel.P,BodVel.P) | |
1096 | BodVel.Velocity = Vector3.new(0,100,0) + root.CFrame.lookVector*5 | |
1097 | doingDamage = true | |
1098 | for i = 0,2,0.1 do | |
1099 | swait() | |
1100 | rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(90)),.3) | |
1101 | tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-65)),.3) | |
1102 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(90), math.rad(90)), 0.3) | |
1103 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3) | |
1104 | HW.C0=clerp(HW.C0,cf(0,-.9,1.3)*angles(math.rad(5),math.rad(0),math.rad(90)),0.15) | |
1105 | end | |
1106 | wait(.4) | |
1107 | attack=false | |
1108 | doingDamage = false | |
1109 | hum.WalkSpeed = 2.5 | |
1110 | BodVel:Destroy() | |
1111 | end}, | |
1112 | ||
1113 | ||
1114 | ['AWC'] = {"Kill", function() | |
1115 | attack=true | |
1116 | hum.WalkSpeed = 0 | |
1117 | kachow:Play() | |
1118 | doingDamage = true | |
1119 | for i = 0,2,0.1 do | |
1120 | swait() | |
1121 | rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(90)),.3) | |
1122 | tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-65)),.3) | |
1123 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.3) | |
1124 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3) | |
1125 | HW.C0=clerp(HW.C0,cf(0,-2,0)*angles(math.rad(90),math.rad(0),math.rad(0)),0.15) | |
1126 | end | |
1127 | wait(1) | |
1128 | attack=false | |
1129 | doingDamage = false | |
1130 | hum.WalkSpeed = 2.5 | |
1131 | end} | |
1132 | } | |
1133 | local UIP = game:service'UserInputService' | |
1134 | local TweS = game:GetService("TweenService") | |
1135 | local RunS = game:GetService("RunService") | |
1136 | UIP.InputBegan:connect(function(io,gp) | |
1137 | if(not gp and not attack)then | |
1138 | if(KeystrokeKeys[io.KeyCode])then | |
1139 | lastKeypress = time() | |
1140 | if(#Keystroke > 6) then | |
1141 | Keystroke = "" | |
1142 | end | |
1143 | Keystroke = Keystroke..tostring(io.KeyCode):sub(14) | |
1144 | print(Keystroke) | |
1145 | for i,v in next, Keystrokes do | |
1146 | if(Keystroke == i)then | |
1147 | v[2]() | |
1148 | Keystroke = ""; | |
1149 | end | |
1150 | end | |
1151 | end | |
1152 | end | |
1153 | end) | |
1154 | ||
1155 | UIP.InputBegan:connect(function(io,gp) | |
1156 | if(not gp and not attack and io.KeyCode == Enum.KeyCode.Q)then | |
1157 | if(mouse.Target and mouse.Target.Parent:FindFirstChildOfClass'Humanoid' and not mouse.Target.Parent:FindFirstChild'HitMarkerPsycho2')then | |
1158 | target = mouse.Target.Parent | |
1159 | local info = TweenInfo.new(.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false) | |
1160 | img2.ImageTransparency = 0 | |
1161 | img2.Size = UDim2.new(1,0,1,0) | |
1162 | img2.Position = UDim2.new(0,0,0,0) | |
1163 | local tween = TweS:Create(img2, info, {ImageTransparency = 1,Size=UDim2.new(2.5,0,2.5,0),Position=UDim2.new(-.75,0,-.75,0)}) | |
1164 | ||
1165 | tween:Play(); | |
1166 | end | |
1167 | end | |
1168 | end) | |
1169 | - | RunS.RenderStepped:connect(function() |
1169 | + | RunS.Stepped:connect(function() |
1170 | if(time() - lastKeypress) > 0.5 then | |
1171 | Keystroke = "" | |
1172 | end | |
1173 | end) | |
1174 | ||
1175 | ||
1176 | ||
1177 | ||
1178 | hum.WalkSpeed = 2.5 | |
1179 | idle=0 | |
1180 | local sine = 0 | |
1181 | local change = 1 | |
1182 | local val = 0 | |
1183 | toim = 0 | |
1184 | hum.Animator.Parent = nil | |
1185 | idleanim=.4 | |
1186 | while true do | |
1187 | swait() | |
1188 | sine = sine + change | |
1189 | local torvel=(root.Velocity*Vector3.new(1,0,1)).magnitude | |
1190 | local velderp=root.Velocity.y | |
1191 | hitfloor,posfloor=rayCast(root.Position,(CFrame.new(root.Position,root.Position - Vector3.new(0,1,0))).lookVector,4,char) | |
1192 | if equipped==true or equipped==false then | |
1193 | if attack==false then | |
1194 | idle=idle+1 | |
1195 | else | |
1196 | idle=0 | |
1197 | end | |
1198 | if root.Velocity.y > 1 and hitfloor==nil then | |
1199 | Anim="Jump" | |
1200 | if attack==false then | |
1201 | rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
1202 | tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3) | |
1203 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(10)), 0.3) | |
1204 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3) | |
1205 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3) | |
1206 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3) | |
1207 | end | |
1208 | elseif root.Velocity.y < -1 and hitfloor==nil then | |
1209 | Anim="Fall" | |
1210 | if attack==false then | |
1211 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3) | |
1212 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3) | |
1213 | rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
1214 | tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(40),math.rad(0),math.rad(0)),.3) | |
1215 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.65, 0) * angles(math.rad(-10), math.rad(0), math.rad(90)), 0.3) | |
1216 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.65, 0) * angles(math.rad(-10), math.rad(0), math.rad(-90)), 0.3) | |
1217 | end | |
1218 | elseif torvel<1 and hitfloor~=nil then | |
1219 | Anim="Idle" | |
1220 | change = 1 | |
1221 | if attack==false then | |
1222 | rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.1+0.1*math.cos(sine/20))*angles(math.rad(0),math.rad(0),math.rad(0)),0.15) | |
1223 | tors.Neck.C0=clerp(tors.Neck.C0,necko*angles(math.rad(25),math.rad(0),math.rad(10*math.cos(sine/20))),.3) | |
1224 | RH.C0=clerp(RH.C0,cf(1,-0.9-0.1*math.cos(sine/20),0.025*math.cos(sine/20))*angles(math.rad(-2.5),math.rad(90),math.rad(-0))*angles(math.rad(-5.5),math.rad(0),math.rad(0)),0.15) | |
1225 | LH.C0=clerp(LH.C0,cf(-1,-0.9-0.1*math.cos(sine/20),0.025*math.cos(sine/20))*angles(math.rad(-2.5),math.rad(-90),math.rad(-0))*angles(math.rad(-5.5),math.rad(0),math.rad(0)),0.15) | |
1226 | RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5+0.05*math.sin(sine/30),0)*angles(math.rad(-3),math.rad(0),math.rad(10)),0.15) | |
1227 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5+0.05*math.sin(sine/30), 0) * angles(math.rad(115 + 4), math.rad(45), math.rad(50)), 0.1) | |
1228 | HW.C0=clerp(HW.C0,cf(0,-1,1.3)*angles(math.rad(0),math.rad(0),math.rad(90)),0.15) | |
1229 | end | |
1230 | elseif torvel>2 and torvel<22 and hitfloor~=nil then | |
1231 | Anim="Walk" | |
1232 | change = 0.5 | |
1233 | if attack==false then | |
1234 | rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.175+0.025*math.cos(sine/3.5)+ -math.sin(sine/3.5)/7)*angles(math.rad(5-2.5*math.cos(sine/3.5)),math.rad(0),math.rad(10*math.cos(sine/7))),0.15) | |
1235 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3) | |
1236 | RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(30*math.cos(sine/7))+ math.sin(sine/7)/8.5,math.rad(0),math.rad(10)),0.15) | |
1237 | LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*angles(math.rad(-30*math.cos(sine/7))+ -math.sin(sine/7)/8.5,math.rad(0),math.rad(-10)),0.15) | |
1238 | RH.C0=clerp(RH.C0,cf(1,-0.925-0.5*math.cos(sine/7)/2,0.5*math.cos(sine/7)/8)*angles(math.rad(-5-15*math.cos(sine/7))+ -math.sin(sine/7)/8.5,math.rad(90-10*math.cos(sine/7)),math.rad(0)),0.15) | |
1239 | LH.C0=clerp(LH.C0,cf(-1,-0.925+0.5*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/8)*angles(math.rad(-5+15*math.cos(sine/7))+ math.sin(sine/7)/8.5,math.rad(-90-10*math.cos(sine/7)),math.rad(0)),0.15) | |
1240 | HW.C0=clerp(HW.C0,cf(0,-1,1.3)*angles(math.rad(0),math.rad(0),math.rad(90)),.15) | |
1241 | end | |
1242 | elseif torvel>=22 and hitfloor~=nil then | |
1243 | Anim="Run" | |
1244 | end | |
1245 | end | |
1246 | if 0 < #Effects then | |
1247 | for e = 1, #Effects do | |
1248 | if Effects[e] ~= nil then | |
1249 | local Thing = Effects[e] | |
1250 | if Thing ~= nil then | |
1251 | local Part = Thing[1] | |
1252 | local Mode = Thing[2] | |
1253 | local Delay = Thing[3] | |
1254 | local IncX = Thing[4] | |
1255 | local IncY = Thing[5] | |
1256 | local IncZ = Thing[6] | |
1257 | if 1 >= Thing[1].Transparency then | |
1258 | if Thing[2] == "Block1" then | |
1259 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1260 | local Mesh = Thing[1].Mesh | |
1261 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1262 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1263 | elseif Thing[2] == "Block2" then | |
1264 | Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0) | |
1265 | local Mesh = Thing[7] | |
1266 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1267 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1268 | elseif Thing[2] == "Block3" then | |
1269 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) + Vector3.new(0, 0.15, 0) | |
1270 | local Mesh = Thing[7] | |
1271 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1272 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1273 | elseif Thing[2] == "Cylinder" then | |
1274 | local Mesh = Thing[1].Mesh | |
1275 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1276 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1277 | elseif Thing[2] == "Blood" then | |
1278 | local Mesh = Thing[7] | |
1279 | Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0) | |
1280 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1281 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1282 | elseif Thing[2] == "Elec" then | |
1283 | local Mesh = Thing[1].Mesh | |
1284 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
1285 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1286 | elseif Thing[2] == "Disappear" then | |
1287 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1288 | elseif Thing[2] == "Shatter" then | |
1289 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1290 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
1291 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
1292 | Thing[6] = Thing[6] + Thing[5] | |
1293 | end | |
1294 | else | |
1295 | Part.Parent = nil | |
1296 | table.remove(Effects, e) | |
1297 | end | |
1298 | end | |
1299 | end | |
1300 | end | |
1301 | end | |
1302 | end |