View difference between Paste ID: xHLSjctq and inRW9XxM
SHOW: | | - or go back to the newest paste.
1
--[[ A script By makhail07
2
3
--https://github.com/Mokiros/roblox-FE-compatibility
4
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5
local Player,game,owner = owner,game
6
local RealPlayer = Player
7
do
8
	print("FE Compatibility code V2 by Mokiros")
9
	local RealPlayer = RealPlayer
10
	script.Parent = RealPlayer.Character
11
12
	--Fake event to make stuff like Mouse.KeyDown work
13
	local Disconnect_Function = function(this)
14
		this[1].Functions[this[2]] = nil
15
	end
16
	local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
17
	local FakeEvent_Metatable = {__index={
18
		Connect = function(this,f)
19
			local i = tostring(math.random(0,10000))
20
			while this.Functions[i] do
21
				i = tostring(math.random(0,10000))
22
			end
23
			this.Functions[i] = f
24
			return setmetatable({this,i},Disconnect_Metatable)
25
		end
26
	}}
27
	FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
28
	local function fakeEvent()
29
		return setmetatable({Functions={}},FakeEvent_Metatable)
30
	end
31
32
	--Creating fake input objects with fake variables
33
    local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
34
    FakeMouse.keyUp = FakeMouse.KeyUp
35
    FakeMouse.keyDown = FakeMouse.KeyDown
36
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
37
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
38
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
39
	end}
40
	--Merged 2 functions into one by checking amount of arguments
41
	CAS.UnbindAction = CAS.BindAction
42
43
	--This function will trigger the events that have been :Connect()'ed
44
	local function TriggerEvent(self,ev,...)
45
		for _,f in pairs(self[ev].Functions) do
46
			f(...)
47
		end
48
	end
49
	FakeMouse.TriggerEvent = TriggerEvent
50
	UIS.TriggerEvent = TriggerEvent
51
52
	--Client communication
53
	local Event = Instance.new("RemoteEvent")
54
	Event.Name = "UserInput_Event"
55
	Event.OnServerEvent:Connect(function(plr,io)
56
	    if plr~=RealPlayer then return end
57
		FakeMouse.Target = io.Target
58
		FakeMouse.Hit = io.Hit
59
		if not io.isMouse then
60
			local b = io.UserInputState == Enum.UserInputState.Begin
61
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
62
				return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
63
			end
64
			if io.UserInputType == Enum.UserInputType.MouseButton2 then
65
				return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
66
			end
67
			for _,t in pairs(CAS.Actions) do
68
				for _,k in pairs(t.Keys) do
69
					if k==io.KeyCode then
70
						t.Function(t.Name,io.UserInputState,io)
71
					end
72
				end
73
			end
74
			FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
75
			UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
76
	    end
77
	end)
78
	Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
79
	local Mouse = owner:GetMouse()
80
	local UIS = game:GetService("UserInputService")
81
	local input = function(io,RobloxHandled)
82
		if RobloxHandled then return end
83
		--Since InputObject is a client-side instance, we create and pass table instead
84
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
85
	end
86
	UIS.InputBegan:Connect(input)
87
	UIS.InputEnded:Connect(input)
88
	local h,t
89
	--Give the server mouse data every second frame, but only if the values changed
90
	--If player is not moving their mouse, client won't fire events
91
	local HB = game:GetService("RunService").Heartbeat
92
	while true do
93
		if h~=Mouse.Hit or t~=Mouse.Target then
94
			h,t=Mouse.Hit,Mouse.Target
95
			Event:FireServer({isMouse=true,Target=t,Hit=h})
96
		end
97
		--Wait 2 frames
98
		for i=1,2 do
99
			HB:Wait()
100
		end
101
	end]==],script)
102
103
	----Sandboxed game object that allows the usage of client-side methods and services
104
	--Real game object
105
	local RealGame = game
106
107
	--Metatable for fake service
108
	local FakeService_Metatable = {
109
		__index = function(self,k)
110
			local s = rawget(self,"_RealService")
111
			if s then
112
				return typeof(s[k])=="function"
113
				and function(_,...)return s[k](s,...)end or s[k]
114
			end
115
		end,
116
		__newindex = function(self,k,v)
117
			local s = rawget(self,"_RealService")
118
			if s then s[k]=v end
119
		end
120
	}
121
	local function FakeService(t,RealService)
122
		t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
123
		return setmetatable(t,FakeService_Metatable)
124
	end
125
126
	--Fake game object
127
	local FakeGame = {
128
		GetService = function(self,s)
129
			return rawget(self,s) or RealGame:GetService(s)
130
		end,
131
		Players = FakeService({
132
			LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
133
		},"Players"),
134
		UserInputService = FakeService(UIS,"UserInputService"),
135
		ContextActionService = FakeService(CAS,"ContextActionService"),
136
		RunService = FakeService({
137
			_btrs = {},
138
			RenderStepped = RealGame:GetService("RunService").Heartbeat,
139
			BindToRenderStep = function(self,name,_,fun)
140
				self._btrs[name] = self.Heartbeat:Connect(fun)
141
			end,
142
			UnbindFromRenderStep = function(self,name)
143
				self._btrs[name]:Disconnect()
144
			end,
145
		},"RunService")
146
	}
147
	rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
148
	FakeGame.service = FakeGame.GetService
149
	FakeService(FakeGame,game)
150
	--Changing owner to fake player object to support owner:GetMouse()
151
	game,owner = FakeGame,FakeGame.Players.LocalPlayer
152
end
153
154
155
Discord demitasse#2958 
156
157
Description:
158
]]--
159
160
local IDs = {340106355,927529620,876981900,398987889}
161
162
function swait(num)
163
if num==0 or num==nil then
164
game:service'RunService'.Stepped:wait(0)
165
else
166
for i=0,num do
167
game:service'RunService'.Stepped:wait(0)
168
end
169
end
170
end
171
function thread(f)
172
  coroutine.resume(coroutine.create(f))
