View difference between Paste ID: ju9NVPEP and ejENVv0p
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
local Player = game:GetService("Players").LocalPlayer
154
155
local Mouse,mouse,UserInputService,ContextActionService
156
do
157
	script.Parent = Player.Character
158
	local CAS = {Actions={}}
159
	local Event = Instance.new("RemoteEvent")
160
	Event.Name = "UserInput_Event"
161
	Event.Parent = Player.Character
162
	local fakeEvent = function()
163
		local t = {_fakeEvent=true}
164
		t.Connect = function(self,f)self.Function=f end
165
		t.connect = t.Connect
166
		return t
167
	end
168
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
169
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
170
	function CAS:BindAction(name,fun,touch,...)
171
		CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
172
	end
173
	function CAS:UnbindAction(name)
174
		CAS.Actions[name] = nil
175
	end
176
	local function te(self,ev,...)
177
		local t = m[ev]
178
		if t and t._fakeEvent and t.Function then
179
			t.Function(...)
180
		end
181
	end
182
	m.TrigEvent = te
183
	UIS.TrigEvent = te
184
	Event.OnServerEvent:Connect(function(plr,io)
185
	    if plr~=Player then return end
186
		if io.isMouse then
187
			m.Target = io.Target
188
			m.Hit = io.Hit
189
		elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
190
	        if io.UserInputState == Enum.UserInputState.Begin then
191
				m:TrigEvent("Button1Down")
192
			else
193
				m:TrigEvent("Button1Up")
194
			end
195
		else
196
			for n,t in pairs(CAS.Actions) do
197
				for _,k in pairs(t.Keys) do
198
					if k==io.KeyCode then
199
						t.Function(t.Name,io.UserInputState,io)
200
					end
201
				end
202
			end
203
	        if io.UserInputState == Enum.UserInputState.Begin then
204
	            m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
205
				UIS:TrigEvent("InputBegan",io,false)
206
			else
207
				m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
208
				UIS:TrigEvent("InputEnded",io,false)
209
	        end
210
	    end
211
	end)
212
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
213
	end
214
215
216
--[[
217
         ______     __  __        ____                 __         ______
218
        / _/ _/    /  \/  \      / __/___  __  _______/ /_       /  /  /
219
       / // /     / /\/ /\ \  __/ /_/ __ \/ / / / ___/ __ \      / // /
220
      / // /     / / /_/  \ \/_  __/ /_/ / /_/ / /  / /_/ /     / // /  
221
     / // /     /_/        \_\/_/  \____/\__,_/_/  /_.___/    _/ // /  
222
    /__/__/                                                  /__/__/  
223
 
224
--]]
225
 
226
wait()
227
Player = game.Players.LocalPlayer
228
Object = Player.Character.HumanoidRootPart
229
Arm1 = Player.Character["Right Arm"]
230
PreviousA1 = Arm1.CFrame.p
231
Arm2 = Player.Character["Left Arm"]
232
PreviousA2 = Arm2.CFrame.p
233
 
234
Leg1 = Player.Character["Right Leg"]
235
PreviousL1 = Leg1.CFrame.p
236
Leg2 = Player.Character["Left Leg"]
237
PreviousL2 = Leg2.CFrame.p
238
 
239
Run = game["Run Service"]
240
 
241
PreviousP = Object.CFrame.p
242
Running = false
243
Phase = false
244
PhaseActive = false
245
Morph = false
246
MorphActive = false
247
Tornado = false
248
TornadoRadius = 50
249
TornadoActive = false
250
Portal = false
251
PortalEnd = false
252
MaxZ = 15
253
MinZ = -15
254
LightMaxX = 3
255
LightMinX = 1
256
LightMaxX2 = -1
257
LightMinX2 = -3
258
LightMaxY = 3
259
LightMinY = -1
260
Rotation = 0
261
Length = 10
262
Color = BrickColor.Yellow()
263
PColor = Color3.new(255,255,0)
264
PrevPoint1 = nil
265
PrevPoint2 = nil
266
PrevPoint3 = nil
267
PrevPoint4 = nil
268
PrevPoint5 = nil
269
PrevPoint6 = nil
270
PrevPoint7 = nil
271
PrevPoint8 = nil
272
PrevPoint9 = nil
273
PrevPoint10 = nil
274
PrevPoint11 = nil
275
PrevPoint12 = nil
276
angle = 0
277
Mouse = Player:GetMouse()
278
Player.Character.Humanoid.WalkSpeed = 100
279
 
280
Nil = function()
281
    PrevPoint1 = "Empty"
282
    PrevPoint2 = "Empty"
283
    PrevPoint3 = "Empty"
284
    PrevPoint4 = "Empty"
285
    PrevPoint5 = "Empty"
286
    PrevPoint6 = "Empty"
287
    PrevPoint7 = "Empty"
288
    PrevPoint8 = "Empty"
289
    PrevPoint9 = "Empty"
290
    PrevPoint10 = "Empty"
291
    PrevPoint11 = "Empty"
292
    PrevPoint12 = "Empty"
293
end
294
 
