View difference between Paste ID: Wb6AcA6E and 4gQfVvuR
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
local RealPlayer = Player
4
do print("FE Compatibility code by Mokiros");InternalData = {}InternalData.RealOwner = owner;InternalData.RealObjs = {};InternalData.SoundLoudness = {};local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer
5
	script.Parent = InternalData.RealOwner.Character
6
	local Event = Instance.new("RemoteEvent");Event.Name = "UserInput";InternalData.Event = Event
7
	local function createObject (connections, index)
8
    	local proxy = newproxy (true);local meta = getmetatable (proxy);
9
    	local runbind = function (self, i, ...) connections[i]:Fire (...); end;
10
		while (#connections > 0) do connections[table.remove(connections, 1)] = Instance.new ('BindableEvent');end;
11
    	meta.__index = function (self, i)
12
        	if (i == 'TriggerEvent') then return runbind end;
13
        	return connections[i] and connections[i].Event or index[i];
14
    	end;
15
    	meta.__newindex = index;meta.__metatable = false;return proxy
16
	end;
17
	local Mouse = createObject({"KeyUp","KeyDown","Button1Down","Button1Up"},{["Target"] = nil;["Hit"] = CFrame.new()})
18
	local UserInputService = createObject({"InputBegan","InputEnded"},{})
19
	local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
20
		self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
21
	end};ContextActionService.UnBindAction = ContextActionService.BindAction
22
	Event.OnServerEvent:Connect(function(FiredBy,Input)
23
		if FiredBy ~= InternalData.RealOwner then return end
24
		if Input.MouseEvent then
25
			Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
26
		elseif Input.Sound then
27
			if InternalData.SoundLoudness[Input.Sound] then InternalData.SoundLoudness[Input.Sound] = Input.Loudness end
28
		else
29
			local Begin = Input.UserInputState == Enum.UserInputState.Begin
30
			if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TriggerEvent(Begin and "Button1Down" or "Button1Up") end
31
			for _,Action in pairs(ContextActionService.Actions) do
32
				for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
33
			end
34
			Mouse:TriggerEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower());UserInputService:TriggerEvent(Begin and "InputBegan" or "InputEnded",Input,false)
35
		end
36
	end)
37
	InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
38
	Event.Parent = NLS([[
39
		local Player = owner;
40
		local Sounds = {};
41
		local Event = script:WaitForChild("UserInput");
42
		local UserInputService = game:GetService("UserInputService");
43
		local Mouse = Player:GetMouse();
44
		local Input = function(Input,gameProcessedEvent)
45
			if gameProcessedEvent then return end
46
			Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
47
		end
48
		Event.OnClientEvent:connect(function(Args)
49
			if Args[1] == "NewSound" then table.insert(Sounds,Args[2]) end
50
		end)
51
		UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
52
		local Hit,Target
53
		while wait(1/30) do
54
			for x,Sound in pairs(Sounds) do
55
				if Sound.Parent then Event:FireServer({["Sound"]=Sound,["Loudness"]=Sound.PlaybackLoudness}) end
56
			end
57
			if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
58
				Hit = Mouse.Hit;Target = Mouse.Target;
59
				Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
60
			end
61
		end
62
	]],InternalData.RealOwner.Character)
63
end
64
InternalData.NewOwner = setmetatable({},{
65
	__index = function (self,Index)
66
			local Type = type(InternalData.RealOwner[Index])
67
			if Type == "function" then
68
				if Index:lower() == "getmouse" or Index:lower() == "mouse" then
69
				return function (self)return InternalData["Mouse"] end
70
				end
71
			return function (self,...)return InternalData.RealOwner[Index](InternalData.RealOwner,...) end
72
		elseif Index == "FakePlayer" then
73
			return true
74
		end
75
		return InternalData.RealOwner[Index]
76
	end;
77
	__tostring = function(self) return tostring(InternalData.RealOwner) end
78
})
79
--LoadLibrary("RbxUtility").Create
80
InternalData.LoadLibrary = LoadLibrary;LoadLibrary = function(Library)
81
	if Library == "RbxUtility" then
82
		return setmetatable({},{
83
			__tostring = function() return "RbxUtility" end;
84
			__index = function(self, Index)
85
				if Index:lower() == "create" then
86
					return function(Type)
87
						return function(Data)
88
							Data = Data or {}
89
							local Inst = Instance.new(Type)
90
							for x,y in pairs(Data) do
91
								if InternalData.RealObjs[y] then y = InternalData.RealObjs[y] end
92
								if y == owner then y = InternalData.RealOwner end
93
								Inst[x] = y
94
							end
95
							return Inst
96
						end
97
					end
98
				end
99
				return InternalData.LoadLibrary(Library)[Index]
100
			end
101
		})