173
end
174
function clerp(a, b, t) 
175
	local qa = {
176
		QuaternionFromCFrame(a)
177
	}
178
	local qb = {
179
		QuaternionFromCFrame(b)
180
	} 
181
	local ax, ay, az = a.x, a.y, a.z 
182
	local bx, by, bz = b.x, b.y, b.z
183
	local _t = 1 - t
184
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) 
185
end
186
function QuaternionFromCFrame(cf)
187
  local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
188
  local trace = m00 + m11 + m22
189
  if trace > 0 then
190
    local s = math.sqrt(1 + trace)
191
    local recip = 0.5 / s
192
    return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
193
  else
194
    local i = 0
195
    if m00 < m11 then
196
      i = 1
197
    end
198
    if m22 > (i == 0 and m00 or m11) then
199
      i = 2
200
    end
201
    if i == 0 then
202
      local s = math.sqrt(m00 - m11 - m22 + 1)
203
      local recip = 0.5 / s
204
      return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
205
    elseif i == 1 then
206
      local s = math.sqrt(m11 - m22 - m00 + 1)
207
      local recip = 0.5 / s
208
      return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
209
    elseif i == 2 then
210
      local s = math.sqrt(m22 - m00 - m11 + 1)
211
      local recip = 0.5 / s
212
      return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
213
    end
214
  end
215
end
216
function QuaternionToCFrame(px, py, pz, x, y, z, w)
217
  local xs, ys, zs = x + x, y + y, z + z
218
  local wx, wy, wz = w * xs, w * ys, w * zs
219
  local xx = x * xs
220
  local xy = x * ys
221
  local xz = x * zs
222
  local yy = y * ys
223
  local yz = y * zs
224
  local zz = z * zs
225
  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))
226
end
227
function QuaternionSlerp(a, b, t)
228
  local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
229
  local startInterp, finishInterp
230
  if cosTheta >= 1.0E-4 then
231
    if 1 - cosTheta > 1.0E-4 then
232
      local theta = math.acos(cosTheta)
233
      local invSinTheta = 1 / math.sin(theta)
234
      startInterp = math.sin((1 - t) * theta) * invSinTheta
235
      finishInterp = math.sin(t * theta) * invSinTheta
236
    else
237
      startInterp = 1 - t
238
      finishInterp = t
239
    end
240
  elseif 1 + cosTheta > 1.0E-4 then
241
    local theta = math.acos(-cosTheta)
242
    local invSinTheta = 1 / math.sin(theta)
243
    startInterp = math.sin((t - 1) * theta) * invSinTheta
244
    finishInterp = math.sin(t * theta) * invSinTheta
245
  else
246
    startInterp = t - 1
247
    finishInterp = t
248
  end
249
  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
250
end
251
function rayCast(Position, Direction, Range, Ignore)
252
  return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
253
end
254
--Wait what okay
255
wait()
256
local plr = game:service'Players'.LocalPlayer
257
local char = plr.Character
258
local hum = char.Humanoid
259
local ra = char["Right Arm"]
260
local la= char["Left Arm"]
261
local rl= char["Right Leg"]
262
local ll = char["Left Leg"]
263
local hed = char.Head
264
local root = char.HumanoidRootPart
265
local rootj = root.RootJoint
266
local tors = char.Torso
267
local mouse = plr:GetMouse()
268
local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
269
local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
270
local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
271
local maincolor = BrickColor.new("Magenta")
272
cf = CFrame.new
273
angles = CFrame.Angles
274
attack = false
275
euler=CFrame.fromEulerAnglesXYZ
276
equipped = false
277
necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
278
RSH, LSH = nil, nil 
279
RW = Instance.new("Weld") 
280
LW = Instance.new("Weld")
281
RH = tors["Right Hip"]
282
LH = tors["Left Hip"]
283
RSH = tors["Right Shoulder"] 
284
LSH = tors["Left Shoulder"] 
285
RSH.Parent = nil 
286
LSH.Parent = nil 
287
RW.Name = "RW"
288
RW.Part0 = tors 
289
RW.C0 = CFrame.new(1.5, 0.5, 0)
290
RW.C1 = CFrame.new(0, 0.5, 0) 
291
RW.Part1 = ra
292
RW.Parent = tors 
293
LW.Name = "LW"
294
LW.Part0 = tors 
295
LW.C0 = CFrame.new(-1.5, 0.5, 0)
296
LW.C1 = CFrame.new(0, 0.5, 0) 
297
LW.Part1 = la
298
LW.Parent = tors
299
print('User is '..plr.Name)
300
Effects = {}
301
	
302
ArtificialHB = Instance.new("BindableEvent", script)
303
ArtificialHB.Name = "Heartbeat"
304
305
script:WaitForChild("Heartbeat")
306
307
frame = 1 / 60
308
tf = 0
309
allowframeloss = false
310
tossremainder = false
311
lastframe = tick()
312
script.Heartbeat:Fire()
313
314
game:GetService("RunService").Heartbeat:connect(function(s, p)
315
	tf = tf + s
316
	if tf >= frame then
317
		if allowframeloss then
318
			script.Heartbeat:Fire()
319
			lastframe = tick()
320
		else
321
			for i = 1, math.floor(tf / frame) do
322
				script.Heartbeat:Fire()
323
			end
324
			lastframe = tick()
325
		end
326
		if tossremainder then
327
			tf = 0
328
		else
329
			tf = tf - frame * math.floor(tf / frame)
330
		end
331
	end
332
end)
333
local RbxUtility = LoadLibrary("RbxUtility")
334
local Create = RbxUtility.Create
335
336
function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
337
	if hit.Parent == nil then