295
    local Lightning = coroutine.wrap(function()
296
while wait() do
297
        if Portal == false then
298
        angle = angle + 0.6
299
        local Model = Instance.new("Model",workspace)
300
        Model.Name = "Lightning"
301
        local Point1 = Instance.new("Part",Model)
302
        Point1.Transparency = 1
303
        Point1.Size = Vector3.new(0.2,0.2,0.2)
304
        Point1.CFrame = Object.CFrame * CFrame.new(0,0,-(Object.Size.Z/2+Point1.Size.Z/2))
305
        Point1.Anchored = true
306
        Point1.CanCollide = false
307
        Point1.CFrame = Point1.CFrame * CFrame.new(math.random(-2,2),math.random(-2,2),-math.random(0,2))
308
 
309
        local Point2 = Instance.new("Part",Model)
310
        Point2.Transparency = 1
311
        Point2.Size = Vector3.new(0.2,0.2,0.2)
312
        Point2.CFrame = Object.CFrame * CFrame.new(0,0,-(Object.Size.Z/2+Point2.Size.Z/2))
313
        Point2.Anchored = true
314
        Point2.CanCollide = false
315
        Point2.CFrame = Point2.CFrame * CFrame.new(math.random(-2,2),math.random(-2,2),-math.random(0,2))
316
 
317
        local Point3 = Instance.new("Part",Model)
318
        Point3.Transparency = 1
319
        Point3.Size = Vector3.new(0.2,0.2,0.2)
320
        Point3.CFrame = Object.CFrame * CFrame.new(0,0,-(Object.Size.Z/2+Point3.Size.Z/2))
321
        Point3.Anchored = true
322
        Point3.CanCollide = false
323
        Point3.CFrame = Point3.CFrame * CFrame.new(math.random(-2,2),math.random(-2,2),-math.random(0,2))
324
 
325
        local distance = (Point2.CFrame.p - Point1.CFrame.p).magnitude
326
        local Light = Instance.new("Part",Model)
327
        local PointLight = Instance.new("PointLight",Light)
328
        PointLight.Range = 5
329
        PointLight.Color = PColor
330
        Light.Transparency = 0.5
331
        Light.BrickColor = Color
332
        Light.Material = "Neon"
333
        Light.Size = Vector3.new(0.25,0.25,distance)
334
        Light.Anchored = true
335
        Light.CanCollide = false
336
        Light.CFrame = CFrame.new(Point2.CFrame.p , Point1.CFrame.p) * CFrame.new(0,0,-distance/2)
337
 
338
        local distance2 = (Point3.CFrame.p - Point2.CFrame.p).magnitude
339
        local Light = Instance.new("Part",Model)
340
        local PointLight = Instance.new("PointLight",Light)
341
        PointLight.Range = 5
342
        PointLight.Color = PColor
343
        Light.Transparency = 0.5
344
        Light.BrickColor = Color
345
        Light.Material = "Neon"
346
        Light.Size = Vector3.new(0.25,0.25,distance2)
347
        Light.Anchored = true
348
        Light.CanCollide = false
349
        Light.CFrame = CFrame.new(Point3.CFrame.p , Point2.CFrame.p) * CFrame.new(0,0,-distance2/2)
350
 
351
        local Point1 = Instance.new("Part",Model)
352
        Point1.Transparency = 1
353
        Point1.Size = Vector3.new(0.2,0.2,0.2)
354
        Point1.CFrame = Object.CFrame * CFrame.new(0,0,(Object.Size.Z/2+Point1.Size.Z/2))
355
        Point1.Anchored = true
356
        Point1.CanCollide = false
357
        Point1.CFrame = Point1.CFrame * CFrame.new(math.random(-2,2),math.random(-2,2),math.random(0,2))
358
 
359
        local Point2 = Instance.new("Part",Model)
360
        Point2.Transparency = 1
361
        Point2.Size = Vector3.new(0.2,0.2,0.2)
362
        Point2.CFrame = Object.CFrame * CFrame.new(0,0,(Object.Size.Z/2+Point2.Size.Z/2))
363
        Point2.Anchored = true
364
        Point2.CanCollide = false
365
        Point2.CFrame = Point2.CFrame * CFrame.new(math.random(-2,2),math.random(-2,2),math.random(0,2))
366
 
367
        local Point3 = Instance.new("Part",Model)
368
        Point3.Transparency = 1
369
        Point3.Size = Vector3.new(0.2,0.2,0.2)
370
        Point3.CFrame = Object.CFrame * CFrame.new(0,0,(Object.Size.Z/2+Point3.Size.Z/2))
371
        Point3.Anchored = true
372
        Point3.CanCollide = false
373
        Point3.CFrame = Point3.CFrame * CFrame.new(math.random(-2,2),math.random(-2,2),math.random(0,2))
374
 
375
        local distance = (Point2.CFrame.p - Point1.CFrame.p).magnitude
376
        local Light = Instance.new("Part",Model)
377
        local PointLight = Instance.new("PointLight",Light)
378
        PointLight.Range = 5
379
        PointLight.Color = PColor
380
        Light.Transparency = 0.5
381
        Light.BrickColor = Color
382
        Light.Material = "Neon"
383
        Light.Size = Vector3.new(0.25,0.25,distance)
384
        Light.Anchored = true
385
        Light.CanCollide = false
386
        Light.CFrame = CFrame.new(Point2.CFrame.p , Point1.CFrame.p) * CFrame.new(0,0,-distance/2)
387
 
388
        local distance2 = (Point3.CFrame.p - Point2.CFrame.p).magnitude
389
        local Light = Instance.new("Part",Model)
390
        local PointLight = Instance.new("PointLight",Light)
391
        PointLight.Range = 5
392
        PointLight.Color = PColor
393
        Light.Transparency = 0.5
394
        Light.BrickColor = Color
395
        Light.Material = "Neon"
396
        Light.Size = Vector3.new(0.3,0.3,distance2)
397
        Light.Anchored = true
398
        Light.CanCollide = false
399
        Light.CFrame = CFrame.new(Point3.CFrame.p , Point2.CFrame.p) * CFrame.new(0,0,-distance2/2)
400
       
401
        local Point1 = Instance.new("Part",Model)
402
        Point1.Transparency = 1
403
        Point1.Size = Vector3.new(0.2,0.2,0.2)
404
        Point1.CFrame = Object.CFrame * CFrame.new((Object.Size.X/2+Point1.Size.X/2),0,0)
405
        Point1.Anchored = true
406
        Point1.CanCollide = false
407
        Point1.CFrame = Point1.CFrame * CFrame.new(math.random(0,2),math.random(-2,2),math.random(-2,2))
408
 
409
        local Point2 = Instance.new("Part",Model)
410
        Point2.Transparency = 1
411
        Point2.Size = Vector3.new(0.2,0.2,0.2)
412
        Point2.CFrame = Object.CFrame * CFrame.new((Object.Size.X/2+Point1.Size.X/2),0,0)
413
        Point2.Anchored = true
414
        Point2.CanCollide = false
415
        Point2.CFrame = Point2.CFrame * CFrame.new(math.random(0,2),math.random(-2,2),math.random(-2,2))
416
 
417
        local Point3 = Instance.new("Part",Model)
418
        Point3.Transparency = 1
419
        Point3.Size = Vector3.new(0.2,0.2,0.2)
420
        Point3.CFrame = Object.CFrame * CFrame.new((Object.Size.X/2+Point1.Size.X/2),0,0)
421
        Point3.Anchored = true
422
        Point3.CanCollide = false
423
        Point3.CFrame = Point3.CFrame * CFrame.new(math.random(0,2),math.random(-2,2),math.random(-2,2))
424
 
425
        local distance = (Point2.CFrame.p - Point1.CFrame.p).magnitude
426
        local Light = Instance.new("Part",Model)
427
        local PointLight = Instance.new("PointLight",Light)
428
        PointLight.Range = 5
429
        PointLight.Color = PColor
430
        Light.Transparency = 0.5
431
        Light.BrickColor = Color
432
        Light.Material = "Neon"
433
        Light.Size = Vector3.new(0.25,0.25,distance)
434
        Light.Anchored = true
435
        Light.CanCollide = false
436
        Light.CFrame = CFrame.new(Point2.CFrame.p , Point1.CFrame.p) * CFrame.new(0,0,-distance/2)
437
 
438
        local distance2 = (Point3.CFrame.p - Point2.CFrame.p).magnitude
439
        local Light = Instance.new("Part",Model)
440
        local PointLight = Instance.new("PointLight",Light)
441
        PointLight.Range = 5
442
        PointLight.Color = PColor
443
        Light.Transparency = 0.5
444
        Light.BrickColor = Color
445
        Light.Material = "Neon"
446
        Light.Size = Vector3.new(0.25,0.25,distance2)
447
        Light.Anchored = true
448
        Light.CanCollide = false
449
        Light.CFrame = CFrame.new(Point3.CFrame.p , Point2.CFrame.p) * CFrame.new(0,0,-distance2/2)
450
 
451
        local Point1 = Instance.new("Part",Model)
452
        Point1.Transparency = 1
453
        Point1.Size = Vector3.new(0.2,0.2,0.2)
454
        Point1.CFrame = Object.CFrame * CFrame.new(-(Object.Size.X/2+Point1.Size.X/2),0,0)
455
        Point1.Anchored = true
456
        Point1.CanCollide = false
457
        Point1.CFrame = Point1.CFrame * CFrame.new(-math.random(0,2),math.random(-2,2),math.random(-2,2))
458
 
459
        local Point2 = Instance.new("Part",Model)
460
        Point2.Transparency = 1
461
        Point2.Size = Vector3.new(0.2,0.2,0.2)
462
        Point2.CFrame = Object.CFrame * CFrame.new(-(Object.Size.X/2+Point1.Size.X/2),0,0)
463
        Point2.Anchored = true
464
        Point2.CanCollide = false
465
        Point2.CFrame = Point2.CFrame * CFrame.new(-math.random(0,2),math.random(-2,2),math.random(-2,2))
466
 
467
        local Point3 = Instance.new("Part",Model)
468
        Point3.Transparency = 1
469
        Point3.Size = Vector3.new(0.2,0.2,0.2)
470
        Point3.CFrame = Object.CFrame * CFrame.new(-(Object.Size.X/2+Point1.Size.X/2),0,0)
471
        Point3.Anchored = true
472
        Point3.CanCollide = false
473
        Point3.CFrame = Point3.CFrame * CFrame.new(-math.random(0,2),math.random(-2,2),math.random(-2,2))
474
 
475
        local distance = (Point2.CFrame.p - Point1.CFrame.p).magnitude
476
        local Light = Instance.new("Part",Model)
477
        local PointLight = Instance.new("PointLight",Light)
478
        PointLight.Range = 5
479
        PointLight.Color = PColor
480
        Light.Transparency = 0.5
481
        Light.BrickColor = Color
482
        Light.Material = "Neon"
483
        Light.Size = Vector3.new(0.25,0.25,distance)
484
        Light.Anchored = true
485
        Light.CanCollide = false
486
        Light.CFrame = CFrame.new(Point2.CFrame.p , Point1.CFrame.p) * CFrame.new(0,0,-distance/2)
487
 
488
        local distance2 = (Point3.CFrame.p - Point2.CFrame.p).magnitude
489
        local Light = Instance.new("Part",Model)
490
        local PointLight = Instance.new("PointLight",Light)
491
        PointLight.Range = 5
492
        PointLight.Color = PColor
493
        Light.Transparency = 0.5
494
        Light.BrickColor = Color
495
        Light.Material = "Neon"
496
        Light.Size = Vector3.new(0.25,0.25,distance2)
497
        Light.Anchored = true
498
        Light.CanCollide = false
499
        Light.CFrame = CFrame.new(Point3.CFrame.p , Point2.CFrame.p) * CFrame.new(0,0,-distance2/2)
500
       
501
    local Children = Model:GetChildren()
502
    wait(0.1)
503
    for i = 1,#Children do
504
        if Children[i]:IsA("Part") then
505
        Children[i].Transparency = 1
506
        end
507
        game.Debris:AddItem(Children[i],0)
508
    end
509
 
510
        end
511
        end
512
    end)