102
	end
103
	return InternalData.LoadLibrary(Library)
104
end
105
InternalData.RealInstance = Instance;Instance = setmetatable({},{
106
	__index = function (self,Index)
107
		if Index:lower() == 'new' then
108
			return function (Type, Parent)
109
				if Parent == owner then Parent = InternalData.RealOwner end
110
				if InternalData.RealObjs[Parent] then Parent = InternalData.RealObjs[Parent] end
111
				local Real = InternalData.RealInstance.new(Type,Parent)
112
				if not Type then return end
113
				if Type == "BillboardGui" then
114
					local ToReturn = setmetatable({},{
115
						__index = function (self,Index)
116
							if type(Real[Index]) == "function" then
117
								if Index:lower() == "clone" then
118
									return function (self)
119
										local Real = Real:Clone()
120
										local ToReturn = setmetatable({RealObject = Real},{
121
											__index = function (self,Index)
122
												if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end
123
												return Real[Index]
124
											end;
125
											__newindex = function (self,Index,Value)
126
												if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
127
												if Value == owner then Value = InternalData.RealOwner end
128
												Real[Index] = Value
129
											end;
130
											__tostring = function(self) return tostring(Real) end;
131
										})
132
										InternalData.RealObjs[ToReturn] = Real;return ToReturn;
133
									end
134
								end
135
								return function (self,...) return Real[Index](Real,...)end
136
							end
137
							return Real[Index]
138
						end;
139
						__newindex = function (self,Index,Value)
140
							if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
141
							if Value == owner then Value = InternalData.RealOwner end
142
							Real[Index] = Value
143
						end;
144
						__tostring = function(self) return tostring(Real) end;
145
					})
146
					InternalData.RealObjs[ToReturn] = Real;return ToReturn;
147
				elseif Type:lower() == "sound" then
148
					Real.Parent = owner.Character;
149
					local ToReturn = setmetatable({RealObject = Real},{
150
						__index = function (self,Index)
151
							if Index:lower() == "playbackloudness" then
152
								return InternalData.SoundLoudness[Real] or 0
153
							elseif type(Real[Index]) == "function" then
154
								if Index:lower() == "clone" then
155
									return function (self)
156
										local Real = Real:Clone()
157
										local ToReturn = setmetatable({},{
158
											__index = function (self,Index)
159
												if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end
160
												return Real[Index]
161
											end;
162
											__newindex = function (self,Index,Value)
163
												if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
164
												if Value == owner then Value = InternalData.RealOwner end
165
												Real[Index] = Value
166
											end;
167
											__tostring = function(self) return tostring(Real) end;
168
										})
169
										InternalData.RealObjs[ToReturn] = Real;return ToReturn;
170
									end
171
								end
172
								return function (self,...) return Real[Index](Real,...)end
173
							end
174
							return Real[Index]
175
						end;
176
						__newindex = function (self,Index,Value)
177
							if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
178
							if Value == owner then Value = InternalData.RealOwner end
179
							Real[Index] = Value
180
						end;
181
						__tostring = function(self) return tostring(Real) end;
182
					})
183
					InternalData.RealObjs[ToReturn] = Real;InternalData.SoundLoudness[Real] = 0;repeat wait() until InternalData.Event.Parent InternalData.Event:FireClient(InternalData.RealOwner,{"NewSound",Real}) return ToReturn;
184
				else
185
					local ToReturn = setmetatable({RealObject = Real},{
186
						__index = function (self,Index)
187
							if type(Real[Index]) == "function" then
188
								if Index:lower() == "clone" then
189
									return function (self)
190
										local Real = Real:Clone()
191
										local ToReturn = setmetatable({},{
192
											__index = function (self,Index)
193
												if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end
194
												return Real[Index]
195
											end;
196
											__newindex = function (self,Index,Value)
197
												if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
198
												if Value == owner then Value = InternalData.RealOwner end
199
												Real[Index] = Value
200
											end;
201
											__tostring = function(self) return tostring(Real) end;
202
										})
203
										InternalData.RealObjs[ToReturn] = Real;return ToReturn;
204
									end
205
								end
206
								return function (self,...) return Real[Index](Real,...)end
207
							end
208
							return Real[Index]
209
						end;
210
						__newindex = function (self,Index,Value)
211
							if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
212
							if Value == owner then Value = InternalData.RealOwner end
213
							Real[Index] = Value
214
						end;
215
						__tostring = function(self) return tostring(Real) end;
216
					})
217
					InternalData.RealObjs[ToReturn] = Real;return ToReturn;
218
				end
219
			end
220
		end
221
		return InternalData.RealInstance[Index]
222
	end;
223
	__tostring = function(self) return tostring(InternalData.RealInstance) end;
224
});
225
InternalData.RealGame = game;game = setmetatable({},{
226
	__index = function (self,Index)
227
		if InternalData.RealGame[Index] then
228
			local Type = type(InternalData.RealGame[Index])
229
			if Type == "function" then
230
				if Index:lower() == "getservice" or Index:lower() == "service" then
231
					return function (self,Service)
232
						local FakeServices = {
233
							["players"] = function()
234
								return setmetatable({},{
235
									__index = function (self2,Index2)
236
										local RealService = InternalData.RealGame:GetService(Service)
237
										local Type2 = type(RealService[Index2])
238
										if Type2 == "function" then
239
											return function (self,...) return RealService[Index2](RealService,...)end
240
										else
241
											if Index2:lower() == "localplayer" then return InternalData.NewOwner end
242
											return RealService[Index2]
243
										end
244
									end;
245
									__tostring = function(self) return tostring(InternalData.RealGame:GetService(Service)) end
246
								})
247
							end;
248
							["contextactionservice"] = function() return InternalData["ContextActionService"] end;
249
							["userinputservice"] = function() return InternalData["UserInputService"] end;
250
							["debris"] = function()
251
								return setmetatable({},{
252
									__index = function(self2,Index2)
253
										local RealService = InternalData.RealGame:GetService(Service)
254
										local Type2 = type(RealService[Index2])
255
										if Type2 == "function" then
256
											if Index2:lower() == "additem" then
257
												return function (self,Item,Time)
258
													if InternalData.RealObjs[Item] then Item = InternalData.RealObjs[Item] end
259
													return RealService:AddItem(Item,Time)
260
												end
261
											end
262
											return function (self,...) return RealService[Index2](RealService,...) end
263
										end
264
										return RealService[Index2]
265
									end;
266
									__tostring = function(self) return tostring(InternalData.RealGame:GetService("Debris")) end
267
								})
268
							end;
269
							["runservice"] = function()
270
								return setmetatable({},{
271
									__index = function(self2,Index2)
272
										local RealService = InternalData.RealGame:GetService(Service)
273
										local Type2 = type(RealService[Index2])
274
										if Type2 == "function" then
275
											return function (self,...) return RealService[Index2](RealService,...) end
276
										else
277
											local RunServices = {
278
												["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return InternalData.RealGame:GetService("RunService").Stepped:Connect(Function) end end;
279
												["renderstepped"] = function() return RealService["Stepped"] end
280
											}
281
											if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
282
											return RealService[Index2]
283
										end
284
									end;
285
									__tostring = function(self) return tostring(InternalData.RealGame:GetService("RunService")) end
286
								})
287
							end
288
						}
289
						if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
290
						return InternalData.RealGame:GetService(Service)
291
					end
292
				end
293
				return function (self,...) return InternalData.RealGame[Index](InternalData.RealGame,...) end
294
			else
295
				if game:GetService(Index) then return game:GetService(Index) end
296
				return InternalData.RealGame[Index]
297
			end
298
		end
299
		return nil
300
	end;
301
	__tostring = function(self) return tostring(InternalData.game) end
302
});Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete!")
303
304
--services
305
local debris = game:GetService("Debris")
306
local chatservice = game:GetService("Chat")
307
308
309
310
--[[settings]]
311
312
--mode customization
313
local opmultiplierws = 1.25
314
local spdmultiplierws = 2
315
local opmultiplierjp = 1
316
local spdmultiplierjp = 1.25
317
318
--color
319
local maincolor = BrickColor.new("Bright yellow")
320
local secondarycolor = BrickColor.new("Bright blue")
321
local flamecolor = BrickColor.new("Really red")
322
323
--music
324
local musicid = "rbxassetid://571839980"
325
local runmusicid = "rbxassetid://703893300"
326
327
--flash effect
328
local flashduration = 0
329
330
331
--jump power
332
local walkjp = 50
333
local runjp = 70
334
335
336
--walk speed
337
local walkspd = 26
338
local runspd = 100
339
340
341
local spd = 16
342
local jpower = 50
343
344
345
--enables
346
local running = false
347
local autotarget = false
348
local opmode = false
349
local chatting = false
350
local superspeed = false
351
352
353
--script
354
local player = game:GetService("Players").LocalPlayer
355
local mouse = player:GetMouse()
356
repeat
357
	wait()
358
until player.Character
359
local character = player.Character
360
local humanoid = character:FindFirstChild("Humanoid")
361
local torso = character:FindFirstChild("Torso")
362
if not torso and not humanoid then
363
	print("Torso and humanoid not found")
364
	return
365
elseif not torso then
366
	print("No torso found")
367
	return
368
elseif not humanoid then
369
	print("No humanoid found")
370
	return
371
end
372
373
374
375
--useful functions
376
377
local function randomize(value1, value2)
378
	math.randomseed(os.time())
379
	for i=1,10 do
380
		math.random(1,100)
381
	end
382
	local randomizeeebebebe = math.random(value1, value2)
383
	return randomizeeebebebe
384
end
385
386
387
388
--attacking
389
local function attak(thing, thinghumanoid, place)	
390
		
391
	local hiteffect = Instance.new("Part", thing)
392
	hiteffect.Name = "Hit Effect"
393
	if opmode then
394
		hiteffect.BrickColor = secondarycolor
395
	else
396
		hiteffect.BrickColor = maincolor
397
	end
398
	hiteffect.Material = Enum.Material.Neon
399
	hiteffect.Anchored = true
400
	hiteffect.CanCollide = false
401
	hiteffect.CFrame = CFrame.new(thing.Position)
402
	hiteffect.Size = Vector3.new()
403
	hiteffect.Transparency = 0
404
	hiteffect.Shape = "Ball"
405
		
406
	thing.CFrame = thing.CFrame + Vector3.new(0,0.1,0)
407
	if superspeed then
408
		thing.Velocity = thing.Velocity + ((thing.Position - place.Position).unit * 500)
409
	end
410
	if opmode then
411
		thinghumanoid.Parent:BreakJoints()
412
		thing.Velocity = thing.Velocity + ((thing.Position - place.Position).unit * 1000)
413
		hiteffect.Size = Vector3.new(25,25,25)
414
		debris:AddItem(thinghumanoid.Parent, 1)
415
	else
416
		thinghumanoid:TakeDamage(randomize(17,24))
417
	end
418
		
419
	thing.Velocity = thing.Velocity + ((thing.Position - place.Position).unit * 100)
420
		
421
	coroutine.resume(coroutine.create(function()
422
		local hitchange = Vector3.new(0,hiteffect.Transparency,0)
423
		for i=1,10 do
424
			hiteffect.Transparency = hitchange.Y
425
			hiteffect.Size = hiteffect.Size:lerp(Vector3.new(7,7,7), 0.05 * i)
426
			hitchange = hitchange:lerp(Vector3.new(0,1,0), 0.05 * i)
427
			if superspeed then
428
				hiteffect.Color = hiteffect.Color:lerp(flamecolor.Color, 0.1 * i)
429
			end
430
			wait()
431
		end
432
		hiteffect:Destroy()
433
	end))
434
end
435
436
local function Attack(area, range, autorange)
437
	local searchrange = range
438
	local autosearch = autorange
439
	local htorso = nil
440
	local hhumanoid = nil
441
	local autotargethumanoid = nil
442
	local autotargettorso = nil
443
	for i,v in pairs(game.Workspace:GetChildren()) do
444
		local ttorso = v:FindFirstChild("Torso")
445
		if not ttorso then
446
			ttorso = v:FindFirstChild("UpperTorso")
447
			if not ttorso then
448
				ttorso = v:FindFirstChild("HumanoidRootPart")
449
			end
450
		end
451
		local thumanoid = v:FindFirstChild("Humanoid")
452
		if ttorso and thumanoid and v ~= character then
453
			if thumanoid.Health > 0 then
454
				local distaway = (area.Position - ttorso.Position).magnitude
455
				
456
				if distaway < range then
457
					attak(ttorso, thumanoid, area)
458
				end
459
				
460
				if distaway < range then
461
					htorso = ttorso
462
					hhumanoid = thumanoid
463
					searchrange = distaway
464
				end
465
				if distaway < autosearch then
466
					autotargettorso = ttorso
467
					autotargethumanoid = thumanoid
468
					autosearch = distaway
469
				end
470
			end
471
		end
472
	end
473
	if htorso and hhumanoid then
474
		if autotarget and autotargettorso and autotargethumanoid then
475
			if autotargethumanoid.Health > 0 then
476
				humanoid:MoveTo(autotargettorso.Position)
477
				torso.Velocity = torso.Velocity + (torso.CFrame.lookVector * 50)
478
			end
479
		end
480
	end
481
end
482
483
484
485
--music
486
local music = Instance.new("Sound", torso)
487
music.SoundId = musicid
488
music.Volume = 0						--default 0.5
489
music.EmitterSize = 10					--default 10
490
music.PlaybackSpeed = 1				--default 1
491
music.Looped = true
492
493
494
495
496
--text
497
local bgui = Instance.new("BillboardGui",character)
498
bgui.Size = UDim2.new(0,100,0,40)
499
bgui.StudsOffset = Vector3.new(0,2,0)
500
bgui.Adornee = character.Head
501
local texty = Instance.new("TextLabel", bgui)
502
texty.BackgroundTransparency = 1
503
texty.BorderSizePixel = 0
504
texty.Text = ""
505
texty.Font = "Cartoon"
506
texty.FontSize = "Size24"
507
texty.TextStrokeTransparency = 0.7
508
texty.TextStrokeColor3 = Color3.new(1,1,0)
509
texty.TextColor3 = Color3.new(1,1,0)
510
texty.Size = UDim2.new(1,0,0.5,0)
511
512
coroutine.resume(coroutine.create(function()
513
	while true do
514
		wait()
515
		texty.Position = UDim2.new((math.cos(tick() * 15) / 5), 0, math.sin(tick() * 15) / 5, 0)
516
		if not chatting then
517
			texty.Text = "-" ..player.Name.. "-"
518
		end
519
	end
520
end))
521
522
523
player.Chatted:connect(function(chat)
524
	chatting = true
525
	chat = chatservice:FilterStringForBroadcast(chat, player)
526
	for i=1,string.len(chat) do
527
		texty.Text = string.sub(chat, 1, i)
528
		wait()
529
	end
530
	wait(2)
531
	chatting = false
532
end)
533
534
535
536
--INTRO
537
music:Play()
538
humanoid.WalkSpeed = 0
539
540
wait(1)
541
542
local effect = Instance.new("Part", character)
543
effect.Name = "Effect"
544
effect.BrickColor = maincolor
545
effect.Material = Enum.Material.Neon
546
effect.Anchored = true
547
effect.CanCollide = false
548
effect.CFrame = CFrame.new(torso.Position)
549
effect.Size = Vector3.new(10,10,10)
550
effect.Shape = "Ball"
551
552
for i=1,1 do
553
	local change = Vector3.new(0,1,0)
554
	for i=1,20 do
555
		effect.Size = effect.Size:lerp(Vector3.new(0,0,0), 0.03 * i)
556
		effect.Transparency = change.Y
557
		change = change:lerp(Vector3.new(0,0,0), 0.02 * i)
558
		music.Volume = change.Y / 1
559
		wait()
560
	end
561
	
562
	change = Vector3.new(0,1,0)
563
	effect.Size = Vector3.new(10,10,10)
564
	for i=1,20 do
565
		effect.Size = effect.Size:lerp(Vector3.new(0,0,0), 0.03 * i)
566
		effect.Transparency = change.Y
567
		change = change:lerp(Vector3.new(0,0,0), 0.02 * i)
568
		music.Volume = change.Y / 1
569
		wait()
570
	end
571
	
572
	change = Vector3.new(0,1,0)
573
	effect.Size = Vector3.new(10,10,10)
574
	for i=1,20 do
575
		effect.Size = effect.Size:lerp(Vector3.new(0,0,0), 0.03 * i)
576
		effect.Transparency = change.Y
577
		change = change:lerp(Vector3.new(0,0,0), 0.02 * i)
578
		music.Volume = change.Y / 1
579
		wait()
580
	end
581
	
582
	change = Vector3.new(0,0,0)
583
	effect.Size = Vector3.new(0,0,0)
584
	for i=1,20 do
585
		effect.Size = effect.Size:lerp(Vector3.new(30,30,30), 0.03 * i)
586
		effect.Color = effect.Color:lerp(flamecolor.Color, 0.03 * i)
587
		effect.Transparency = change.Y
588
		change = change:lerp(Vector3.new(0,1,0), 0.02 * i)
589
		music.Volume = change.Y / 1
590
		wait()
591
	end
592
	music.Volume = 1
593
	effect:Destroy()
594
end
595
596
597
598
--set humanoid stats
599
coroutine.resume(coroutine.create(function()
600
	while true do
601
		wait()
602
		humanoid.PlatformStand = false
603
		humanoid.WalkSpeed = spd
604
		humanoid.JumpPower = jpower
605
		humanoid.MaxHealth = math.huge
606
		humanoid.Health = math.huge
607
		for i,v in pairs(character:GetChildren()) do
608
			if v:IsA("Part") then
609
				v.Anchored = false
610
			end
611
		end
612
	end
613
end))
614
615
616
--visual effect for running
617
local function Effect()
618
	for i,v in pairs(character:GetChildren()) do
619
		if v:IsA("Part") then
620
			local shadow = v:Clone()
621
			shadow:ClearAllChildren()
622
			if v.Name == "Head" then
623
				shadow.Size = Vector3.new(1.25,1.25,1.25)
624
			end
625
			--[[if opmode then
626
				shadow.BrickColor = secondarycolor
627
			else
628
				shadow.BrickColor = maincolor
629
			end]]
630
			shadow.CanCollide = false
631
			shadow.Anchored = true
632
			shadow.Material = Enum.Material.Neon
633
			shadow.Transparency = 0.5
634
			shadow.Parent = workspace
635
			
636
			coroutine.resume(coroutine.create(function()
637
				wait(flashduration)
638
				local flash = Vector3.new(0,shadow.Transparency,0)
639
				local originalsize = shadow.Size
640
				for i=1,10 do
641
					wait()
642
					shadow.Transparency = flash.Y
643
					shadow.Size = shadow.Size:lerp(Vector3.new(), 0.05 * i)
644
					shadow.Size = shadow.Size:lerp(originalsize + (Vector3.new(1,1,1) * (music.PlaybackLoudness / 50)), 0.05)
645
					flash = flash:lerp(Vector3.new(0,1,0), 0.05 * i)
646
					if superspeed then
647
						shadow.Color = shadow.Color:lerp(flamecolor.Color, 0.2 * i)
648
					end
649
					if opmode then
650
						shadow.CFrame = shadow.CFrame:lerp(v.CFrame, 0.05 * i)
651
					end
652
				end
653
				shadow:Destroy()
654
			end))
655
		end
656
	end
657
end
658
659
660
661
--keys
662
mouse.KeyDown:connect(function(key)
663
	local bytekey = key:byte()
664
	local skey = key:lower()
665
	if bytekey == 48 then	--Shift
666
		running = true
667
		torso.Velocity = torso.Velocity + (torso.CFrame.lookVector * 100)
668
	end
669
	if skey == "z" then
670
		if autotarget then
671
			autotarget = false
672
		else
673
			autotarget = true
674
		end
675
	end
676
	if skey == "x" then
677
		if opmode then
678
			opmode = false
679
			runspd = runspd / opmultiplierws
680
			runjp = runjp / opmultiplierjp
681
		else
682
			opmode = true
683
			runspd = runspd * opmultiplierws
684
			runjp = runjp * opmultiplierjp
685
		end
686
	end
687
	if skey == "c" then
688
		if superspeed then
689
			superspeed = false
690
			runspd = runspd / spdmultiplierws
691
			runjp = runjp / spdmultiplierjp
692
		else
693
			superspeed = true
694
			runspd = runspd * spdmultiplierws
695
			runjp = runjp * spdmultiplierjp
696
		end
697
	end
698
end)
699
700
mouse.KeyUp:connect(function(key)
701
	local bytekey = key:byte()
702
	local skey = key:lower()
703
	if bytekey == 48 then	--Shift
704
		running = false
705
	end
706
end)
707
708
709
710
--main
711
while true do
712
	if not running then
713
		spd = walkspd
714
		jpower = walkjp
715
		music.SoundId = musicid
716
	else
717
		spd = runspd
718
		jpower = runjp
719
		music.SoundId = runmusicid
720
		if torso.Velocity.magnitude > 1 then
721
			Effect()
722
			Attack(torso, 10, 150)
723
		end
724
	end
725
	wait()
726
end