338
		return
339
	end
340
	local h = hit.Parent:FindFirstChildOfClass("Humanoid")
341
	for _, v in pairs(hit.Parent:children()) do
342
		if v:IsA("Humanoid") then
343
			h = v
344
		end
345
	end
346
         if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
347
         warn'No R15 allowed'
348
         hit.Parent:FindFirstChild("Head"):BreakJoints()
349
         end
350
351
	if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
352
		if hit.Parent:findFirstChild("DebounceHit") ~= nil then
353
			if hit.Parent.DebounceHit.Value == true then
354
				return
355
			end
356
		end
357
         if insta == true then
358
         hit.Parent:FindFirstChild("Head"):BreakJoints()
359
         end
360
		local c = Create("ObjectValue"){
361
			Name = "creator",
362
			Value = game:service("Players").LocalPlayer,
363
			Parent = h,
364
		}
365
		game:GetService("Debris"):AddItem(c, .5)
366
		if HitSound ~= nil and HitPitch ~= nil then
367
			CFuncs.Sound.Create(HitSound, hit, 1, HitPitch) 
368
		end
369
		local Damage = math.random(minim, maxim)
370
		local blocked = false
371
		local block = hit.Parent:findFirstChild("Block")
372
		if block ~= nil then
373
			if block.className == "IntValue" then
374
				if block.Value > 0 then
375
					blocked = true
376
					block.Value = block.Value - 1
377
					print(block.Value)
378
				end
379
			end
380
		end
381
		if blocked == false then
382
			h.Health = h.Health - Damage
383
			ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
384
		else
385
			h.Health = h.Health - (Damage / 2)
386
			ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
387
		end
388
		if Type == "Knockdown" then
389
			local hum = hit.Parent.Humanoid
390
			hum.PlatformStand = true
391
			coroutine.resume(coroutine.create(function(HHumanoid)
392
				swait(1)
393
				HHumanoid.PlatformStand = false
394
			end), hum)
395
			local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
396
			local bodvol = Create("BodyVelocity"){
397
				velocity = angle * knockback,
398
				P = 5000,
399
				maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
400
				Parent = hit,
401
			}
402
			local rl = Create("BodyAngularVelocity"){
403
				P = 3000,
404
				maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
405
				angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
406
				Parent = hit,
407
			}
408
			game:GetService("Debris"):AddItem(bodvol, .5)
409
			game:GetService("Debris"):AddItem(rl, .5)
410
		elseif Type == "Normal" then
411
			local vp = Create("BodyVelocity"){
412
				P = 500,
413
				maxForce = Vector3.new(math.huge, 0, math.huge),
414
				velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
415
			}
416
			if knockback > 0 then
417
				vp.Parent = hit.Parent.Torso
418
			end
419
			game:GetService("Debris"):AddItem(vp, .5)
420
		elseif Type == "Up" then
421
			local bodyVelocity = Create("BodyVelocity"){
422
				velocity = Vector3.new(0, 20, 0),
423
				P = 5000,
424
				maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
425
				Parent = hit,
426
			}
427
			game:GetService("Debris"):AddItem(bodyVelocity, .5)
428
		elseif Type == "DarkUp" then
429
			coroutine.resume(coroutine.create(function()
430
				for i = 0, 1, 0.1 do
431
					swait()
432
					Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
433
				end
434
			end))
435
			local bodyVelocity = Create("BodyVelocity"){
436
				velocity = Vector3.new(0, 20, 0),
437
				P = 5000,
438
				maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
439
				Parent = hit,
440
			}
441
			game:GetService("Debris"):AddItem(bodyVelocity, 1)
442
		elseif Type == "Snare" then
443
			local bp = Create("BodyPosition"){
444
				P = 2000,
445
				D = 100,
446
				maxForce = Vector3.new(math.huge, math.huge, math.huge),
447
				position = hit.Parent.Torso.Position,
448
				Parent = hit.Parent.Torso,
449
			}
450
			game:GetService("Debris"):AddItem(bp, 1)
451
		elseif Type == "Freeze" then
452
			local BodPos = Create("BodyPosition"){
453
				P = 50000,
454
				D = 1000,
455
				maxForce = Vector3.new(math.huge, math.huge, math.huge),
456
				position = hit.Parent.Torso.Position,
457
				Parent = hit.Parent.Torso,
458
			}
459
			local BodGy = Create("BodyGyro") {
460
				maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
461
				P = 20e+003,
462
				Parent = hit.Parent.Torso,
463
				cframe = hit.Parent.Torso.CFrame,
464
			}
465
			hit.Parent.Torso.Anchored = true
466
			coroutine.resume(coroutine.create(function(Part) 
467
				swait(1.5)
468
				Part.Anchored = false
469
			end), hit.Parent.Torso)
470
			game:GetService("Debris"):AddItem(BodPos, 3)
471
			game:GetService("Debris"):AddItem(BodGy, 3)
472
		end
473
		local debounce = Create("BoolValue"){
474
			Name = "DebounceHit",
475
			Parent = hit.Parent,
476
			Value = true,
477
		}
478
		game:GetService("Debris"):AddItem(debounce, Delay)
479
		c = Create("ObjectValue"){
480
			Name = "creator",
481
			Value = Player,
482
			Parent = h,
483
		}
484
		game:GetService("Debris"):AddItem(c, .5)
485
	end
486
end
487
488
function ShowDamage(Pos, Text, Time, Color)
489
	local Rate = (1 / 30)
490
	local Pos = (Pos or Vector3.new(0, 0, 0))
491
	local Text = (Text or "")
492
	local Time = (Time or 2)
493
	local Color = (Color or Color3.new(1, 0, 1))