513
Lightning()
514
 
515
TornadoFunction = function()
516
    local TornadoModel = Instance.new("Model",workspace)
517
    local Center = Instance.new("Part",TornadoModel)
518
    Center.Anchored = true
519
    Center.CanCollide = false
520
    Center.Transparency = 1
521
    Center.Size = Vector3.new(2,2,2)
522
    Center.CFrame = Object.CFrame * CFrame.new(0,0,-20)
523
    local Death = Instance.new("Part",TornadoModel)
524
    Death.Anchored = true
525
    Death.CanCollide = false
526
    Death.Transparency = 1
527
    Death.Size = Vector3.new(TornadoRadius+10,TornadoRadius+10,TornadoRadius+10)
528
    Death.CFrame = Center.CFrame
529
    Death.Touched:connect(function(Touch)
530
        if Touch.Parent:FindFirstChild("Humanoid") ~= nil and Touch.Parent.Name ~= Player.Name then
531
            Touch.Parent.Humanoid.Health = 0
532
        end
533
    end)
534
    local TornadoFunc = function()
535
        local Tornanimation = coroutine.wrap(function()
536
            while Run.Stepped:wait() do
537
                if Tornado == false then Death:Destroy() break end
538
                angle = angle + 0.1
539
                Object.Anchored = false
540
                Object.CFrame = Center.CFrame * CFrame.Angles(0,angle,0) * CFrame.new(0,0,TornadoRadius)
541
                Object.CFrame = Object.CFrame * CFrame.Angles(0,-math.rad(90),0)
542
            end
543
        end)
544
        Tornanimation()
545
    end
546
    TornadoFunc()
547
end
548
 
549
PhaseFunction = function()
550
    local Phase = coroutine.wrap(function()
551
    while wait() do
552
    if Phase == false then break end
553
    if Player.Character.Humanoid.WalkSpeed > 50 and Phase == true then
554
        Object.CFrame = Object.CFrame * CFrame.new(0,0,-Player.Character.Humanoid.WalkSpeed/20)
555
    end
556
    end
557
    end)
558
    Phase()
559
end
560
 
561
 
562
PortalFunction = function()
563
    local PortalBlock = Instance.new("Part",workspace)
564
    PortalBlock.CFrame = Object.CFrame * CFrame.new(0,0,-100)
565
    PortalBlock.Transparency = 1
566
    PortalBlock.Anchored = true
567
    PortalBlock.CanCollide = false
568
    PortalBlock.Size = Vector3.new(20,20,0.2)
569
    PortalBlock.CFrame = PortalBlock.CFrame * CFrame.new(0,(PortalBlock.Size.Y/2),0)
570
    local Gui = Instance.new("SurfaceGui",PortalBlock)
571
    local Img = Instance.new("ImageLabel",Gui)
572
    Img.Size = UDim2.new(2,0,2,0)
573
    Img.Position = UDim2.new(-0.5,0,-0.5,0)
574
    Img.Transparency = 1
575
    Img.Image = "http://www.roblox.com/asset/?id=21315275"
576
    local Gui = Instance.new("SurfaceGui",PortalBlock)                          
577
    Gui.Face = "Back"
578
    local Img = Instance.new("ImageLabel",Gui)
579
    Img.Size = UDim2.new(2,0,2,0)
580
    Img.Position = UDim2.new(-0.5,0,-0.5,0)
581
    Img.Transparency = 1
582
    Img.Image = "http://www.roblox.com/asset/?id=21315275"
583
    Object.CFrame = PortalBlock.CFrame
584
    local Face = Object.Parent.Head.face.Texture
585
    local ObjectC = Object.Parent:GetChildren()
586
    for i = 1,#ObjectC do
587
        if ObjectC[i]:IsA("Part") and ObjectC[i].Name ~= "HumanoidRootPart" then
588
            ObjectC[i].Transparency = 1
589
        elseif ObjectC[i]:IsA("Hat") then
590
            ObjectC[i].Handle.Transparency = 1
591
        end
592
        if ObjectC[i].Name == "Head" then
593
            ObjectC[i].face.Texture = ""
594
        end
595
    end
596
 
