View difference between Paste ID: tCZKvm66 and 7vqwBrSM
SHOW: | | - or go back to the newest paste.
1
--https://github.com/Mokiros/roblox-FE-compatibility
2
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
3
local Player,game,owner = owner,game
4
local RealPlayer = Player
5
do
6
	print("FE Compatibility code V2 by Mokiros")
7
	local RealPlayer = RealPlayer
8
	script.Parent = RealPlayer.Character
9
10
	--Fake event to make stuff like Mouse.KeyDown work
11
	local Disconnect_Function = function(this)
12
		this[1].Functions[this[2]] = nil
13
	end
14
	local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
15
	local FakeEvent_Metatable = {__index={
16
		Connect = function(this,f)
17
			local i = tostring(math.random(0,10000))
18
			while this.Functions[i] do
19
				i = tostring(math.random(0,10000))
20
			end
21
			this.Functions[i] = f
22
			return setmetatable({this,i},Disconnect_Metatable)
23
		end
24
	}}
25
	FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
26
	local function fakeEvent()
27
		return setmetatable({Functions={}},FakeEvent_Metatable)
28
	end
29
30
	--Creating fake input objects with fake variables
31
    local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
32
    FakeMouse.keyUp = FakeMouse.KeyUp
33
    FakeMouse.keyDown = FakeMouse.KeyDown
34
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
35
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
36
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
37
	end}
38
	--Merged 2 functions into one by checking amount of arguments
39
	CAS.UnbindAction = CAS.BindAction
40
41
	--This function will trigger the events that have been :Connect()'ed
42
	local function TriggerEvent(self,ev,...)
43
		for _,f in pairs(self[ev].Functions) do
44
			f(...)
45
		end
46
	end
47
	FakeMouse.TriggerEvent = TriggerEvent
48
	UIS.TriggerEvent = TriggerEvent
49
50
	--Client communication
51
	local Event = Instance.new("RemoteEvent")
52
	Event.Name = "UserInput_Event"
53
	Event.OnServerEvent:Connect(function(plr,io)
54
	    if plr~=RealPlayer then return end
55
		FakeMouse.Target = io.Target
56
		FakeMouse.Hit = io.Hit
57
		if not io.isMouse then
58
			local b = io.UserInputState == Enum.UserInputState.Begin
59
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
60
				return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
61
			end
62
			if io.UserInputType == Enum.UserInputType.MouseButton2 then
63
				return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
64
			end
65
			for _,t in pairs(CAS.Actions) do
66
				for _,k in pairs(t.Keys) do
67
					if k==io.KeyCode then
68
						t.Function(t.Name,io.UserInputState,io)
69
					end
70
				end
71
			end
72
			FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
73
			UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
74
	    end
75
	end)
76
	Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
77
	local Mouse = owner:GetMouse()
78
	local UIS = game:GetService("UserInputService")
79
	local input = function(io,RobloxHandled)
80
		if RobloxHandled then return end
81
		--Since InputObject is a client-side instance, we create and pass table instead
82
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
83
	end
84
	UIS.InputBegan:Connect(input)
85
	UIS.InputEnded:Connect(input)
86
87
	local h,t
88
	--Give the server mouse data every second frame, but only if the values changed
89
	--If player is not moving their mouse, client won't fire events
90
	local HB = game:GetService("RunService").Heartbeat
91
	while true do
92
		if h~=Mouse.Hit or t~=Mouse.Target then
93
			h,t=Mouse.Hit,Mouse.Target
94
			Event:FireServer({isMouse=true,Target=t,Hit=h})
95
		end
96
		--Wait 2 frames
97
		for i=1,2 do
98
			HB:Wait()
99
		end
100
	end]==],script)
101
102
	----Sandboxed game object that allows the usage of client-side methods and services
103
	--Real game object
104
	local RealGame = game
105
106
	--Metatable for fake service
107
	local FakeService_Metatable = {
108
		__index = function(self,k)
109
			local s = rawget(self,"_RealService")
110
			if s then
111
				return typeof(s[k])=="function"
112
				and function(_,...)return s[k](s,...)end or s[k]
113
			end
114
		end,
115
		__newindex = function(self,k,v)
116
			local s = rawget(self,"_RealService")
117
			if s then s[k]=v end
118
		end
119
	}
120
	local function FakeService(t,RealService)
121
		t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