494
	local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
495
	EffectPart.Anchored = true
496
	local BillboardGui = Create("BillboardGui"){
497
		Size = UDim2.new(3, 0, 3, 0),
498
		Adornee = EffectPart,
499
		Parent = EffectPart,
500
	}
501
	local TextLabel = Create("TextLabel"){
502
		BackgroundTransparency = 1,
503
		Size = UDim2.new(1, 0, 1, 0),
504
		Text = Text,
505
		Font = "Highway",
506
		TextColor3 = Color,
507
		TextScaled = true,
508
		Parent = BillboardGui,
509
	}
510
	game.Debris:AddItem(EffectPart, (Time))
511
	EffectPart.Parent = game:GetService("Workspace")
512
	delay(0, function()
513
		local Frames = (Time / Rate)
514
		for Frame = 1, Frames do
515
			wait(Rate)
516
			local Percent = (Frame / Frames)
517
			EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
518
			TextLabel.TextTransparency = Percent
519
		end
520
		if EffectPart and EffectPart.Parent then
521
			EffectPart:Destroy()
522
		end
523
	end)
524
end
525
function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
526
	for _, c in pairs(workspace:children()) do
527
		local hum = c:findFirstChild("Humanoid")
528
		if hum ~= nil then
529
			local head = c:findFirstChild("Torso") or c:findFirstChild("UpperTorso") or c:FindFirstChild('LowerTorso')
530
			if head ~= nil then
531
				local targ = head.Position - Part.Position
532
				local mag = targ.magnitude
533
				if mag <= Magnitude and c.Name ~= plr.Name then 
534
					Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, root, .1, "rbxassetid://" .. HitSound, HitPitch)
535
				end
536
			end
537
		end
538
	end
539
end
540
CFuncs = {
541
  Part = {
542
    Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
543
      local Part = Create("Part")({
544
        Parent = Parent,
545
        Reflectance = Reflectance,
546
        Transparency = Transparency,
547
        CanCollide = false,
548
        Locked = true,
549
        BrickColor = BrickColor.new(tostring(BColor)),
550
        Name = Name,
551
        Size = Size,
552
        Material = Material
553
      })
554
      RemoveOutlines(Part)
555
      return Part
556
    end
557
  },
558
  Mesh = {
559
    Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
560
      local Msh = Create(Mesh)({
561
        Parent = Part,
562
        Offset = OffSet,
563
        Scale = Scale
564
      })
565
      if Mesh == "SpecialMesh" then
566
        Msh.MeshType = MeshType
567
        Msh.MeshId = MeshId
568
      end
569
      return Msh
570
    end
571
  },
572
  Mesh = {
573
    Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
574
      local Msh = Create(Mesh)({
575
        Parent = Part,
576
        Offset = OffSet,
577
        Scale = Scale
578
      })
579
      if Mesh == "SpecialMesh" then
580
        Msh.MeshType = MeshType
581
        Msh.MeshId = MeshId
582
      end
583
      return Msh
584
    end
585
  },
586
  Weld = {
587
    Create = function(Parent, Part0, Part1, C0, C1)
588
      local Weld = Create("Weld")({
589
        Parent = Parent,
590
        Part0 = Part0,
591
        Part1 = Part1,
592
        C0 = C0,
593
        C1 = C1
594
      })
595
      return Weld
596
    end
597
  },
598
  Sound = {
599
    Create = function(id, par, vol, pit)
600
      coroutine.resume(coroutine.create(function()
601
        local S = Create("Sound")({
602
          Volume = vol,
603
          Pitch = pit or 1,
604
          SoundId = id,
605
          Parent = par or workspace
606
        })
607
        wait()
608
        S:play()
609
        game:GetService("Debris"):AddItem(S, 6)
610
      end))
611
    end
612
  },
613
  ParticleEmitter = {
614
    Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
615
      local fp = Create("ParticleEmitter")({
616
        Parent = Parent,
617
        Color = ColorSequence.new(Color1, Color2),
618
        LightEmission = LightEmission,
619
        Size = Size,
620
        Texture = Texture,
621
        Transparency = Transparency,
622
        ZOffset = ZOffset,
623
        Acceleration = Accel,
624
        Drag = Drag,
625
        LockedToPart = LockedToPart,
626
        VelocityInheritance = VelocityInheritance,
627
        EmissionDirection = EmissionDirection,
628
        Enabled = Enabled,
629
        Lifetime = LifeTime,
630
        Rate = Rate,
631
        Rotation = Rotation,
632
        RotSpeed = RotSpeed,
633
        Speed = Speed,
634
        VelocitySpread = VelocitySpread
635
      })
636
      return fp
637
    end
638
  }
639
}
640
function RemoveOutlines(part)
641
  part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
642
end
643
function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
644
  local Part = Create("Part")({
645
    formFactor = FormFactor,
646
    Parent = Parent,
647
    Reflectance = Reflectance,
648
    Transparency = Transparency,
649
    CanCollide = false,
650
    Locked = true,
651
    BrickColor = BrickColor.new(tostring(BColor)),
652
    Name = Name,
653
    Size = Size,
654
    Material = Material
655
  })
656
  RemoveOutlines(Part)
657
  return Part
658
end
659
function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
660
  local Msh = Create(Mesh)({
661
    Parent = Part,
662
    Offset = OffSet,
663
    Scale = Scale
664
  })
665
  if Mesh == "SpecialMesh" then
666
    Msh.MeshType = MeshType
667
    Msh.MeshId = MeshId
668
  end
669
  return Msh
670
end
671
function CreateWeld(Parent, Part0, Part1, C0, C1)
672
  local Weld = Create("Weld")({
673
    Parent = Parent,
674
    Part0 = Part0,
675
    Part1 = Part1,
676
    C0 = C0,
677
    C1 = C1
678
  })