597
    local PortalR = coroutine.wrap(function()
598
    wait(0.1)
599
    Portal = true
600
    PortalEnd = true
601
    while wait(0.001) do
602
    if Portal == false then
603
        break
604
    end
605
        Nil()
606
        PortalBlock.CFrame = PortalBlock.CFrame * CFrame.Angles(0,0,-0.1)
607
    wait(0.01)
608
    end
609
        PortalBlock:Destroy()
610
    for i = 1,#ObjectC do
611
        if ObjectC[i]:IsA("Part") and ObjectC[i].Name ~= "HumanoidRootPart" then
612
            ObjectC[i].Transparency = 0
613
        elseif ObjectC[i]:IsA("Hat") then
614
            ObjectC[i].Handle.Transparency = 0
615
        end
616
        if ObjectC[i].Name == "Head" then
617
            ObjectC[i].face.Texture = Face
618
        end
619
    end
620
    game.Players.LocalPlayer.Character.Part.Transparency = 1
621
    local PortalBlock = Instance.new("Part",workspace)
622
    PortalBlock.CFrame = Object.CFrame * CFrame.new(0,0,0)
623
    PortalBlock.Transparency = 1
624
    PortalBlock.Anchored = true
625
    PortalBlock.CanCollide = false
626
    PortalBlock.Size = Vector3.new(20,20,0.2)
627
    PortalBlock.CFrame = PortalBlock.CFrame * CFrame.new(0,(PortalBlock.Size.Y/2),0)
628
    local Gui = Instance.new("SurfaceGui",PortalBlock)
629
    local Img = Instance.new("ImageLabel",Gui)
630
    Img.Size = UDim2.new(2,0,2,0)
631
    Img.Position = UDim2.new(-0.5,0,-0.5,0)
632
    Img.Transparency = 1
633
    Img.Image = "http://www.roblox.com/asset/?id=21315275"
634
    local Gui = Instance.new("SurfaceGui",PortalBlock)
635
    Gui.Face = "Back"
636
    local Img = Instance.new("ImageLabel",Gui)
637
    Img.Size = UDim2.new(2,0,2,0)
638
    Img.Position = UDim2.new(-0.5,0,-0.5,0)
639
    Img.Transparency = 1
640
    Img.Image = "http://www.roblox.com/asset/?id=21315275"
641
    Object.CFrame = PortalBlock.CFrame
642
    PreviousA1 = Arm1.CFrame.p
643
    PreviousA2 = Arm2.CFrame.p
644
    PreviousL1 = Leg1.CFrame.p
645
    PreviousL2 = Leg2.CFrame.p
646
    PreviousP = Object.CFrame.p
647
    PortalEnd = false
648
    wait(2)
649
    PortalBlock:Destroy()
650
    end)
651
    PortalR()
652
end
653
 
654
MorphFunction = function()
655
    local MaxX = 100
656
    local MinX = -100
657
    local MaxY = 100
658
    local MinY = -100
659
    local MaxZ = 100
660
    local MinZ = -100
661
    local Morph = coroutine.wrap(function()
662
    while Run.Stepped:wait(0.1) do
663
    if Morph == false then break end
664
    local Model = Instance.new("Model",workspace)
665
    if Player.Character:FindFirstChild("Shirt") then
666
    local Shirt = Player.Character.Shirt:Clone()
667
    Shirt.Parent = Model
668
    end
669
    if Player.Character:FindFirstChild("Pants") then
670
    local Pants = Player.Character.Pants:Clone()
671
    Pants.Parent = Model
672
    end
673
    local Humanoid = Instance.new("Humanoid",Model)
674
    local LeftArm = Player.Character["Left Arm"]:Clone()
675
    LeftArm.Parent = Model
676
    LeftArm.Transparency = 0.4
677
    LeftArm.Anchored = true
678
    LeftArm.CFrame = Player.Character["Left Arm"].CFrame * CFrame.new(math.random(MinX,MaxX)*0.003,math.random(MinY,MaxY)*0.003,math.random(MinZ,MaxZ)*0.003)
679
    local RightArm = Player.Character["Right Arm"]:Clone()
680
    RightArm.Parent = Model
681
    RightArm.Transparency = 0.4
682
    RightArm.Anchored = true
683
    RightArm.CFrame = Player.Character["Right Arm"].CFrame * CFrame.new(math.random(MinX,MaxX)*0.003,math.random(MinY,MaxY)*0.003,math.random(MinZ,MaxZ)*0.003)
684
    local LeftLeg = Player.Character["Left Leg"]:Clone()
685
    LeftLeg.Parent = Model
686
    LeftLeg.Transparency = 0.4
687
    LeftLeg.Anchored = true
688
    LeftLeg.CFrame = Player.Character["Left Leg"].CFrame * CFrame.new(math.random(MinX,MaxX)*0.003,math.random(MinY,MaxY)*0.003,math.random(MinZ,MaxZ)*0.003)
689
    local RightLeg = Player.Character["Right Leg"]:Clone()
690
    RightLeg.Parent = Model
691
    RightLeg.Transparency = 0.4
692
    RightLeg.Anchored = true   
693
    RightLeg.CFrame = Player.Character["Right Leg"].CFrame * CFrame.new(math.random(MinX,MaxX)*0.003,math.random(MinY,MaxY)*0.003,math.random(MinZ,MaxZ)*0.003)
694
    local Children = Model:GetChildren()
695
    wait(0.01)
696
    for i = 1,#Children do
697
        if Children[i]:IsA("Part") then
698
        Children[i].Transparency = 1
699
        end
700
        game.Debris:AddItem(Children[i],0)
701
    end
702
    end
703
    end)
704
    Morph()
705
end
706
 
707
local Guis = coroutine.wrap(function()
708
    local Gui = Instance.new("ScreenGui",Player.PlayerGui)
709
    local TextBox = Instance.new("TextBox",Gui)
710
    TextBox.Text = "Speed"
711
    TextBox.BackgroundColor3 = Color3.new(255,255,255)
712
    TextBox.BorderColor3 = Color3.new(0,0,0)
713
    TextBox.Size = UDim2.new(0,200,0,25)
714
    TextBox.Position = UDim2.new(0,10,0.5,-12.5)
715
    TextBox.FocusLost:connect(function(EnterPressed)
716
        if EnterPressed then
717
            Player.Character.Humanoid.WalkSpeed = TextBox.Text
718
        end
719
    end)
720
    local Flash = Instance.new("TextButton",Gui)
721
    Flash.BackgroundColor3 = Color3.new(255,255,255)
722
    Flash.BorderColor3 = Color3.new(0,0,0)
723
    Flash.Size = UDim2.new(0,200,0,25)
724
    Flash.Position = UDim2.new(0,10,0.5,22.5)
725
    Flash.Text = "The Flash"
726
    Flash.MouseButton1Click:connect(function()
727
        Color = BrickColor.Yellow()
728
        PColor = Color3.new(255,255,0)
729
    end)
730
    local RFlash = Instance.new("TextButton",Gui)
731
    RFlash.BackgroundColor3 = Color3.new(255,255,255)
732
    RFlash.BorderColor3 = Color3.new(0,0,0)
733
    RFlash.Size = UDim2.new(0,200,0,25)
734
    RFlash.Position = UDim2.new(0,10,0.5,57.5)
735
    RFlash.Text = "The Reverse Flash"
736
    RFlash.MouseButton1Click:connect(function()
737
        Color = BrickColor.new("Really red")
738
        PColor = Color3.new(255,0,0)
739
    end)
740
    local Zoom = Instance.new("TextButton",Gui)
741
    Zoom.BackgroundColor3 = Color3.new(255,255,255)
742
    Zoom.BorderColor3 = Color3.new(0,0,0)
743
    Zoom.Size = UDim2.new(0,200,0,25)
744
    Zoom.Position = UDim2.new(0,10,0.5,92.5)
745
    Zoom.Text = "Zoom"
746
    Zoom.MouseButton1Click:connect(function()
747
        Color = BrickColor.new("Cyan")
748
        PColor = Color3.new(0,170,255)
749
    end)
750
    local Radius = Instance.new("TextBox",Gui)
751
    Radius.Text = "Tornado Radius"
752
    Radius.BackgroundColor3 = Color3.new(255,255,255)
753
    Radius.BorderColor3 = Color3.new(0,0,0)
754
    Radius.Size = UDim2.new(0,200,0,25)
755
    Radius.Position = UDim2.new(0,10,0.5,127.5)
756
    Radius.FocusLost:connect(function(EnterPressed)
757
        if EnterPressed then
758
            TornadoRadius = Radius.Text
759
        end
760
    end)
761
    Mouse.KeyDown:connect(function(Key)
762
        if Key == "f" then
763
            if Portal == false then
764
                PortalFunction()
765
                Nil()
766
            else
767
                Portal = false
768
            end
769
        end
770
        if Key == "r" then
771
            if Phase == false then
772
                Phase = true
773
                PhaseFunction()
774
                print "PhaseFunction"
775
            else
776
                Phase = false
777
            end
778
        end
779
        if Key == "e" then
780
            if Tornado == false then
781
                Tornado = true
782
                TornadoFunction()
783
            else
784
                Tornado = false
785
            end
786
        end
787
        if Key == "t" then
788
            if Morph == false then
789
                Morph = true
790
                MorphFunction()
791
            else
792
                Morph = false
793
            end
794
        end
795
    end)
796
end)
797
Guis()
798
 