122
		return setmetatable(t,FakeService_Metatable)
123
	end
124
125
	--Fake game object
126
	local FakeGame = {
127
		GetService = function(self,s)
128
			return rawget(self,s) or RealGame:GetService(s)
129
		end,
130
		Players = FakeService({
131
			LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
132
		},"Players"),
133
		UserInputService = FakeService(UIS,"UserInputService"),
134
		ContextActionService = FakeService(CAS,"ContextActionService"),
135
		RunService = FakeService({
136
			_btrs = {},
137
			RenderStepped = RealGame:GetService("RunService").Heartbeat,
138
			BindToRenderStep = function(self,name,_,fun)
139
				self._btrs[name] = self.Heartbeat:Connect(fun)
140
			end,
141
			UnbindFromRenderStep = function(self,name)
142
				self._btrs[name]:Disconnect()
143
			end,
144
		},"RunService")
145
	}
146
	rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
147
	FakeGame.service = FakeGame.GetService
148
	FakeService(FakeGame,game)
149
	--Changing owner to fake player object to support owner:GetMouse()
150
	game,owner = FakeGame,FakeGame.Players.LocalPlayer
151
end
152
153
wait(0.2)
154
155
--//====================================================\\--
156
--||			   CREATED BY SHACKLUSTER
157
--\\====================================================//--
158
159
Class_Name=string.reverse"ihS-ihS yB tidE "
160
161
wait(0.2)
162
163
164
Bonniee = Instance.new("ForceField", game.Players.LocalPlayer.Character)
165
Bonniee.Visible = false
166
local nel = game.Players.LocalPlayer.Character.Humanoid
167
nel.MaxHealth = math.huge
168
Player = game:GetService("Players").LocalPlayer
169
PlayerGui = Player.PlayerGui
170
Cam = workspace.CurrentCamera
171
Backpack = Player.Backpack
172
Character = Player.Character
173
Humanoid = Character.Humanoid
174
Mouse = Player:GetMouse()
175
RootPart = Character["HumanoidRootPart"]
176
Torso = Character["Torso"]
177
Head = Character["Head"]
178
RightArm = Character["Right Arm"]
179
LeftArm = Character["Left Arm"]
180
RightLeg = Character["Right Leg"]
181
LeftLeg = Character["Left Leg"]
182
RootJoint = RootPart["RootJoint"]
183
Neck = Torso["Neck"]
184
RightShoulder = Torso["Right Shoulder"]
185
LeftShoulder = Torso["Left Shoulder"]
186
RightHip = Torso["Right Hip"]
187
LeftHip = Torso["Left Hip"]
188
189
IT = Instance.new
190
CF = CFrame.new
191
VT = Vector3.new
192
RAD = math.rad
193
C3 = Color3.new
194
UD2 = UDim2.new
195
BRICKC = BrickColor.new
196
ANGLES = CFrame.Angles
197
EULER = CFrame.fromEulerAnglesXYZ
198
COS = math.cos
199
ACOS = math.acos
200
SIN = math.sin
201
ASIN = math.asin
202
ABS = math.abs
203
MRANDOM = math.random
204
FLOOR = math.floor
205
206
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
207
	local NEWMESH = IT(MESH)
208
	if MESH == "SpecialMesh" then
209
		NEWMESH.MeshType = MESHTYPE
210
		if MESHID ~= "nil" and MESHID ~= "" then
211
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
212
		end
213
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
214
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
215
		end
216
	end
217
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
218
	NEWMESH.Scale = SCALE
219
	NEWMESH.Parent = PARENT
220
	return NEWMESH
221
end
222
223
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
224
	local NEWPART = IT("Part")
225
	NEWPART.formFactor = FORMFACTOR
226
	NEWPART.Reflectance = REFLECTANCE
227
	NEWPART.Transparency = TRANSPARENCY
228
	NEWPART.CanCollide = false
229
	NEWPART.Locked = true
230
	NEWPART.Anchored = true
231
	if ANCHOR == false then
232
		NEWPART.Anchored = false
233
	end
234
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
235
	NEWPART.Name = NAME
236
	NEWPART.Size = SIZE
237
	NEWPART.Position = Torso.Position
238
	NEWPART.Material = MATERIAL
239
	NEWPART:BreakJoints()
240
	NEWPART.Parent = PARENT
241
	return NEWPART
