View difference between Paste ID: hALD3zSg and rYp7txpw
SHOW: | | - or go back to the newest paste.
1
--[[
2
 
3
 
4
hl/https://code.stypi.com/raw/nZHFXIlEQs5UF7XIOYsaGPc1
5
 
6
 
7
]]
8
player=game:GetService'Players'.LocalPlayer
9
 
10
 
11-
nqqas={"ethan15864"}--
11+
nqqas={"timetodie23232223"}--
12
aggrorange=120;
13
 
14
messages={
15
        [1]="Humanoid Detected: %p";
16
        [2.4]="Scanning";
17
        [5.9]="WARNING";
18
        [6.1]="Threat detected; Engaging in combat";
19
        [6.3]="FIRE";
20
}
21
 
22
 
23
t=Instance.new("Tool", player.Backpack)
24
t.Name="Bot"
25
print("GS1029 Bot Awaiting Input");
26
 
27
Instance.new("Part", t).Name="Handle"
28
t.Equipped:connect(function()
29
       
30
        model=Instance.new("Model", workspace)
31
        model.Name="T609"
32
        print("GS1029 Bot Loaded");
33
       
34
        box=Instance.new("Part", model)
35
        box.FormFactor=Enum.FormFactor.Custom
36
        box.Size=Vector3.new(4, 4, 2)
37
        box.Name="Head"
38
        dc=Instance.new("Decal", box)
39
        dc.Texture="http://www.roblox.com/asset/?id=209889024"
40
        dc.Face=Enum.NormalId.Front
41
        boxmeshy=Instance.new("SpecialMesh", box)
42
        boxmeshy.MeshType=Enum.MeshType.FileMesh
43
        boxmeshy.MeshId="rbxassetid://11954776"
44
        boxmeshy.TextureId="rbxassetid://267871020"
45
        boxmeshy.VertexColor=Vector3.new(0, 1, 1)
46
        local heel=Instance.new("Sound", box)
47
        heel.SoundId="rbxassetid://435185931"
48
        box.BrickColor=BrickColor.new("Toothpaste")
49
        box.Anchored=false
50
        box.TopSurface="Smooth"
51
        box.BottomSurface="Smooth"
52
       
53
        hum=Instance.new("Humanoid", model)
54
        hum.MaxHealth=100000000000
55
        hum.Health=100000000000
56
        hum.Health=100000000000
57
        hum.Health=100000000000
58
        hum.Health=100000000000
59
        hum.Health=100000000000
60
        hum.Health=100000000000
61
       
62
        gun=Instance.new("Part", model)
63
        gun.FormFactor=Enum.FormFactor.Custom
64
        gun.Size=Vector3.new(.4, 1, 1.2)
65
        gun.Transparency = 1
66
        gun.Name="gun"
67
        local shoot=Instance.new("Sound", gun)
68
        shoot.SoundId="rbxassetid://296102734"
69
        gunmesh=Instance.new("SpecialMesh", gun)
70
        gunmesh.MeshType=Enum.MeshType.FileMesh
71
        gunmesh.MeshId="rbxassetid://4372594"
72
        gunmesh.TextureId="rbxassetid://0"
73
        gunmesh.VertexColor=Vector3.new(0, 0, 0)
74
        w=Instance.new("Weld", box)
75
        w.Part0=box
76
        w.Part1=gun
77
        w.C0=CFrame.new(2.20000076, 0.700000048, -1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
78
       
79
        local gyro=Instance.new("BodyGyro", box)
80
        gyro.maxTorque=Vector3.new(math.huge, math.huge, 0)
81
        gyro.P=10000
82
        local startTime=nil
83
        local oldBestPlaya
84
        local currentmsg=""
85
        model:MoveTo(player.Character.Torso.Position-Vector3.new(0, 1, 5))
86
        math.randomseed(tick())
87
        coroutine.wrap(function()
88
                while box do
89
                    wait()
90
                        local bestPlaya=nil
91
                        local bestDist=math.huge
92
                        if not oldBestPlaya or oldBestPlaya:DistanceFromCharacter(box.Position)>aggrorange then
93
                                for _, p in pairs(game:GetService'Players':GetPlayers()) do
94
                                        if p.Character and p.Character:FindFirstChild("Torso") and not p.Character:FindFirstChild("greeted") and p:DistanceFromCharacter(box.Position)<=aggrorange and p:DistanceFromCharacter(box.Position)<bestDist then
95
                                                bestPlaya=p
96
                                                bestDist=p:DistanceFromCharacter(box.Position)
97
                                        end
98
                                end
99
                                if bestPlaya then
100
                                        oldBestPlaya=bestPlaya
101
                                        startTime=tick()
102
                                end
103
                        end
104
                        local p=oldBestPlaya
105
                       
106
                       
107
                        if p then
108
                                notanqqa=true
109
                                for _, playa in pairs(nqqas) do
110
                                        if p.Name:lower()==playa:lower() then
111
                                                notanqqa=false
112
                                        end
113
                                end
114
                               
115
                                --print(p.Name)
116
                               
117
                                gyro.cframe=CFrame.new(box.CFrame.p, p.Character:FindFirstChild("Head") and p.Character.Head.CFrame.p or p.Character:GetModelCFrame())
118
                                if notanqqa then
119
                                        local msg=""
120
                                        local mtime=0
121
                                        for i, v in pairs(messages) do
122
                                                if i>=mtime and tick()-startTime>=i then
123
                                                        msg=v
124
                                                        mtime=i
125
                                                end
126
                                        end
127
                                        if currentmsg~=msg then
128
                                                currentmsg=msg
129
                                                if msg=="FIRE" then
130
                                                        for i=0, 250 do
131
                                                                shoot:Play()
132
                                                                boxmeshy.VertexColor=Vector3.new(1,0,0)
133
                                                                if p.Character and p.Character:FindFirstChild("Humanoid") then
134
                                                                        p.Character:FindFirstChild("Humanoid").Health=p.Character:FindFirstChild("Humanoid").Health-125
135
wait()
136
                                                                end
137
                                                                if p.Character and p.Character:FindFirstChild("Humanoid") and p.Character:FindFirstChild("Humanoid").Health<=0 then
138
                                                                    wait(3)
139
                                                        gyro.cframe=CFrame.new(0, 0, 0)
140
                                                                        wait(0.1)
141
                                                                        boxmeshy.VertexColor=Vector3.new(0, 0, 0)
142
                                                                        game:GetService("Chat"):Chat(box, ("Threat eliminated."):gsub("%%p", p.Name))
143
                                                                        wait(1)
144
                                                                        boxmeshy.VertexColor=Vector3.new(0, 1, 1)
145
                                                                        game:GetService("Chat"):Chat(box, ("Returning to searching mode."):gsub("%%p", p.Name))
146
                                                                        wait(2)
147
                                                                        game:GetService("Chat"):Chat(box, ("Searching for threats..."):gsub("%%p", p.Name))
148
                                                                        oldBestPlaya=nil
149
                                                                        break
150
                                                                       
151
                                                                end
152
                                                                wait(math.random(1, 10)/8)
153
                                                        end
154
                                                elseif msg~="" then
155
                                                        game:GetService("Chat"):Chat(box, msg:gsub("%%p", p.Name))
156
                                                end
157
                                        end
158
                                else
159
                                        wait(2)
160
                                        game:GetService("Chat"):Chat(box, ("Humanoid Detected: %p"):gsub("%%p", p.Name))
161
                                        wait(1.4)
162
                                        game:GetService("Chat"):Chat(box, ("Scanning"):gsub("%%p", p.Name))
163
                                        wait(3.5)
164
                                        game:GetService("Chat"):Chat(box, ("Humanoid on whitelist; greeting"):gsub("%%p", p.Name))
165
                                        wait(1)
166
                                        boxmeshy.VertexColor=Vector3.new(0, 1, 0)
167
                                        game:GetService("Chat"):Chat(box, ("Hello, %p. I am T609, an edit of the LunchaThug script. Created by GS1029 or GamingStudios1029."):gsub("%%p", p.Name))
168
                                        wait(5)
169
                                        game:GetService("Chat"):Chat(box, ("Healing player..."):gsub("%%p", p.Name))
170
                                        wait(1)
171
                                        p.Character:FindFirstChild("Humanoid").Health=p.Character:FindFirstChild("Humanoid").Health+5000
172
                                        heel:Play()
173
                                        wait(1)
174
                                        game:GetService("Chat"):Chat(box, ("Player healed."):gsub("%%p", p.Name))
175
                                        wait(1)
176
                                        boxmeshy.VertexColor=Vector3.new(0, 1, 1)
177
                                        game:GetService("Chat"):Chat(box, ("Returning to searching mode."):gsub("%%p", p.Name))
178
                                        wait(2)
179
                                        game:GetService("Chat"):Chat(box, ("Searching for threats..."):gsub("%%p", p.Name))
180
                                        wait(0.1)
181
                                        local gr=Instance.new("IntValue", p.Character)
182
                                        gr.Name="greeted"
183
                                        game:GetService("Debris"):AddItem(gr, 60);
184
                                        oldBestPlaya=nil
185
                                        wait(5)
186
                                        gyro.cframe=CFrame.new(0, 0, 0)
187
                                end
188
                        end
189
        end
190
        end)()
191
    if player.Character and player.Character:FindFirstChild("Humanoid") then
192
        player.Character.Humanoid:UnequipTools();
193
        wait()
194
        t:Destroy()
195
        end
196
end)