679
  return Weld
680
end
681
EffectModel = Instance.new("Model", char)
682
Effects = {
683
  Block = {
684
    Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
685
      local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
686
      prt.Anchored = true
687
      prt.CFrame = cframe
688
      local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
689
      game:GetService("Debris"):AddItem(prt, 10)
690
      if Type == 1 or Type == nil then
691
        table.insert(Effects, {
692
          prt,
693
          "Block1",
694
          delay,
695
          x3,
696
          y3,
697
          z3,
698
          msh
699
        })
700
      elseif Type == 2 then
701
        table.insert(Effects, {
702
          prt,
703
          "Block2",
704
          delay,
705
          x3,
706
          y3,
707
          z3,
708
          msh
709
        })
710
      else
711
        table.insert(Effects, {
712
          prt,
713
          "Block3",
714
          delay,
715
          x3,
716
          y3,
717
          z3,
718
          msh
719
        })
720
      end
721
    end
722
  },
723
  Sphere = {
724
    Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
725
      local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
726
      prt.Anchored = true
727
      prt.CFrame = cframe
728
      local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
729
      game:GetService("Debris"):AddItem(prt, 10)
730
      table.insert(Effects, {
731
        prt,
732
        "Cylinder",
733
        delay,
734
        x3,
735
        y3,
736
        z3,
737
        msh
738
      })
739
    end
740
  },
741
  Cylinder = {
742
    Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
743
      local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
744
      prt.Anchored = true
745
      prt.CFrame = cframe
746
      local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
747
      game:GetService("Debris"):AddItem(prt, 10)
748
      table.insert(Effects, {
749
        prt,
750
        "Cylinder",
751
        delay,
752
        x3,
753
        y3,
754
        z3,
755
        msh
756
      })
757
    end
758
  },
759
  Wave = {
760
    Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
761
      local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
762
      prt.Anchored = true
763
      prt.CFrame = cframe
764
      local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://431164262", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
765
      game:GetService("Debris"):AddItem(prt, 10)
766
      table.insert(Effects, {
767
        prt,
768
        "Cylinder",
769
        delay,
770
        x3 / 60,
771
        y3 / 60,
772
        z3 / 60,
773
        msh
774
      })
775
    end
776
  },
777
  Ring = {
778
    Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
779
      local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
780
      prt.Anchored = true
781
      prt.CFrame = cframe
782
      local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
783
      game:GetService("Debris"):AddItem(prt, 10)
784
      table.insert(Effects, {
785
        prt,
786
        "Cylinder",
787
        delay,
788
        x3,
789
        y3,
790
        z3,
791
        msh
792
      })
793
    end
794
  },
795
  Break = {
796
    Create = function(brickcolor, cframe, x1, y1, z1)
797
      local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
798
      prt.Anchored = true
799
      prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
800
      local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
801
      local num = math.random(10, 50) / 1000
802
      game:GetService("Debris"):AddItem(prt, 10)
803
      table.insert(Effects, {
804
        prt,
805
        "Shatter",
806
        num,
807
        prt.CFrame,
808
        math.random() - math.random(),
809
        0,
810
        math.random(50, 100) / 100
811
      })
812
    end
813
  }
814
}
815
function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
816
  local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
817
  prt.Anchored = true
818
  prt.CFrame = cframe
819
  local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
820
  game:GetService("Debris"):AddItem(prt, 10)
821
  if Type == 1 or Type == nil then
822
    table.insert(Effects, {
823
      prt,
824
      "Block1",
825
      delay,
826
      x3,
827
      y3,
828
      z3,
829
      msh
830
    })
831
  elseif Type == 2 then
832
    table.insert(Effects, {
833
      prt,
834
      "Block2",
835
      delay,
836
      x3,
837
      y3,
838
      z3,
839
      msh
840
    })
841
  elseif Type == 3 then
842
    table.insert(Effects, {
843
      prt,
844
      "Block3",
845
      delay,
846
      x3,
847
      y3,
848
      z3,
849
      msh
850
    })
851
  end
852
end
853
function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
854
  local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
855
  prt.Anchored = true
856
  prt.CFrame = cframe
857
  local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
858
  game:GetService("Debris"):AddItem(prt, 10)
859
  table.insert(Effects, {
860
    prt,
861
    "Cylinder",
862
    delay,
863
    x3,
864
    y3,
865
    z3,
866
    msh
867
  })
868
end
869
function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
870
  local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
871
  prt.Anchored = true
872
  prt.CFrame = cframe * CFrame.new(x1, y1, z1)
873
  local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
874
  game:GetService("Debris"):AddItem(prt, 10)
875
  table.insert(Effects, {
876
    prt,
877
    "Cylinder",
878
    delay,
879
    x3,
880
    y3,
881
    z3,
882
    msh
883
  })
884
end
885
function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
886
  local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
887
  prt.Anchored = true
888
  prt.CFrame = cframe
889
  local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
890
  game:GetService("Debris"):AddItem(prt, 10)
891
  table.insert(Effects, {
892
    prt,
893
    "Cylinder",
894
    delay,
895
    x3,
896
    y3,
897
    z3,
898
    msh
899
  })
900
end
901
function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
902
  local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
903
  prt.Anchored = true
904
  prt.CFrame = cframe
905
  local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
906
  game:GetService("Debris"):AddItem(prt, 10)
907
  table.insert(Effects, {
908
    prt,
909
    "Cylinder",
910
    delay,
911
    x3,
912
    y3,
913
    z3,
914
    msh
915
  })
916
end
917
function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
918
  local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
919
  prt.Anchored = true
920
  prt.CFrame = cframe
921
  local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
922
  game:GetService("Debris"):AddItem(prt, 10)