242
end
243
244
--//=================================\\
245
--||		  CUSTOMIZATION
246
--\\=================================//
247
248
warn(Class_Name.." #4817")
249
Player_Size = 1 --Size of the player.
250
Animation_Speed = 3
251
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
252
253
local Speed = 16
254
local Effects2 = {}
255
256
--//=================================\\
257
--|| 	  END OF CUSTOMIZATION
258
--\\=================================//
259
260
	local function weldBetween(a, b)
261
	    local weldd = Instance.new("ManualWeld")
262
	    weldd.Part0 = a
263
	    weldd.Part1 = b
264
	    weldd.C0 = CFrame.new()
265
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
266
	    weldd.Parent = a
267
	    return weldd
268
	end
269
270
--//=================================\\
271
--|| 	      USEFUL VALUES
272
--\\=================================//
273
274
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
275
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
276
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
277
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
278
local CHANGEDEFENSE = 0
279
local CHANGEDAMAGE = 0
280
local CHANGEMOVEMENT = 0
281
local ANIM = "Idle"
282
local ATTACK = false
283
local EQUIPPED = false
284
local HOLD = false
285
local COMBO = 1
286
local Rooted = false
287
local SINE = 0
288
local KEYHOLD = false
289
local CHANGE = 2 / Animation_Speed
290
local WALKINGANIM = false
291
local WALK = 0
292
local VALUE1 = false
293
local VALUE2 = false
294
local ROBLOXIDLEANIMATION = IT("Animation")
295
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
296
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
297
--ROBLOXIDLEANIMATION.Parent = Humanoid
298
local WEAPONGUI = IT("ScreenGui", PlayerGui)
299
WEAPONGUI.Name = "Weapon GUI"
300
local Weapon = IT("Model")
301
Weapon.Name = "Adds"
302
local Effects = IT("Folder", Weapon)
303
Effects.Name = "Effects"
304
local ANIMATOR = Humanoid.Animator
305
local ANIMATE = Character.Animate
306
local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
307
local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
308
local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
309
local HITBLOCKSOUNDS = {"199148933", "199148947"}
310
local UNANCHOR = true
311
312
local SKILLTEXTCOLOR = C3(0,0,0)
313
314
local SONGS = {"1113734859","203547439","1343405182","1183179337","946737865","1110421128"}
315
local SONGPLAYING = false
316
local SELECTEDSONG = 1
317
318
--//=================================\\
319
--\\=================================//
320
321
322
--//=================================\\
323
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
324
--\\=================================//
325
326
ArtificialHB = Instance.new("BindableEvent", script)
327
ArtificialHB.Name = "ArtificialHB"
328
329
script:WaitForChild("ArtificialHB")
330
331
frame = Frame_Speed
332
tf = 0
333
allowframeloss = false
334
tossremainder = false
335
lastframe = tick()
336
script.ArtificialHB:Fire()
337
338
game:GetService("RunService").Heartbeat:connect(function(s, p)
339
	tf = tf + s
340
	if tf >= frame then
341
		if allowframeloss then
342
			script.ArtificialHB:Fire()
343
			lastframe = tick()
344
		else
345
			for i = 1, math.floor(tf / frame) do
346
				script.ArtificialHB:Fire()
347
			end
348
		lastframe = tick()
349
		end
350
		if tossremainder then
351
			tf = 0
352
		else
353
			tf = tf - frame * math.floor(tf / frame)
354
		end
355
	end
356
end)
357
358
--//=================================\\
359
--\\=================================//
360
361
362
363
364
365
--//=================================\\
366
--|| 	      SOME FUNCTIONS
367
--\\=================================//
368
369
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
370
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
371
end
372
373
function PositiveAngle(NUMBER)
374
	if NUMBER >= 0 then
375
		NUMBER = 0
376
	end
377
	return NUMBER
378
end
379
380
function NegativeAngle(NUMBER)
381
	if NUMBER <= 0 then
382
		NUMBER = 0
383
	end
384
	return NUMBER
385
end
386
387
function Swait(NUMBER)
388
	if NUMBER == 0 or NUMBER == nil then
389
		ArtificialHB.Event:wait()
390
	else
391
		for i = 1, NUMBER do
392
			ArtificialHB.Event:wait()
393
		end
394
	end
395
end
396
397
function QuaternionFromCFrame(cf)
398
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
399
	local trace = m00 + m11 + m22
