View difference between Paste ID: eXLifjiC and mjejqG0s
SHOW: | | - or go back to the newest paste.
1
local player = game.Players.LocalPlayer
2
local mouse = player:GetMouse()
3
plr2 = game.Players.LocalPlayer
4
cyan = true
5
green = false
6
red = false
7
purple = false
8
local plr = game.Players.LocalPlayer.Character
9
cleanup = true
10
path = false
11
12
local m = Instance.new("Model")
13
m.Name = "m" 
14
m.Parent = plr
15
16
mouse.KeyDown:connect(function(key)
17
    if key == "q" then
18
        if path == true then path = false elseif path == false then path = true end
19
    elseif key == "e" then
20
        if cleanup == true then cleanup = false elseif cleanup == false then cleanup = true end
21
    elseif key == "x" then 
22
        plr.m:ClearAllChildren()
23
    end
24
end)
25
spawn(function()
26
    while wait(1.35) do
27
       if cyan == true then
28
            green = true 
29
            cyan = false
30
        elseif green == true then 
31
            red = true 
32
            green = false
33
        elseif red == true then
34
            purple = true
35
            red = false
36
        elseif purple == true then
37
            cyan = true
38
            purple = false
39
        end 
40
    end
41
end)
42
function fade(part)
43
    wait(0.15)
44
    for i = 0.3,1,0.1 do wait()
45
       part.Transparency = i 
46
       if i == 0.8 or i == 0.9 or i == 0.7 or i == 0.6 or i == 0.5 or i == 0.4 then
47
           if cyan == true then
48
           part.BrickColor = BrickColor.new("Cyan")
49
       elseif green == true then
50
           part.BrickColor = BrickColor.new("Lime green")
51
       elseif red == true then
52
           part.BrickColor = BrickColor.new("Really red")
53
        elseif purple == true then
54
            part.BrickColor = BrickColor.new("Royal purple")
55
            end
56
           part.Material = "Neon"
57
        end
58
    end
59
    part:remove''
60
end
61
local num = 0.1
62
spawn(function()
63
while true do coroutine.yield()
64
    if path == true then
65
        num = num + 3.5
66
        local p = Instance.new("Part")
67
        p.Name = "p"
68
        p.Parent = plr.m
69
        p.FormFactor = "Custom"
70
        p.Size = Vector3.new(3,0.4,3)
71
        p.CFrame = plr.Torso.CFrame * CFrame.new(0,-3-(p.Size.Y/2),0) * CFrame.Angles(0,math.rad(num),0)
72
        p.Transparency = 0.3
73
        p.BrickColor = BrickColor.new("Really black")
74
        p.Anchored = true
75
        p.TopSurface = "Smooth"
76
        p.BottomSurface = "Smooth"
77
        spawn(function()
78
            if cleanup == true then
79
            fade(p)
80
            end
81
        end)
82
        else
83
    end
84
end
85
end)
86-
print("Controls: \nQ: Toggle path \nX: Clear all path \nE: Toggle path fade")
86+
print("Controls: \nQ: Toggle path \nX: Clear all path \nE: Toggle path fade")
87
        if Key == "e" and Mode == 1 then
88
                                                BHold = false
89
                                                repeat wait() Mode2 = 1 until BHold == false
90
                                                Mode2 = 0
91
       if Mode == 1 then
92
                                                        Mode = 2
93
                                                        coroutine.wrap(function()
94
                                                                while Mode == 2 do
95
                                                                        wait()
96
                                                                        if Char:GetModelCFrame().p.y < -10 then
97
                                                                                Mode = 1
98
                                                                        end
99
                                                                end
100
                                                        end)()
101
                                                else
102
                                                        Mode = 1
103
                                                end
104
                                        end
105
                                end)
106
                                Mouse.KeyUp:connect(function(Key)
107
                                        if Key == "q" or Key == "e" then
108
                                                BHold = false
109
                                        end
110
                                end