923
  table.insert(Effects, {
924
    prt,
925
    "Cylinder",
926
    delay,
927
    x3,
928
    y3,
929
    z3,
930
    msh
931
  })
932
end
933
function BreakEffect(brickcolor, cframe, x1, y1, z1)
934
  local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
935
  prt.Anchored = true
936
  prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
937
  local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
938
  local num = math.random(10, 50) / 1000
939
  game:GetService("Debris"):AddItem(prt, 10)
940
  table.insert(Effects, {
941
    prt,
942
    "Shatter",
943
    num,
944
    prt.CFrame,
945
    math.random() - math.random(),
946
    0,
947
    math.random(50, 100) / 100
948
  })
949
end
950
function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
951
local fp=Instance.new("Part")
952
fp.formFactor=formfactor 
953
fp.Parent=parent
954
fp.Reflectance=reflectance
955
fp.Transparency=transparency
956
fp.CanCollide=false 
957
fp.Locked=true
958
fp.BrickColor=brickcolor
959
fp.Name=name
960
fp.Size=size
961
fp.Position=tors.Position 
962
RemoveOutlines(fp)
963
fp.Material="SmoothPlastic"
964
fp:BreakJoints()
965
return fp 
966
end 
967
 
968
function mesh(Mesh,part,meshtype,meshid,offset,scale)
969
local mesh=Instance.new(Mesh) 
970
mesh.Parent=part
971
if Mesh=="SpecialMesh" then
972
mesh.MeshType=meshtype
973
if meshid~="nil" then
974
mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
975
end
976
end
977
mesh.Offset=offset
978
mesh.Scale=scale
979
return mesh
980
end
981
function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
982
local prt=part(3,char,0,0,brickcolor,"Effect",Vector3.new(0.5,0.5,0.5))
983
prt.Anchored=true
984
prt.Material = "Neon"
985
prt.CFrame=cframe
986
prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
987
msh=mesh("BlockMesh",prt,"","",Vector3.new(0,0,0),Vector3.new(x1,y1,z1))
988
game:GetService("Debris"):AddItem(prt,5)
989
coroutine.resume(coroutine.create(function(Part,Mesh) 
990
for i=0,1,delay do
991
swait()
992
Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
993
Part.Transparency=i
994
Mesh.Scale=Mesh.Scale+Vector3.new(x3,y3,z3)
995
end
996
Part.Parent=nil
997
end),prt,msh)
998
end
999
function MagicShockTrailAlt2(origcolor2,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
1000
local prt=part(3,char,0,0,origcolor2,"Effect",Vector3.new(0.5,0.5,0.5))
1001
prt.Anchored=true
1002
prt.Material = "Neon"
1003
prt.CFrame=cframe
1004
msh=mesh("BlockMesh",prt,"","",Vector3.new(0,0,0),Vector3.new(x1,y1,z1))
1005
game:GetService("Debris"):AddItem(prt,5)
1006
coroutine.resume(coroutine.create(function(Part,Mesh) 
1007
	local rtype = rottype
1008
for i=0,1,delay do
1009
swait()
1010
if rtype == 1 then
1011
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
1012
elseif rtype == 2 then
1013
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
1014
end
1015
prt.Transparency=i
1016
Mesh.Scale=Mesh.Scale+Vector3.new(x3,y3,z3)
1017
end
1018
Part.Parent=nil
1019
end),prt,msh)
1020
end
1021
1022
--[[
1023
		Thanks for using Build-To-Lua by jarredbcv.
1024
]]--
1025
1026
1027
New = function(Object, Parent, Name, Data)
1028
	local Object = Instance.new(Object)
1029
	for Index, Value in pairs(Data or {}) do
1030
		Object[Index] = Value
1031
	end
1032
	Object.Parent = Parent
1033
	Object.Name = Name
1034
	return Object
1035
end
1036
	
1037
Kunai = New("Model",char,"Kunai",{})
1038
Handle = New("Part",Kunai,"Handle",{BrickColor = BrickColor.new("Really red"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1, 0.800000012, 1),CFrame = CFrame.new(77.4998779, 0.800036013, -64.5, 0, 0, -1, 0, 1, -0, 1, 0, -0),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1, 0, 0),})
1039
Mesh = New("CylinderMesh",Handle,"Mesh",{Scale = Vector3.new(0.5, 1, 0.300000012),})
1040
Part = New("Part",Kunai,"Part",{BrickColor = BrickColor.new("Dark stone grey"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1, 0.800000012, 1),CFrame = CFrame.new(77.4998779, 1.60002196, -64.5, -0, 0, 1, -0, 1, 0, -1, 0, 0),Color = Color3.new(0.388235, 0.372549, 0.384314),})
1041
Mesh = New("SpecialMesh",Part,"Mesh",{Scale = Vector3.new(0.379999995, 1.29999995, 0.379999995),VertexColor = Vector3.new(5, 5, 5),MeshId = "http://www.roblox.com/Asset/?id=9756362",TextureId = "http://www.roblox.com/asset/?id=41938593",MeshType = Enum.MeshType.FileMesh,})
1042
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(0, 0.799985945, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0),})
1043
Part = New("Part",Kunai,"Part",{BrickColor = BrickColor.new("Dark stone grey"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1, 0.400000006, 1),CFrame = CFrame.new(77.4998779, 0.200001001, -64.5, 0, 0, 1, 0, -1, 0, 1, 0, 0),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
1044
Mesh = New("SpecialMesh",Part,"Mesh",{Scale = Vector3.new(0.400000006, 0.400000006, 1.5),VertexColor = Vector3.new(5, 5, 5),MeshId = "http://www.roblox.com/asset/?id=3270017",TextureId = "http://www.roblox.com/asset/?id=41938593",MeshType = Enum.MeshType.FileMesh,})
1045
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, -1, 0, 1, 0, 0),C1 = CFrame.new(0, -0.600035012, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0),})
1046
1047
Kunai2 = New("Model",char,"Kunai2",{})
1048
Handle2 = New("Part",Kunai2,"Handle2",{BrickColor = BrickColor.new("Really red"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1, 0.800000012, 1),CFrame = CFrame.new(77.4998779, 0.800036013, -64.5, 0, 0, -1, 0, 1, -0, 1, 0, -0),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1, 0, 0),})
1049
Mesh = New("CylinderMesh",Handle2,"Mesh",{Scale = Vector3.new(0.5, 1, 0.300000012),})
1050
Part = New("Part",Kunai2,"Part",{BrickColor = BrickColor.new("Dark stone grey"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1, 0.800000012, 1),CFrame = CFrame.new(77.4998779, 1.60002196, -64.5, -0, 0, 1, -0, 1, 0, -1, 0, 0),Color = Color3.new(0.388235, 0.372549, 0.384314),})
1051
Mesh = New("SpecialMesh",Part,"Mesh",{Scale = Vector3.new(0.379999995, 1.29999995, 0.379999995),VertexColor = Vector3.new(5, 5, 5),MeshId = "http://www.roblox.com/Asset/?id=9756362",TextureId = "http://www.roblox.com/asset/?id=41938593",MeshType = Enum.MeshType.FileMesh,})
1052
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle2,C0 = CFrame.new(0, 0, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0),C1 = CFrame.new(0, 0.799985945, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0),})
1053
Part = New("Part",Kunai2,"Part",{BrickColor = BrickColor.new("Dark stone grey"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(1, 0.400000006, 1),CFrame = CFrame.new(77.4998779, 0.200001001, -64.5, 0, 0, 1, 0, -1, 0, 1, 0, 0),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
1054
Mesh = New("SpecialMesh",Part,"Mesh",{Scale = Vector3.new(0.400000006, 0.400000006, 1.5),VertexColor = Vector3.new(5, 5, 5),MeshId = "http://www.roblox.com/asset/?id=3270017",TextureId = "http://www.roblox.com/asset/?id=41938593",MeshType = Enum.MeshType.FileMesh,})
1055
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle2,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, -1, 0, 1, 0, 0),C1 = CFrame.new(0, -0.600035012, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0),})
1056
1057
local NewInstance = function(instance,parent,properties)
1058
	local inst = Instance.new(instance,parent)