400
	if trace > 0 then 
401
		local s = math.sqrt(1 + trace)
402
		local recip = 0.5 / s
403
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
404
	else
405
		local i = 0
406
		if m11 > m00 then
407
			i = 1
408
		end
409
		if m22 > (i == 0 and m00 or m11) then
410
			i = 2
411
		end
412
		if i == 0 then
413
			local s = math.sqrt(m00 - m11 - m22 + 1)
414
			local recip = 0.5 / s
415
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
416
		elseif i == 1 then
417
			local s = math.sqrt(m11 - m22 - m00 + 1)
418
			local recip = 0.5 / s
419
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
420
		elseif i == 2 then
421
			local s = math.sqrt(m22 - m00 - m11 + 1)
422
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
423
		end
424
	end
425
end
426
 
427
function QuaternionToCFrame(px, py, pz, x, y, z, w)
428
	local xs, ys, zs = x + x, y + y, z + z
429
	local wx, wy, wz = w * xs, w * ys, w * zs
430
	local xx = x * xs
431
	local xy = x * ys
432
	local xz = x * zs
433
	local yy = y * ys
434
	local yz = y * zs
435
	local zz = z * zs
436
	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))
437
end
438
 
439
function QuaternionSlerp(a, b, t)
440
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
441
	local startInterp, finishInterp;
442
	if cosTheta >= 0.0001 then
443
		if (1 - cosTheta) > 0.0001 then
444
			local theta = ACOS(cosTheta)
445
			local invSinTheta = 1 / SIN(theta)
446
			startInterp = SIN((1 - t) * theta) * invSinTheta
447
			finishInterp = SIN(t * theta) * invSinTheta
448
		else
449
			startInterp = 1 - t
450
			finishInterp = t
451
		end
452
	else
453
		if (1 + cosTheta) > 0.0001 then
454
			local theta = ACOS(-cosTheta)
455
			local invSinTheta = 1 / SIN(theta)
456
			startInterp = SIN((t - 1) * theta) * invSinTheta
457
			finishInterp = SIN(t * theta) * invSinTheta
458
		else
459
			startInterp = t - 1
460
			finishInterp = t
461
		end
462
	end
463
	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
464
end
465
466
function Clerp(a, b, t)
467
	local qa = {QuaternionFromCFrame(a)}
468
	local qb = {QuaternionFromCFrame(b)}
469
	local ax, ay, az = a.x, a.y, a.z
470
	local bx, by, bz = b.x, b.y, b.z
471
	local _t = 1 - t
472
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
473
end
474
475
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
476
	local frame = IT("Frame")
477
	frame.BackgroundTransparency = TRANSPARENCY
478
	frame.BorderSizePixel = BORDERSIZEPIXEL
479
	frame.Position = POSITION
480
	frame.Size = SIZE
481
	frame.BackgroundColor3 = COLOR
482
	frame.BorderColor3 = BORDERCOLOR
483
	frame.Name = NAME
484
	frame.Parent = PARENT
485
	return frame
486
end
487
488
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
489
	local label = IT("TextLabel")
490
	label.BackgroundTransparency = 1
491
	label.Size = UD2(1, 0, 1, 0)
492
	label.Position = UD2(0, 0, 0, 0)
493
	label.TextColor3 = TEXTCOLOR
494
	label.TextStrokeTransparency = STROKETRANSPARENCY
495
	label.TextTransparency = TRANSPARENCY
496
	label.FontSize = TEXTFONTSIZE
497
	label.Font = TEXTFONT
498
	label.BorderSizePixel = BORDERSIZEPIXEL
499
	label.TextScaled = false
500
	label.Text = TEXT
501
	label.Name = NAME
502
	label.Parent = PARENT
503
	return label
504
end
505
506
function NoOutlines(PART)
507
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
508
end
509
510
511
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
512
	local NEWWELD = IT(TYPE)
513
	NEWWELD.Part0 = PART0
514
	NEWWELD.Part1 = PART1
515
	NEWWELD.C0 = C0
516
	NEWWELD.C1 = C1
517
	NEWWELD.Parent = PARENT
518
	return NEWWELD
519
end
520
521
function CreateSound(ID, PARENT, VOLUME, PITCH, DEBRISTIME)
522
	local NEWSOUND = nil