799
Run.RenderStepped:connect(function()
800
    if (Object.CFrame.p - PreviousP).magnitude > 7 and Player.Character.Humanoid.WalkSpeed > 25 and Portal == false and PortalEnd == false then
801
    local Model = Instance.new("Model",workspace)
802
    Model.Name = "Ray"
803
    local Humanoid = Instance.new("Humanoid",Model)
804
    if Player.Character:FindFirstChild("Shirt") ~= nil then
805
        Player.Character.Shirt:Clone().Parent = Model
806
    end
807
    if Player.Character:FindFirstChild("Pants") ~= nil then
808
        Player.Character.Pants:Clone().Parent = Model
809
    end
810
    local distance = (Object.CFrame.p - PreviousP).magnitude
811
    local Light = Instance.new("Part",Model)
812
    Light.Anchored = true
813
    Light.CanCollide = false
814
    Light.TopSurface = "SmoothNoOutlines"
815
    Light.BottomSurface = "SmoothNoOutlines"
816
    Light.BackSurface = "SmoothNoOutlines"
817
    Light.FrontSurface = "SmoothNoOutlines"
818
    Light.LeftSurface = "SmoothNoOutlines"
819
    Light.RightSurface = "SmoothNoOutlines"
820
    Light.Transparency = 1
821
    Light.BrickColor = BrickColor.Black()
822
    Light.Size = Vector3.new(2,2,distance)
823
    Light.CFrame = CFrame.new(Object.CFrame.p , PreviousP) * CFrame.new(0,0,-distance/2)
824
   
825
    local PointLight = Instance.new("PointLight",Light)
826
    PointLight.Range = 15
827
    PointLight.Brightness = 100
828
    PointLight.Color = PColor
829
 
830
    local distance = (Arm1.CFrame.p - PreviousA1).magnitude
831
 
832
    local Arm1Light = Instance.new("Part",Model)
833
    Arm1Light.Name = "Right Arm"
834
    Arm1Light.Anchored = true
835
    Arm1Light.CanCollide = false
836
    Arm1Light.TopSurface = "SmoothNoOutlines"
837
    Arm1Light.BottomSurface = "SmoothNoOutlines"
838
    Arm1Light.BackSurface = "SmoothNoOutlines"
839
    Arm1Light.FrontSurface = "SmoothNoOutlines"
840
    Arm1Light.LeftSurface = "SmoothNoOutlines"
841
    Arm1Light.RightSurface = "SmoothNoOutlines"
842
    Arm1Light.Transparency = 0.5
843
    Arm1Light.BrickColor = BrickColor.Black()
844
    Arm1Light.Size = Vector3.new(1,2,distance)
845
    Arm1Light.CFrame = CFrame.new(Arm1.CFrame.p , PreviousA1) * CFrame.new(0,0,-distance/2) * CFrame.Angles(0,math.rad(180),0)
846
 
847
    local distance = (Arm2.CFrame.p - PreviousA2).magnitude
848
 
849
    local Arm2Light = Instance.new("Part",Model)
850
    Arm2Light.Name = "Left Arm"
851
    Arm2Light.Anchored = true
852
    Arm2Light.CanCollide = false
853
    Arm2Light.TopSurface = "SmoothNoOutlines"
854
    Arm2Light.BottomSurface = "SmoothNoOutlines"
855
    Arm2Light.BackSurface = "SmoothNoOutlines"
856
    Arm2Light.FrontSurface = "SmoothNoOutlines"
857
    Arm2Light.LeftSurface = "SmoothNoOutlines"
858
    Arm2Light.RightSurface = "SmoothNoOutlines"
859
    Arm2Light.Transparency = 0.5
860
    Arm2Light.BrickColor = BrickColor.Black()
861
    Arm2Light.Size = Vector3.new(1,2,distance)
862
    Arm2Light.CFrame = CFrame.new(Arm2.CFrame.p , PreviousA2) * CFrame.new(0,0,-distance/2) * CFrame.Angles(0,math.rad(180),0)
863
 
864
    local distance = (Leg1.CFrame.p - PreviousL1).magnitude
865
 
866
    local Leg1Light = Instance.new("Part",Model)
867
    Leg1Light.Name = "Right Leg"
868
    Leg1Light.Anchored = true
869
    Leg1Light.CanCollide = false
870
    Leg1Light.TopSurface = "SmoothNoOutlines"
871
    Leg1Light.BottomSurface = "SmoothNoOutlines"
872
    Leg1Light.BackSurface = "SmoothNoOutlines"
873
    Leg1Light.FrontSurface = "SmoothNoOutlines"
874
    Leg1Light.LeftSurface = "SmoothNoOutlines"
875
    Leg1Light.RightSurface = "SmoothNoOutlines"
876
    Leg1Light.Transparency = 0.5
877
    Leg1Light.BrickColor = BrickColor.Black()
878
    Leg1Light.Size = Vector3.new(1,2,distance)
879
    Leg1Light.CFrame = CFrame.new(Leg1.CFrame.p , PreviousL1) * CFrame.new(0,0,-distance/2) * CFrame.Angles(0,math.rad(180),0)
880
 
881
    local distance = (Leg2.CFrame.p - PreviousL2).magnitude
882
 
883
    local Leg1Light = Instance.new("Part",Model)
884
    Leg1Light.Name = "Left Leg"
885
    Leg1Light.Anchored = true
886
    Leg1Light.CanCollide = false
887
    Leg1Light.TopSurface = "SmoothNoOutlines"
888
    Leg1Light.BottomSurface = "SmoothNoOutlines"
889
    Leg1Light.BackSurface = "SmoothNoOutlines"
890
    Leg1Light.FrontSurface = "SmoothNoOutlines"
891
    Leg1Light.LeftSurface = "SmoothNoOutlines"
892
    Leg1Light.RightSurface = "SmoothNoOutlines"
893
    Leg1Light.Transparency = 0.5
894
    Leg1Light.BrickColor = BrickColor.Black()
895
    Leg1Light.Size = Vector3.new(1,2,distance)
896
    Leg1Light.CFrame = CFrame.new(Leg2.CFrame.p , PreviousL2) * CFrame.new(0,0,-distance/2) * CFrame.Angles(0,math.rad(180),0)
897
 
898
    local Point1 = Instance.new("Part",Model)
899
    Point1.Transparency = 1
900
    Point1.Anchored = true
901
    Point1.CanCollide = false
902
    Point1.Size = Vector3.new(0.2,0.2,0.2)
903
    Point1.CFrame = Light.CFrame * CFrame.new(0,0,-Light.Size.Z/2)
904
     * CFrame.new(Light.Size.X/2 ,0 ,0)
905
     * CFrame.new(math.random(LightMinX,LightMaxX),0,0)
906
     * CFrame.new(0,math.random(LightMinY,LightMaxY),0)
907
   
908
    local Point2 = Instance.new("Part",Model)
909
    Point2.Transparency = 1
910
    Point2.Anchored = true
911
    Point2.CanCollide = false
912
    Point2.Size = Vector3.new(0.2,0.2,0.2)
913
    Point2.CFrame = Light.CFrame * CFrame.new(0,0,Light.Size.Z/2)
914
     * CFrame.new(Light.Size.X/2 ,0 ,0)
915
     * CFrame.new(math.random(LightMinX,LightMaxX),0,0)
916
     * CFrame.new(0,math.random(LightMinY,LightMaxY),0)
917
   
918
    local Point5 = Instance.new("Part",Model)
919
    Point5.Transparency = 1
920
    Point5.Anchored = true
921
    Point5.CanCollide = false
922
    Point5.Size = Vector3.new(0.2,0.2,0.2)
923
    Point5.CFrame = Light.CFrame * CFrame.new(0,0,-Light.Size.Z/2)
924
     * CFrame.new(Light.Size.X/2 ,0 ,0)
925
     * CFrame.new(math.random(LightMinX,LightMaxX),0,0)
926
     * CFrame.new(0,math.random(LightMinY,LightMaxY),0)
927
   
928
    local Point6 = Instance.new("Part",Model)
929
    Point6.Transparency = 1
930
    Point6.Anchored = true
931
    Point6.CanCollide = false
932
    Point6.Size = Vector3.new(0.2,0.2,0.2)
933
    Point6.CFrame = Light.CFrame * CFrame.new(0,0,Light.Size.Z/2)
934
     * CFrame.new(Light.Size.X/2 ,0 ,0)
935
     * CFrame.new(math.random(LightMinX,LightMaxX),0,0)
936
     * CFrame.new(0,math.random(LightMinY,LightMaxY),0)
937
   
938
    local Point3 = Instance.new("Part",Model)
939
    Point3.Transparency = 1
940
    Point3.Anchored = true
941
    Point3.CanCollide = false
942
    Point3.Size = Vector3.new(0.2,0.2,0.2)
943
    Point3.CFrame = Light.CFrame * CFrame.new(0,0,-Light.Size.Z/2)
944
     * CFrame.new(-Light.Size.X/2 ,0 ,0)
945
     * CFrame.new(math.random(LightMinX2,LightMaxX2),0,0)
946
     * CFrame.new(0,math.random(LightMinY,LightMaxY),0)
947
   
948
    local Point4 = Instance.new("Part",Model)
949
    Point4.Transparency = 1
950
    Point4.Anchored = true
951
    Point4.CanCollide = false
952
    Point4.Size = Vector3.new(0.2,0.2,0.2)
953
    Point4.CFrame = Light.CFrame * CFrame.new(0,0,Light.Size.Z/2)
954
     * CFrame.new(-Light.Size.X/2 ,0 ,0)
955
     * CFrame.new(math.random(LightMinX2,LightMaxX2),0,0)
956
     * CFrame.new(0,math.random(LightMinY,LightMaxY),0)
957
 
958
    local Point7 = Instance.new("Part",Model)
959
    Point7.Transparency = 1
960
    Point7.Anchored = true
961
    Point7.CanCollide = false
962
    Point7.Size = Vector3.new(0.2,0.2,0.2)
963
    Point7.CFrame = Light.CFrame * CFrame.new(0,0,-Light.Size.Z/2)
964
     * CFrame.new(-Light.Size.X/2 ,0 ,0)
965
     * CFrame.new(math.random(LightMinX2,LightMaxX2),0,0)
966
     * CFrame.new(0,math.random(LightMinY,LightMaxY),0)
967
   
968
    local Point8 = Instance.new("Part",Model)
969
    Point8.Transparency = 1
970
    Point8.Anchored = true
971
    Point8.CanCollide = false
972
    Point8.Size = Vector3.new(0.2,0.2,0.2)
973
    Point8.CFrame = Light.CFrame * CFrame.new(0,0,Light.Size.Z/2)
974
     * CFrame.new(-Light.Size.X/2 ,0 ,0)
975
     * CFrame.new(math.random(LightMinX2,LightMaxX2),0,0)
976
     * CFrame.new(0,math.random(LightMinY,LightMaxY),0)
977
 
978
    local Point9 = Instance.new("Part",Model)
979
    Point9.Transparency = 1
980
    Point9.Anchored = true
981
    Point9.CanCollide = false
982
    Point9.Size = Vector3.new(0.2,0.2,0.2)
983
    Point9.CFrame = Light.CFrame * CFrame.new(0,-1,-Light.Size.Z/2)
984
     * CFrame.new(Light.Size.X/2 ,-2 ,0)
985
     * CFrame.new(math.random(LightMinX,LightMaxX),0,0)
986
     * CFrame.new(0,math.random(LightMinY,LightMaxY),0)
987
   
988
    local Point10 = Instance.new("Part",Model)
989
    Point10.Transparency = 1
990
    Point10.Anchored = true
991
    Point10.CanCollide = false
992
    Point10.Size = Vector3.new(0.2,0.2,0.2)
993
    Point10.CFrame = Light.CFrame * CFrame.new(0,-1,Light.Size.Z/2)
994
     * CFrame.new(Light.Size.X/2 ,0 ,0)
995
     * CFrame.new(math.random(LightMinX,LightMaxX),0,0)
996
     * CFrame.new(0,math.random(LightMinY,LightMaxY),0)
997
   
998
    local Point11 = Instance.new("Part",Model)
999
    Point11.Transparency = 1
1000
    Point11.Anchored = true
1001
    Point11.CanCollide = false
1002
    Point11.Size = Vector3.new(0.2,0.2,0.2)
1003
    Point11.CFrame = Light.CFrame * CFrame.new(0,-1,-Light.Size.Z/2)
1004
     * CFrame.new(Light.Size.X/2 ,-2 ,0)
1005
     * CFrame.new(math.random(LightMinX2,LightMaxX2),0,0)
1006
     * CFrame.new(0,math.random(LightMinY,LightMaxY),0)
1007
   
1008
    local Point12 = Instance.new("Part",Model)
1009
    Point12.Transparency = 1
1010
    Point12.Anchored = true
1011
    Point12.CanCollide = false
1012
    Point12.Size = Vector3.new(0.2,0.2,0.2)
1013
    Point12.CFrame = Light.CFrame * CFrame.new(0,-1,Light.Size.Z/2)
1014
     * CFrame.new(Light.Size.X/2 ,-2 ,0)
1015
     * CFrame.new(math.random(LightMinX2,LightMaxX2),0,0)
1016
     * CFrame.new(0,math.random(LightMinY,LightMaxY),0)
1017
 
1018
if PrevPoint2 == nil or PrevPoint2 == "Empty" then
1019
        local distance = (Point2.CFrame.p - Point1.CFrame.p).magnitude
1020
        local Light = Instance.new("Part",Model)
1021
        Light.Anchored = true
1022
        Light.CanCollide = false
1023
        Light.TopSurface = "SmoothNoOutlines"
1024
        Light.BottomSurface = "SmoothNoOutlines"
1025
        Light.BackSurface = "SmoothNoOutlines"
1026
        Light.FrontSurface = "SmoothNoOutlines"
1027
        Light.LeftSurface = "SmoothNoOutlines"
1028
        Light.RightSurface = "SmoothNoOutlines"
1029
        Light.Transparency = 0
1030
        Light.Size = Vector3.new(0.4,0.4,distance)
1031
        Light.Material = "Neon"
1032
        Light.BrickColor = Color
1033
        Light.CFrame = CFrame.new(Point2.CFrame.p , Point1.CFrame.p) * CFrame.new(0,0,-distance/2)
1034
    elseif PrevPoint2 ~= nil then
1035
        local distance = (Point2.CFrame.p - PrevPoint2).magnitude
1036
        local Light = Instance.new("Part",Model)
1037
        Light.Anchored = true
1038
        Light.CanCollide = false
1039
        Light.TopSurface = "SmoothNoOutlines"
1040
        Light.BottomSurface = "SmoothNoOutlines"
1041
        Light.BackSurface = "SmoothNoOutlines"
1042
        Light.FrontSurface = "SmoothNoOutlines"
1043
        Light.LeftSurface = "SmoothNoOutlines"
1044
        Light.RightSurface = "SmoothNoOutlines"
1045
        Light.Transparency = 0
1046
        Light.Size = Vector3.new(0.4,0.4,distance)
1047
        Light.Material = "Neon"
1048
        Light.BrickColor = Color
1049
        Light.CFrame = CFrame.new(Point2.CFrame.p , PrevPoint2) * CFrame.new(0,0,-distance/2)      
1050
    end
1051
 
1052
if PrevPoint4 == nil or PrevPoint4 == "Empty" then
1053
        local distance = (Point4.CFrame.p - Point3.CFrame.p).magnitude
1054
        local Light = Instance.new("Part",Model)
1055
        Light.Anchored = true
1056
        Light.CanCollide = false
1057
        Light.TopSurface = "SmoothNoOutlines"
1058
        Light.BottomSurface = "SmoothNoOutlines"
1059
        Light.BackSurface = "SmoothNoOutlines"
1060
        Light.FrontSurface = "SmoothNoOutlines"
1061
        Light.LeftSurface = "SmoothNoOutlines"
1062
        Light.RightSurface = "SmoothNoOutlines"
1063
        Light.Transparency = 0
1064
        Light.Size = Vector3.new(0.4,0.4,distance)
1065
        Light.Material = "Neon"
1066
        Light.BrickColor = Color
1067
        Light.CFrame = CFrame.new(Point4.CFrame.p , Point3.CFrame.p) * CFrame.new(0,0,-distance/2) 
1068
    elseif PrevPoint4 ~= nil then
1069
        local distance = (Point4.CFrame.p - PrevPoint4).magnitude
1070
        local Light = Instance.new("Part",Model)
1071
        Light.Anchored = true
1072
        Light.CanCollide = false
1073
        Light.TopSurface = "SmoothNoOutlines"
1074
        Light.BottomSurface = "SmoothNoOutlines"
1075
        Light.BackSurface = "SmoothNoOutlines"
1076
        Light.FrontSurface = "SmoothNoOutlines"
1077
        Light.LeftSurface = "SmoothNoOutlines"
1078
        Light.RightSurface = "SmoothNoOutlines"
1079
        Light.Transparency = 0
1080
        Light.Size = Vector3.new(0.4,0.4,distance)
1081
        Light.Material = "Neon"
1082
        Light.BrickColor = Color
1083
        Light.CFrame = CFrame.new(Point4.CFrame.p , PrevPoint4) * CFrame.new(0,0,-distance/2)  
1084
    end
1085
 
1086
 
1087
if PrevPoint6 == nil or PrevPoint6 == "Empty" then
1088
        local distance = (Point6.CFrame.p - Point5.CFrame.p).magnitude
1089
        local Light = Instance.new("Part",Model)
1090
        Light.Anchored = true
1091
        Light.CanCollide = false
1092
        Light.TopSurface = "SmoothNoOutlines"
1093
        Light.BottomSurface = "SmoothNoOutlines"
1094
        Light.BackSurface = "SmoothNoOutlines"
1095
        Light.FrontSurface = "SmoothNoOutlines"
1096
        Light.LeftSurface = "SmoothNoOutlines"
1097
        Light.RightSurface = "SmoothNoOutlines"
1098
        Light.Transparency = 0
1099
        Light.Size = Vector3.new(0.4,0.4,distance)
1100
        Light.Material = "Neon"
1101
        Light.BrickColor = Color
1102
        Light.CFrame = CFrame.new(Point6.CFrame.p , Point5.CFrame.p) * CFrame.new(0,0,-distance/2) 
1103
    elseif PrevPoint6 ~= nil then
1104
        local distance = (Point6.CFrame.p - PrevPoint6).magnitude
1105
        local Light = Instance.new("Part",Model)
1106
        Light.Anchored = true
1107
        Light.CanCollide = false
1108
        Light.TopSurface = "SmoothNoOutlines"
1109
        Light.BottomSurface = "SmoothNoOutlines"
1110
        Light.BackSurface = "SmoothNoOutlines"
1111
        Light.FrontSurface = "SmoothNoOutlines"
1112
        Light.LeftSurface = "SmoothNoOutlines"
1113
        Light.RightSurface = "SmoothNoOutlines"
1114
        Light.Transparency = 0
1115
        Light.Size = Vector3.new(0.4,0.4,distance)
1116
        Light.Material = "Neon"
1117
        Light.BrickColor = Color
1118
        Light.CFrame = CFrame.new(Point6.CFrame.p , PrevPoint6) * CFrame.new(0,0,-distance/2)  
1119
    end
1120
   
1121
if PrevPoint8 == nil or PrevPoint8 == "Empty" then
1122
        local distance = (Point8.CFrame.p - Point7.CFrame.p).magnitude
1123
        local Light = Instance.new("Part",Model)
1124
        Light.Anchored = true
1125
        Light.CanCollide = false
1126
        Light.TopSurface = "SmoothNoOutlines"
1127
        Light.BottomSurface = "SmoothNoOutlines"
1128
        Light.BackSurface = "SmoothNoOutlines"
1129
        Light.FrontSurface = "SmoothNoOutlines"
1130
        Light.LeftSurface = "SmoothNoOutlines"
1131
        Light.RightSurface = "SmoothNoOutlines"
1132
        Light.Transparency = 0
1133
        Light.Size = Vector3.new(0.4,0.4,distance)
1134
        Light.Material = "Neon"
1135
        Light.BrickColor = Color
1136
        Light.CFrame = CFrame.new(Point8.CFrame.p , Point7.CFrame.p) * CFrame.new(0,0,-distance/2) 
1137
    elseif PrevPoint8 ~= nil then
1138
        local distance = (Point8.CFrame.p - PrevPoint8).magnitude
1139
        local Light = Instance.new("Part",Model)
1140
        Light.Anchored = true
1141
        Light.CanCollide = false
1142
        Light.TopSurface = "SmoothNoOutlines"
1143
        Light.BottomSurface = "SmoothNoOutlines"
1144
        Light.BackSurface = "SmoothNoOutlines"
1145
        Light.FrontSurface = "SmoothNoOutlines"
1146
        Light.LeftSurface = "SmoothNoOutlines"
1147
        Light.RightSurface = "SmoothNoOutlines"
1148
        Light.Transparency = 0
1149
        Light.Size = Vector3.new(0.4,0.4,distance)
1150
        Light.Material = "Neon"
1151
        Light.BrickColor = Color
1152
        Light.CFrame = CFrame.new(Point8.CFrame.p , PrevPoint8) * CFrame.new(0,0,-distance/2)
1153
    end
1154
   
1155
if PrevPoint10 == nil or PrevPoint10 == "Empty" then
1156
        local distance = (Point10.CFrame.p - Point9.CFrame.p).magnitude
1157
        local Light = Instance.new("Part",Model)
1158
        Light.Anchored = true
1159
        Light.CanCollide = false
1160
        Light.TopSurface = "SmoothNoOutlines"
1161
        Light.BottomSurface = "SmoothNoOutlines"
1162
        Light.BackSurface = "SmoothNoOutlines"
1163
        Light.FrontSurface = "SmoothNoOutlines"
1164
        Light.LeftSurface = "SmoothNoOutlines"
1165
        Light.RightSurface = "SmoothNoOutlines"
1166
        Light.Transparency = 0
1167
        Light.Size = Vector3.new(0.4,0.4,distance)
1168
        Light.Material = "Neon"
1169
        Light.BrickColor = Color
1170
        Light.CFrame = CFrame.new(Point10.CFrame.p , Point9.CFrame.p) * CFrame.new(0,0,-distance/2)
1171
elseif PrevPoint10 ~= nil then
1172
        local distance = (Point10.CFrame.p - PrevPoint10).magnitude
1173
        local Light = Instance.new("Part",Model)
1174
        Light.Anchored = true
1175
        Light.CanCollide = false
1176
        Light.TopSurface = "SmoothNoOutlines"
1177
        Light.BottomSurface = "SmoothNoOutlines"
1178
        Light.BackSurface = "SmoothNoOutlines"
1179
        Light.FrontSurface = "SmoothNoOutlines"
1180
        Light.LeftSurface = "SmoothNoOutlines"
1181
        Light.RightSurface = "SmoothNoOutlines"
1182
        Light.Transparency = 0
1183
        Light.Size = Vector3.new(0.4,0.4,distance)
1184
        Light.Material = "Neon"
1185
        Light.BrickColor = Color
1186
        Light.CFrame = CFrame.new(Point10.CFrame.p , PrevPoint10) * CFrame.new(0,0,-distance/2)
1187
    end
1188
 
1189
   
1190
if PrevPoint12 == nil or PrevPoint12 == "Empty" then
1191
        local distance = (Point12.CFrame.p - Point11.CFrame.p).magnitude
1192
        local Light = Instance.new("Part",Model)
1193
        Light.Anchored = true
1194
        Light.CanCollide = false
1195
        Light.TopSurface = "SmoothNoOutlines"
1196
        Light.BottomSurface = "SmoothNoOutlines"
1197
        Light.BackSurface = "SmoothNoOutlines"
1198
        Light.FrontSurface = "SmoothNoOutlines"
1199
        Light.LeftSurface = "SmoothNoOutlines"
1200
        Light.RightSurface = "SmoothNoOutlines"
1201
        Light.Transparency = 0
1202
        Light.Size = Vector3.new(0.4,0.4,distance)
1203
        Light.Material = "Neon"
1204
        Light.BrickColor = Color
1205
        Light.CFrame = CFrame.new(Point12.CFrame.p , Point11.CFrame.p) * CFrame.new(0,0,-distance/2)   
1206
    elseif PrevPoint12 ~= nil then
1207
        local distance = (Point12.CFrame.p - PrevPoint12).magnitude
1208
        local Light = Instance.new("Part",Model)
1209
        Light.Anchored = true
1210
        Light.CanCollide = false
1211
        Light.TopSurface = "SmoothNoOutlines"
1212
        Light.BottomSurface = "SmoothNoOutlines"
1213
        Light.BackSurface = "SmoothNoOutlines"
1214
        Light.FrontSurface = "SmoothNoOutlines"
1215
        Light.LeftSurface = "SmoothNoOutlines"
1216
        Light.RightSurface = "SmoothNoOutlines"
1217
        Light.Transparency = 0
1218
        Light.Size = Vector3.new(0.4,0.4,distance)
1219
        Light.Material = "Neon"
1220
        Light.BrickColor = Color
1221
        Light.CFrame = CFrame.new(Point12.CFrame.p , PrevPoint12) * CFrame.new(0,0,-distance/2)
1222
    end
1223
    PreviousP = Object.CFrame.p
1224
    PreviousA1 = Arm1.CFrame.p
1225
    PreviousA2 = Arm2.CFrame.p
1226
    PreviousL1 = Leg1.CFrame.p
1227
    PreviousL2 = Leg2.CFrame.p
1228
    PrevPoint1 = Point1.CFrame.p
1229
    PrevPoint2 = Point2.CFrame.p
1230
    PrevPoint3 = Point3.CFrame.p
1231
    PrevPoint4 = Point4.CFrame.p
1232
    PrevPoint5 = Point5.CFrame.p
1233
    PrevPoint6 = Point6.CFrame.p
1234
    PrevPoint7 = Point7.CFrame.p
1235
    PrevPoint8 = Point8.CFrame.p
1236
    PrevPoint9 = Point9.CFrame.p
1237
    PrevPoint10 = Point10.CFrame.p
1238
    PrevPoint11 = Point11.CFrame.p
1239
    PrevPoint12 = Point12.CFrame.p
1240
    local Children = Model:GetChildren()
1241
    wait(1)
1242
    for i = 1,10 do
1243
    local Remove = coroutine.wrap(function()
1244
    for i = 1,#Children do
1245
        if Children[i]:IsA("Part") then
1246
        Children[i].Transparency = Children[i].Transparency + 0.1
1247
            if Children[i].Transparency >= 1 and Children[i] ~= Light and Children[i] ~= Point1 and Children[i] ~= Point2 and Children[i] ~= Point3
1248
                 and Children[i] ~= Point4 and Children[i] ~= Point5 and Children[i] ~= Point6 and Children[i] ~= Point7 and Children[i] ~= Point8
1249
                 and Children[i] ~= Point9 and Children[i] ~= Point10 and Children[i] ~= Point11 and Children[i] ~= Point12 then
1250
                game.Debris:AddItem(Children[i],0)
1251
            end
1252
        end
1253
        if Children[i].ClassName ~= "Part" then
1254
            game.Debris:AddItem(Children[i],0)
1255
        end
1256
    end        
1257
    end)
1258
        Remove()
1259
        wait(0.05)
1260
    end
1261
    game.Debris:AddItem(Light,0)
1262
    game.Debris:AddItem(Point1,0)
1263
    game.Debris:AddItem(Point2,0)
1264
    game.Debris:AddItem(Point3,0)
1265
    game.Debris:AddItem(Point4,0)
1266
    game.Debris:AddItem(Point5,0)
1267
    game.Debris:AddItem(Point6,0)
1268
    game.Debris:AddItem(Point7,0)
1269
    game.Debris:AddItem(Point8,0)
1270
    game.Debris:AddItem(Point9,0)
1271
    game.Debris:AddItem(Point10,0)
1272
    game.Debris:AddItem(Point11,0)
1273
    game.Debris:AddItem(Point12,0)
1274
end
1275
end)