1059
	if(properties)then
1060
		for i,v in next, properties do
1061
			pcall(function() inst[i] = v end)
1062
		end
1063
	end
1064
	return inst;
1065
end
1066
local HW = NewInstance('Weld',char,{Part0=ra,Part1=Handle,C0 = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-65),0,math.rad(-90))})
1067
local HW2 = NewInstance('Weld',char,{Part0=la,Part1=Handle2,C0 = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-65),0,math.rad(90))})
1068
1069
Days = Instance.new("Sound",tors)
1070
Days.SoundId = "rbxassetid://398987889"
1071
Days.Volume = 1.5
1072
Days.Looped = true
1073
Days:Play()
1074
1075
function Jab()
1076
	attack=true
1077
	for i = 0,2,0.1 do
1078
		swait()
1079
		rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(90)),.3)
1080
tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-65)),.3)
1081
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(90)), 0.3)
1082
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
1083
HW.C0=clerp(HW.C0,cf(0,-1,0)*angles(math.rad(-180),math.rad(0),math.rad(0)),0.15)
1084
	end
1085
	attack=false
1086
end
1087
1088
mouse.KeyDown:connect(function(key)
1089
if key == 'r' and attack == false then
1090
	Jab()
1091
end
1092
end)
1093
------------------------------------
1094
mouse.KeyDown:connect(function(key)
1095
    if string.byte(key) == 48 then
1096
		Swing = 2
1097
        char.Humanoid.WalkSpeed = 50
1098
end
1099
end)
1100
1101
mouse.KeyUp:connect(function(key)
1102
    if string.byte(key) == 48 then
1103
		Swing = 1
1104
        char.Humanoid.WalkSpeed = 16
1105
end
1106
end)
1107
---------------------------------
1108
1109
local idle=0
1110
local sine = 0
1111
local change = 1
1112
local val = 0
1113
toim = 0
1114
hum.Animator.Parent = nil
1115
idleanim=.4
1116
while true do
1117
swait()
1118
sine = sine + change
1119
local torvel=(root.Velocity*Vector3.new(1,0,1)).magnitude 
1120
local velderp=root.Velocity.y
1121
hitfloor,posfloor=rayCast(root.Position,(CFrame.new(root.Position,root.Position - Vector3.new(0,1,0))).lookVector,4,char)
1122
if equipped==true or equipped==false then
1123
if attack==false then
1124
idle=idle+1
1125
else
1126
idle=0
1127
end
1128
if root.Velocity.y > 1 and hitfloor==nil then 
1129
Anim="Jump"
1130
if attack==false then
1131
rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
1132
tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
1133
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(20)), 0.3)
1134
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
1135
RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3)
1136
LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3)
1137
end
1138
elseif root.Velocity.y < -1 and hitfloor==nil then 
1139
Anim="Fall"
1140
if attack==false then
1141
RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3)
1142
LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3)
1143
rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
1144
tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(40),math.rad(0),math.rad(0)),.3)
1145
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(20)), 0.3)
1146
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
1147
end
1148
elseif torvel<1 and hitfloor~=nil then
1149
Anim="Idle"
1150
change = 2
1151
if attack==false then
1152
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(-45)),0.15)
1153
tors.Neck.C0=clerp(tors.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(45)),.3)
1154
RH.C0=clerp(RH.C0,cf(1,-0.9-0.1*math.cos(sine/20),0)*angles(math.rad(-2.5),math.rad(90),math.rad(-0))*angles(math.rad(-7.5),math.rad(0),math.rad(0)),0.15)
1155
LH.C0=clerp(LH.C0,cf(-1,-0.9-0.1*math.cos(sine/20),0)*angles(math.rad(-2.5),math.rad(-90),math.rad(-0))*angles(math.rad(-7.5),math.rad(0),math.rad(0)),0.15)
1156
RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5+0.04*math.sin(sine/25), -0.35) * angles(math.rad(90 - 1 * math.cos(sine / 25)), math.rad(0), math.rad(-50)), 0.1)
1157
LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5+0.04*math.sin(sine/25), -0.35) * angles(math.rad(55 - 1 * math.cos(sine / 25)), math.rad(-7), math.rad(70)), 0.1)
1158
HW.C0=clerp(HW.C0,cf(0,-1,0)*angles(math.rad(-65),math.rad(0),math.rad(-90)),0.15)
1159
HW2.C0=clerp(HW2.C0,cf(0,-1,0)*angles(math.rad(-65),math.rad(0),math.rad(90)),0.15)
1160
end
1161
elseif torvel>2 and torvel<22 and hitfloor~=nil then
1162
Anim="Walk"
1163
change = 1
1164
if attack==false then
1165
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)
1166
tors.Neck.C0 = clerp(tors.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
1167
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(40) * math.cos(sine / 7), math.rad(0), math.rad(5)), 0.3)
1168
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40) * math.cos(sine / 7), math.rad(0), math.rad(-5)), 0.3)
1169
RH.C0=clerp(RH.C0,cf(1,-0.925-0.5*math.cos(sine/7)/2,0.5*math.cos(sine/7)/2)*angles(math.rad(-5-15*math.cos(sine/7))+ -math.sin(sine/7)/1.5,math.rad(90-10*math.cos(sine/7)),math.rad(0)),0.15)
1170
LH.C0=clerp(LH.C0,cf(-1,-0.925+0.5*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/2)*angles(math.rad(-5+15*math.cos(sine/7))+ math.sin(sine/7)/1.5,math.rad(-90-10*math.cos(sine/7)),math.rad(0)),0.15)
1171
HW.C0=clerp(HW.C0,cf(0,-1,0)*angles(math.rad(-85),math.rad(0),math.rad(-180)),0.15)
1172
HW2.C0=clerp(HW2.C0,cf(0,-1,0)*angles(math.rad(-85),math.rad(0),math.rad(180)),0.15)
1173
end
1174
elseif torvel>=22 and hitfloor~=nil then
1175
Anim="Run"
1176
change = 2
1177
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(25),math.rad(0),math.rad(10*math.cos(sine/7))),0.15)
1178
tors.Neck.C0 = clerp(tors.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
1179
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(55), math.rad(-55), math.rad(90)), 0.3)
1180
LW.C0=clerp(LW.C0,cf(-0.85,0.5 + 0.1 * math.cos(sine / 60),-0.65)*angles(math.rad(40),math.rad(0),math.rad(90 + 2.5)),.3)
1181
RH.C0=clerp(RH.C0,cf(1,-0.925-0.5*math.cos(sine/7)/2,0.5*math.cos(sine/7)/1)*angles(math.rad(-5-15*math.cos(sine/7))+ -math.sin(sine/7)/1,math.rad(90-10*math.cos(sine/7)),math.rad(0)),0.15)
1182
LH.C0=clerp(LH.C0,cf(-1,-0.925+0.5*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/1)*angles(math.rad(-5+15*math.cos(sine/7))+ math.sin(sine/7)/1,math.rad(-90-10*math.cos(sine/7)),math.rad(0)),0.15)
1183
HW.C0=clerp(HW.C0,cf(0,-1,0)*angles(math.rad(-65),math.rad(0),math.rad(-90)),0.15)
1184
HW2.C0=clerp(HW2.C0,cf(0,-1,0)*angles(math.rad(-65),math.rad(0),math.rad(90)),0.15)
1185
end
1186
end
1187
if 0 < #Effects then
1188
    for e = 1, #Effects do