523
	coroutine.resume(coroutine.create(function()
524
		NEWSOUND = IT("Sound", PARENT)
525
		NEWSOUND.Volume = VOLUME
526
		NEWSOUND.Pitch = PITCH
527
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
528
		Swait()
529
		NEWSOUND:play()
530
		NEWSOUND.Name = "Audio"
531
		if DEBRISTIME ~= nil then
532
			game:GetService("Debris"):AddItem(NEWSOUND, DEBRISTIME)
533
		end
534
	end))
535
	return NEWSOUND
536
end
537
538
function CFrameFromTopBack(at, top, back)
539
	local right = top:Cross(back)
540
	return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
541
end
542
543
function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW)
544
	local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(1,1,1), true)
545
	local mesh = CreateMesh("SpecialMesh", wave, "Sphere", "", "", SIZE, VT(0,0,0))
546
	wave.CFrame = CFRAME
547
	coroutine.resume(coroutine.create(function(PART)
548
		for i = 1, WAIT do
549
			Swait()
550
			mesh.Scale = mesh.Scale + GROW
551
			wave.Transparency = wave.Transparency + (1/WAIT)
552
			if wave.Transparency > 0.99 then
553
				wave:remove()
554
			end
555
		end
556
	end))
557
end
558
559
function MagicBlock(SIZE,WAIT,CFRAME,COLOR,GROW)
560
	local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(SIZE,SIZE,SIZE), true)
561
	local mesh = IT("BlockMesh",wave)
562
	wave.CFrame = CFRAME
563
	coroutine.resume(coroutine.create(function(PART)
564
		for i = 1, WAIT do
565
			Swait()
566
			mesh.Scale = mesh.Scale + GROW
567
			wave.CFrame = CFRAME * ANGLES(RAD(math.random(-360,360)),RAD(math.random(-360,360)),RAD(math.random(-360,360)))
568
			wave.Transparency = wave.Transparency + (1/WAIT)
569
			if wave.Transparency > 0.99 then
570
				wave:remove()
571
			end
572
		end
573
	end))
574
end
575
576
function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
577
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true)
578
	local mesh = nil
579
	if KIND == "Base" then
580
 		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
581
	elseif KIND == "Thin" then
582
 		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
583
	elseif KIND == "Round" then
584
 		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
585
	end
586
	wave.CFrame = CFRAME
587
	coroutine.resume(coroutine.create(function(PART)
588
		for i = 1, WAIT do
589
			Swait()
590
			mesh.Scale = mesh.Scale + GROW/10
591
			wave.Transparency = wave.Transparency + (0.5/WAIT)
592
			if wave.Transparency > 0.99 then
593
				wave:remove()
594
			end
595
		end
596
	end))
597
end
598
599
function MakeForm(PART,TYPE)
600
	if TYPE == "Cyl" then
601
		local MSH = IT("CylinderMesh",PART)
602
	elseif TYPE == "Ball" then
603
		local MSH = IT("SpecialMesh",PART)
604
		MSH.MeshType = "Sphere"
605
	elseif TYPE == "Wedge" then
606
		local MSH = IT("SpecialMesh",PART)
607
		MSH.MeshType = "Wedge"
608
	end
609
end
610
611
function CheckTableForString(Table, String)
612
	for i, v in pairs(Table) do
613
		if string.find(string.lower(String), string.lower(v)) then
614
			return true
615
		end
616
	end
617
	return false
618
end
619
620
function CheckIntangible(Hit)
621
	local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
622
	if Hit and Hit.Parent then
623
		if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
624
			return true
625
		end
626
	end
627
	return false
628
end
629
630
Debris = game:GetService("Debris")
631
632
function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
633
	local Direction = CFrame.new(StartPos, Vec).lookVector
634
	local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
635
	local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
636
	if RayHit and CheckIntangible(RayHit) then
637
		if DelayIfHit then
638
			wait()
639
		end
640
		RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
641
	end
642
	return RayHit, RayPos, RayNormal
643
end
644
645
function turnto(position)
646
	RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
647
end
648
649
--//=================================\\
650
--||	     WEAPON CREATION
651
--\\=================================//
652
653
654
for _, c in pairs(Weapon:GetChildren()) do
655
	if c.ClassName == "Part" then
656
		c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
657
	end
