-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmain.lua
More file actions
210 lines (205 loc) · 7.45 KB
/
main.lua
File metadata and controls
210 lines (205 loc) · 7.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
local function send(text)
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCore("SendNotification",{
Title = "Fling by danya23131", -- You can remove this, idc
Text = text,
Duration = 5
})
end
local fakepart = Instance.new("Part", workspace)
local att1 = Instance.new("Attachment", fakepart)
local att2 = Instance.new("Attachment", game.Players.LocalPlayer.Character.HumanoidRootPart)
local body = Instance.new("AlignPosition", fakepart)
local mouse = game.Players.LocalPlayer:GetMouse()
body.Attachment0 = att2
body.Attachment1 = att1
body.RigidityEnabled = true
body.Responsiveness = math.huge
body.MaxForce = math.huge
body.MaxVelocity = math.huge
body.MaxAxesForce = Vector3.new(math.huge,math.huge,math.huge)
body.Visible = true
body.Mode = Enum.PositionAlignmentMode.TwoAttachment
game.Players.LocalPlayer.Character.Humanoid:ChangeState(Enum.HumanoidStateType.StrafingNoPhysics)
send("Please wait")
local oldcf = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(0,40000000,0)) * CFrame.fromEulerAnglesXYZ(math.rad(180),0,0)
game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity = Vector3.new(0,1000000,0)
task.wait(3)
game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = oldcf
task.wait(.2)
local power = 100
local attack = 5
fakepart.Anchored = true
fakepart.Size = Vector3.new(5,5,5)
fakepart.Position = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
fakepart.CanCollide = false
fakepart.Transparency = 0.5
fakepart.Material = Enum.Material.ForceField
for i,v in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do
if v:IsA("BasePart") then
if v.Name ~= "HumanoidRootPart" then
v.Transparency = .75
v.Material = Enum.Material.Neon
end
elseif v:IsA("Decal") then
v:Remove()
end
end
local partic = Instance.new("ParticleEmitter", fakepart)
partic.Texture = "rbxassetid://15273937357"
partic.SpreadAngle = Vector2.new(-180,180)
partic.Rate = 45
partic.Size = NumberSequence.new(1,0)
partic.Transparency = NumberSequence.new(0.9)
partic.Lifetime = NumberRange.new(0.7,1)
partic.RotSpeed = NumberRange.new(-45,45)
workspace.CurrentCamera.CameraSubject = fakepart
spawn(function()
while true do
task.wait()
for i = 0,1,0.01 do
task.wait()
fakepart.Color = Color3.fromHSV(i,1,1)
partic.Color = ColorSequence.new(Color3.fromHSV(i,1,1))
end
end
end)
spawn(function()
while true do
game.Players.LocalPlayer.Character.HumanoidRootPart.AssemblyAngularVelocity = Vector3.new(math.random(-500,50),math.random(-500,500) * power,math.random(-5,5))
task.wait(math.random(0,attack)/50)
end
end)
--[[
spawn(function()
while true do
if game.Players.LocalPlayer.Character.Humanoid.MoveDirection.Magnitude ~= 0 then
fakepart.Position = fakepart.Position + workspace.CurrentCamera.CFrame.LookVector * 2
end
task.wait()
end
end)
]]
local w = false
local a = false
local s = false
local d = false
mouse.KeyDown:Connect(function(key)
if key == "w" then
w = true
--fakepart.Position = fakepart.Position + workspace.CurrentCamera.CFrame.LookVector * 2
end
if key == "a" then
a = true
--fakepart.Position = fakepart.Position - workspace.CurrentCamera.CFrame.RightVector * 2
end
if key == "s" then
s = true
--fakepart.Position = fakepart.Position - workspace.CurrentCamera.CFrame.LookVector * 2
end
if key == "d" then
d = true
--fakepart.Position = fakepart.Position + workspace.CurrentCamera.CFrame.RightVector * 2
end
end)
mouse.KeyUp:Connect(function(key)
if key == "w" then
w = false
--fakepart.Position = fakepart.Position + workspace.CurrentCamera.CFrame.LookVector * 2
end
if key == "a" then
a = false
--fakepart.Position = fakepart.Position - workspace.CurrentCamera.CFrame.RightVector * 2
end
if key == "s" then
s = false
--fakepart.Position = fakepart.Position - workspace.CurrentCamera.CFrame.LookVector * 2
end
if key == "d" then
d = false
--fakepart.Position = fakepart.Position + workspace.CurrentCamera.CFrame.RightVector * 2
end
end)
game:GetService("RunService").Heartbeat:Connect(function()
if w then
fakepart.Position = fakepart.Position + workspace.CurrentCamera.CFrame.LookVector * 2
end
if a then
fakepart.Position = fakepart.Position - workspace.CurrentCamera.CFrame.RightVector * 2
end
if s then
fakepart.Position = fakepart.Position - workspace.CurrentCamera.CFrame.LookVector * 2
end
if d then
fakepart.Position = fakepart.Position + workspace.CurrentCamera.CFrame.RightVector * 2
end
end)
spawn(function()
while true do
local players = game.Players:GetPlayers()
local closest = nil
local shortestDistance = math.huge
local localPlayer = game.Players.LocalPlayer
local localRootPart = localPlayer.Character.HumanoidRootPart
for _, player in pairs(players) do
if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
local targetRootPart = player.Character.HumanoidRootPart
local distance = (localRootPart.Position - targetRootPart.Position).magnitude
if distance < shortestDistance then
shortestDistance = distance
closest = player
end
end
end
if closest then
local targetRootPart = closest.Character.HumanoidRootPart
local direction = (targetRootPart.Position - localRootPart.Position).unit
local lookAtCFrame = CFrame.lookAt(localRootPart.Position, Vector3.new(targetRootPart.Position.X,localRootPart.Position.Y,targetRootPart.Position.Z))
localRootPart.CFrame = lookAtCFrame
end
fakepart.Rotation = localRootPart.Rotation
task.wait()
end
end)
local isdown = false
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Button1Down:Connect(function()
isdown = true
end)
mouse.Button1Up:Connect(function()
isdown = false
end)
game:GetService("RunService").Heartbeat:Connect(function()
if isdown then
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(mouse.Hit.Position + Vector3.new(math.random(-5,5)/5,math.random(0,8)/2,math.random(-5,5)/5)) * CFrame.fromEulerAnglesXYZ(0,math.rad(45),0)
game.Players.LocalPlayer.Character.HumanoidRootPart.AssemblyAngularVelocity = Vector3.new(10000,9999,-9999)
game.Players.LocalPlayer.Character.HumanoidRootPart.AssemblyLinearVelocity = Vector3.new(-17.7,500,17.7)
end
end)
spawn(function()
while true do
game.Players.LocalPlayer.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Swimming)
task.wait(.5)
game.Players.LocalPlayer.Character.Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
task.wait(.5)
end
end)
while true do
--game.Players.LocalPlayer.Character.Humanoid.PlatformStand = true
fakepart.Rotation = game.Players.LocalPlayer.Character.HumanoidRootPart.Rotation
game.Players.LocalPlayer.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
if math.random(0,1)==1 then
game.Players.LocalPlayer.Character.Humanoid.Jump = true
else
game.Players.LocalPlayer.Character.Humanoid.Jump = false
end
if not isdown then
game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = fakepart.CFrame
end
game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity = Vector3.new(math.random(-250,250),math.random(-500,500),math.random(-250,250))
--game.Players.LocalPlayer.Character.HumanoidRootPart.AssemblyLinearVelocity = Vector3.new(math.random(-250,250),math.random(-500,500),math.random(-250,250))
--game.Players.LocalPlayer.Character.HumanoidRootPart.AssemblyAngularVelocity = Vector3.new(0,180,0)
task.wait()
end