1189
      if Effects[e] ~= nil then
1190
        local Thing = Effects[e]
1191
        if Thing ~= nil then
1192
          local Part = Thing[1]
1193
          local Mode = Thing[2]
1194
          local Delay = Thing[3]
1195
          local IncX = Thing[4]
1196
          local IncY = Thing[5]
1197
          local IncZ = Thing[6]
1198
          if 1 >= Thing[1].Transparency then
1199
            if Thing[2] == "Block1" then
1200
              Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1201
              local Mesh = Thing[1].Mesh
1202
              Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1203
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1204
            elseif Thing[2] == "Block2" then
1205
              Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0)
1206
              local Mesh = Thing[7]
1207
              Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1208
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1209
            elseif Thing[2] == "Block3" then
1210
              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)
1211
              local Mesh = Thing[7]
1212
              Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1213
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1214
            elseif Thing[2] == "Cylinder" then
1215
              local Mesh = Thing[1].Mesh
1216
              Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1217
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1218
            elseif Thing[2] == "Blood" then
1219
              local Mesh = Thing[7]
1220
              Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
1221
              Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1222
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1223
            elseif Thing[2] == "Elec" then
1224
              local Mesh = Thing[1].Mesh
1225
              Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
1226
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1227
            elseif Thing[2] == "Disappear" then
1228
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1229
            elseif Thing[2] == "Shatter" then
1230
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1231
              Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
1232
              Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
1233
              Thing[6] = Thing[6] + Thing[5]
1234
            end
1235
          else
1236
            Part.Parent = nil
1237
            table.remove(Effects, e)
1238
          end
1239
        end
1240
      end
1241
    end
1242
  end
1243
end