658
end
659
660
local Radio = CreatePart(1, Weapon, "Marble", 0, 0, "Pearl", "RAD-io", VT(.1,0.2,0.1),false)
661
CreateWeldOrSnapOrMotor("Weld", Radio, Torso, Radio, CF(0, 0, 1) * ANGLES(RAD(0), RAD(180), RAD(45)), CF(0, 0, 0))
662
local RADIOMESH = CreateMesh("SpecialMesh", Radio, "FileMesh", "1082816", "2766467", VT(1,1,1), VT(0,0,0))
663
664
Weapon.Parent = Character
665
666
Humanoid.Died:connect(function()
667
	ATTACK = true
668
end)
669
670
local SKILL1FRAME = CreateFrame(WEAPONGUI, 1 , 2, UD2(0.10, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
671
local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.60, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
672
local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23, 0, 0.93, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
673
local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50, 0, 0.93, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
674
675
local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] sitt", SKILLTEXTCOLOR, 8, "Cartoon", 0, 2, 1, "Text 1")
676
local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Wut", SKILLTEXTCOLOR, 8, "Cartoon", 0, 2, 1, "Text 2")
677
local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Toggle Radio (Open,off)", SKILLTEXTCOLOR, 8, "Cartoon", 0, 2, 1, "Text 3")
678
local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Change song", SKILLTEXTCOLOR, 8, "Cartoon", 0, 2, 1, "Text 4")
679
680
local INFOFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
681
local INFOTEXT = CreateLabel(INFOFRAME, "Say 'AddSong:ID' to add da song", SKILLTEXTCOLOR, 6, "SciFi", 0, 2, 1, "Text HA")
682
683
local INFOFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.1, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
684
local INFOTEXT = CreateLabel(INFOFRAME, "Say 'RSong:Number' to remove da song", SKILLTEXTCOLOR, 6, "SciFi", 0, 2, 1, "Text HA")
685
686
687
--//=================================\\
688
--||	ATTACK FUNCTIONS AND STUFF
689
--\\=================================//
690
691
function onChatted(msg)
692
	if msg:sub(1,8) == "AddSong:" then
693
		local ID = msg:sub(9)
694
		table.insert(SONGS,ID)
695
		SELECTEDSONG = #SONGS
696
	end
697
	if msg:sub(1,11) == "RemoveSong:" then
698
		local ID = msg:sub(12)
699
		if ID <= #SONGS then
700
			table.remove(SONGS,ID)
701
		end
702
	end
703
end
704
Player.Chatted:connect(onChatted)
705
function sitt()
706
	local SITT = CreateSound("188959311", Torso, 0.8, 1, 30)
707
	ATTACK = true
708
	repeat Swait() until SITT.TimePosition > .1
709
	VALUE1 = true
710
	ATTACK = false
711
end
712
713
function mostworryingindeed()
714
	ATTACK = true
715
	VALUE2 = true
716
	CreateSound("188959311", Torso, 10, 1, 6)
717
	for i = 1, 35 do
718
		Swait()
719
		RightArm.Transparency = RightArm.Transparency + 1/35
720
		LeftArm.Transparency = LeftArm.Transparency + 1/35
721
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(150, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
722
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-150, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
723
	end
724
	for i = 1, 150 do
725
		Swait()
726
		RightArm.Transparency = RightArm.Transparency - 1/100
727
		LeftArm.Transparency = LeftArm.Transparency - 1/100
728
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.2, 1, -0.1) * ANGLES(RAD(155), RAD(-25), RAD(-12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
729
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.2, 1, -0.1) * ANGLES(RAD(155), RAD(25), RAD(12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
730
	end
731
	RightArm.Transparency = 0
732
	LeftArm.Transparency = 0
733
	local SITT = CreateSound("501536185", Torso, 10, 1, 6)
734
	Swait(2)
735
	repeat Swait() until SITT.Playing == false
736
	VALUE2 = false
737
	ATTACK = false
738
end
739
740
--//=================================\\
741
--||	  ASSIGN THINGS TO KEYS
742
--\\=================================//
743
744
function MouseDown(Mouse)
745
	if ATTACK == false then
746
	end
747
end
748
749
function MouseUp(Mouse)
750
HOLD = false
751
end
752
753
function KeyDown(Key)
754
	KEYHOLD = true
755
	if Key == "z" and ATTACK == false then
756
		if VALUE1 == false then
757
			sitt()
758
		else
759
			VALUE1 = false
760
		end
761
	end
762
763
	if Key == "b" and ATTACK == false then
764
		mostworryingindeed()
765
	end
766
767
	if Key == "c" and ATTACK == false then
768
		if SONGPLAYING == false then
769
			SONGPLAYING = true
770
			local SONG = CreateSound(SONGS[SELECTEDSONG], Radio, 10, 1, nil)
771
			SONG.Looped = true
772
		else
773
			if Radio:FindFirstChild("Audio") then
774
				Radio.Audio:remove()
775
			end
776
			SONGPLAYING = false
777
		end
778
	end
779
780
	if Key == "v" and ATTACK == false then
781
		SELECTEDSONG = SELECTEDSONG + 1
782
	end
783
end
784
785
function KeyUp(Key)
786
	KEYHOLD = false
787
end
788
789
	Mouse.Button1Down:connect(function(NEWKEY)
790
		MouseDown(NEWKEY)
791
	end)
792
	Mouse.Button1Up:connect(function(NEWKEY)
793
		MouseUp(NEWKEY)
794
	end)
795
	Mouse.KeyDown:connect(function(NEWKEY)
796
		KeyDown(NEWKEY)
797
	end)
798
	Mouse.KeyUp:connect(function(NEWKEY)
799
		KeyUp(NEWKEY)
800
	end)
801
802
--//=================================\\
803
--\\=================================//
804
805
806
function unanchor()
807
	if UNANCHOR == true then
808
		g = Character:GetChildren()
809
		for i = 1, #g do
810
			if g[i].ClassName == "Part" then
811
				g[i].Anchored = false
812
			end
813
		end
814
	end
815
end
816
817
818
--//=================================\\
819
--||	WRAP THE WHOLE SCRIPT UP
820
--\\=================================//
821
822
Humanoid.Changed:connect(function(Jump)
823
	if Jump == "Jump" and (Disable_Jump == true) then
824
		Humanoid.Jump = false
825
	end
826
end)
827
828
while true do
829
	Swait()
830
	ANIMATE.Parent = nil
831
	local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
832
	IDLEANIMATION:Play()
833
	SINE = SINE + CHANGE
834
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
835
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
836
	local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
837
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
838
	local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
839
	if VALUE1 == false then
840
		if VALUE2 == false then
841
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
842
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
843
		end
844
		HipHeight = 3
845
		Rooted = false
846
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 1 + 0.35 * COS(SINE / 42)) * ANGLES(RAD(-25), RAD(0), RAD(0)), 0.15 / Animation_Speed)
847
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
848
		RightHip.C0 = Clerp(RightHip.C0, CF(1, 0, -1) * ANGLES(RAD(-25), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
849
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(-25), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
850
	else
851
		if VALUE2 == false then
852
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0, 0) * ANGLES(RAD(-25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
853
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0, 0) * ANGLES(RAD(-25), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed)
854
		end
855
		Rooted = true
856
		HipHeight = 0
857
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1.5) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed)
858
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
859
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(75), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed)
860
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(75), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1/ Animation_Speed)
861
	end
862
	unanchor()
863
	Humanoid.MaxHealth = "inf"
864
	Humanoid.Health = "inf"
865
	if Rooted == false then
866
		Disable_Jump = false
867
		Humanoid.WalkSpeed = Speed
868
	elseif Rooted == true then
869
		Disable_Jump = true
870
		Humanoid.WalkSpeed = 0
871
	end
872
	if SELECTEDSONG > #SONGS then
873
		SELECTEDSONG = 1
874
	end
875
	if SONGPLAYING == true then
876
		local SONG = Radio:FindFirstChild("Audio")
877
		if SONG ~= nil then
878
			SONG.Playing = true
879
			if SONG.SoundId ~= "rbxassetid://"..SONGS[SELECTEDSONG] then
880
				SONG.SoundId = "rbxassetid://"..SONGS[SELECTEDSONG]
881
				SONG:Play()
882
			end
883
			RADIOMESH.Scale = VT(3,3,3)+(VT(1,1,1)*SONG.PlaybackLoudness/100)
884
		end
885
	else
886
		RADIOMESH.Scale = VT(3,3,3)
887
	end
888
end
889
890
--//=================================\\
891
--\\=================================//
892
893
894
895
896
897
--//====================================================\\--
898
--||			  		 END OF SCRIPT
899
--\\====================================================//--