1 | local fake_transparency = 0.8 |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | local Motors = { |
8 | ["Left Hip"] = 0, |
9 | ["Neck"] = 0, |
10 | ["Left Shoulder"] = 0, |
11 | ["Right Hip"] = 0, |
12 | ["Right Shoulder"] = 0 |
13 | } |
14 | |
15 | |
16 | local Players = game:GetService("Players") |
17 | local Player = Players.LocalPlayer |
18 | local RunService = game:GetService("RunService") |
19 | game.Players.LocalPlayer.Character.Archivable = true |
20 | local FakeCharacter = game.Players.LocalPlayer.Character:Clone() |
21 | Player.Character:BreakJoints() |
22 | Player.Character=nil |
23 | coroutine.wrap(function() |
24 | m = game.Players.LocalPlayer |
25 | char = FakeCharacter |
26 | |
27 | function Random(num) |
28 | local section=num % 1 * 3; |
29 | local secondary=0.5 * math.pi * (section % 1); |
30 | if section < 1 then |
31 | return 1,1 - math.cos(secondary),1 - math.sin(secondary); |
32 | elseif section < 2 then |
33 | return 1 - math.sin(secondary),1,1 - math.cos(secondary); |
34 | else |
35 | return 1 - math.cos(secondary),1 - math.sin(secondary),1; |
36 | end |
37 | end |
38 | |
39 | --//Lol try to figure this one out// |
40 | function rainb(hue) |
41 | local section = hue % 1 * 3 |
42 | local secondary = 0.5 * math.pi * (section % 1) |
43 | if section < 1 then |
44 | return Color3.new(1, 1 - math.cos(secondary), 1 - math.sin(secondary)) |
45 | elseif section < 2 then |
46 | return Color3.new(1 - math.sin(secondary), 1, 1 - math.cos(secondary)) |
47 | else |
48 | return Color3.new(1 - math.cos(secondary), 1 - math.sin(secondary), 1) |
49 | end |
50 | end |
51 | |
52 | Chillmusic = Instance.new("Sound", workspace) |
53 | Chillmusic.Parent = game.Chat |
54 | Chillmusic.Volume = 8 |
55 | Chillmusic.SoundId = "rbxassetid://1221694420" |
56 | Chillmusic.Looped = true |
57 | Chillmusic:Play() |
58 | |
59 | local txt = Instance.new("BillboardGui", char) |
60 | txt.Adornee = char.Head |
61 | txt.Name = "_status" |
62 | txt.Size = UDim2.new(2, 0, 1.2, 0) |
63 | txt.StudsOffset = Vector3.new(-9, 8, 0) |
64 | local text = Instance.new("TextLabel", txt) |
65 | text.Size = UDim2.new(10, 0, 7, 0) |
66 | text.FontSize = "Size24" |
67 | text.TextScaled = true |
68 | text.TextTransparency = 0 |
69 | text.BackgroundTransparency = 1 |
70 | text.TextTransparency = 0 |
71 | text.TextStrokeTransparency = 0 |
72 | text.Font = "Arcade" |
73 | text.TextStrokeColor3 = Color3.new(0, 0, 0) |
74 | v = Instance.new("Part") |
75 | v.Name = "ColorBrick" |
76 | v.Parent = m.Character |
77 | v.FormFactor = "Symmetric" |
78 | v.Anchored = true |
79 | v.CanCollide = false |
80 | v.BottomSurface = "Smooth" |
81 | v.TopSurface = "Smooth" |
82 | v.Size = Vector3.new(10, 5, 3) |
83 | v.Transparency = 1 |
84 | v.CFrame = char.Torso.CFrame |
85 | v.BrickColor = BrickColor.new("Really black") |
86 | v.Transparency = 1 |
87 | spawn(function() |
88 | TweenService = game:GetService("TweenService") |
89 | Colours = {Color3.fromRGB(0,100,200),Color3.fromRGB(4, 175, 236)} |
90 | Int = 0 |
91 | while wait(2) do |
92 | if Int == #Colours then Int = 0 end |
93 | Int = Int+1 |
94 | TweenService:Create(text,TweenInfo.new(1),{TextColor3 = Colours[Int]}):Play() |
95 | end |
96 | end) |
97 | v.Shape = "Block" |
98 | text.Text = "°~Chosen~°" |
99 | Player = game:GetService("Players").LocalPlayer |
100 | Character = FakeCharacter |
101 | PlayerGui = Player.PlayerGui |
102 | Backpack = Player.Backpack |
103 | Torso = Character.Torso |
104 | Head = Character.Head |
105 | Humanoid = Character.Humanoid |
106 | m = Instance.new("Model", Character) |
107 | LeftArm = Character["Left Arm"] |
108 | LeftLeg = Character["Left Leg"] |
109 | RightArm = Character["Right Arm"] |
110 | RightLeg = Character["Right Leg"] |
111 | LS = Torso["Left Shoulder"] |
112 | LH = Torso["Left Hip"] |
113 | RS = Torso["Right Shoulder"] |
114 | RH = Torso["Right Hip"] |
115 | Face = Head.face |
116 | Neck = Torso.Neck |
117 | it = Instance.new |
118 | attacktype = 1 |
119 | vt = Vector3.new |
120 | cf = CFrame.new |
121 | bc = BrickColor.new |
122 | br = BrickColor.random |
123 | it = Instance.new |
124 | euler = CFrame.fromEulerAnglesXYZ |
125 | angles = CFrame.Angles |
126 | cloaked = false |
127 | necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) |
128 | necko2 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) |
129 | LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) |
130 | LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) |
131 | RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) |
132 | RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) |
133 | RootPart = Character.HumanoidRootPart |
134 | RootJoint = RootPart.RootJoint |
135 | RootCF = euler(-1.57, 0, 3.14) |
136 | attack = false |
137 | attackdebounce = false |
138 | equipped = false |
139 | trispeed = 0.2 |
140 | attackmode = "none" |
141 | local idle = 0 |
142 | local Anim = "Idle" |
143 | Head.face.Texture = "rbxassetid://206844132" |
144 | |
145 | local Trail = Instance.new("Trail",char) |
146 | local attachment0 = Instance.new("Attachment",char["Right Arm"]) |
147 | attachment0.Name = "TrailAttachment0" |
148 | attachment0.CFrame = CFrame.new(-0.25,-1,0) |
149 | local attachment1 = Instance.new("Attachment",char["Right Arm"]) |
150 | attachment1.CFrame = CFrame.new(0.25,-1,0) |
151 | attachment1.Name = "TrailAttachment1" |
152 | Trail.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(1,1)}) |
153 | Trail.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.new(1,0,0)),ColorSequenceKeypoint.new(0.2,Color3.new(1,1,0)),ColorSequenceKeypoint.new(0.4,Color3.new(0,1,0)),ColorSequenceKeypoint.new(0.6,Color3.new(0,1,1)),ColorSequenceKeypoint.new(0.8,Color3.new(0,0,1)),ColorSequenceKeypoint.new(1,Color3.new(0,0,1))}) |
154 | Trail.Lifetime = 0.5 |
155 | Trail.Attachment0 = attachment0 |
156 | Trail.Attachment1 = attachment1 |
157 | |
158 | local Trail = Instance.new("Trail",char) |
159 | local attachment0 = Instance.new("Attachment",char["Left Arm"]) |
160 | attachment0.Name = "TrailAttachment0" |
161 | attachment0.CFrame = CFrame.new(-0.25,-1,0) |
162 | local attachment1 = Instance.new("Attachment",char["Left Arm"]) |
163 | attachment1.CFrame = CFrame.new(0.25,-1,0) |
164 | attachment1.Name = "TrailAttachment1" |
165 | Trail.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(1,1)}) |
166 | Trail.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.new(1,0,0)),ColorSequenceKeypoint.new(0.2,Color3.new(1,1,0)),ColorSequenceKeypoint.new(0.4,Color3.new(0,1,0)),ColorSequenceKeypoint.new(0.6,Color3.new(0,1,1)),ColorSequenceKeypoint.new(0.8,Color3.new(0,0,1)),ColorSequenceKeypoint.new(1,Color3.new(0,0,1))}) |
167 | Trail.Lifetime = 0.5 |
168 | Trail.Attachment0 = attachment0 |
169 | Trail.Attachment1 = attachment1 |
170 | |
171 | local Trail = Instance.new("Trail",char) |
172 | local attachment0 = Instance.new("Attachment",char["Right Leg"]) |
173 | attachment0.Name = "TrailAttachment0" |
174 | attachment0.CFrame = CFrame.new(-0.25,-1,0) |
175 | local attachment1 = Instance.new("Attachment",char["Right Leg"]) |
176 | attachment1.CFrame = CFrame.new(0.25,-1,0) |
177 | attachment1.Name = "TrailAttachment1" |
178 | Trail.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(1,1)}) |
179 | Trail.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.new(1,0,0)),ColorSequenceKeypoint.new(0.2,Color3.new(1,1,0)),ColorSequenceKeypoint.new(0.4,Color3.new(0,1,0)),ColorSequenceKeypoint.new(0.6,Color3.new(0,1,1)),ColorSequenceKeypoint.new(0.8,Color3.new(0,0,1)),ColorSequenceKeypoint.new(1,Color3.new(0,0,1))}) |
180 | Trail.Lifetime = 0.5 |
181 | Trail.Attachment0 = attachment0 |
182 | Trail.Attachment1 = attachment1 |
183 | |
184 | local Trail = Instance.new("Trail",char) |
185 | local attachment0 = Instance.new("Attachment",char["Left Leg"]) |
186 | attachment0.Name = "TrailAttachment0" |
187 | attachment0.CFrame = CFrame.new(-0.25,-1,0) |
188 | local attachment1 = Instance.new("Attachment",char["Left Leg"]) |
189 | attachment1.CFrame = CFrame.new(0.25,-1,0) |
190 | attachment1.Name = "TrailAttachment1" |
191 | Trail.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(1,1)}) |
192 | Trail.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.new(1,0,0)),ColorSequenceKeypoint.new(0.2,Color3.new(1,1,0)),ColorSequenceKeypoint.new(0.4,Color3.new(0,1,0)),ColorSequenceKeypoint.new(0.6,Color3.new(0,1,1)),ColorSequenceKeypoint.new(0.8,Color3.new(0,0,1)),ColorSequenceKeypoint.new(1,Color3.new(0,0,1))}) |
193 | Trail.Lifetime = 0.5 |
194 | Trail.Attachment0 = attachment0 |
195 | Trail.Attachment1 = attachment1 |
196 | |
197 | |
198 | Humanoid.Animator.Parent = nil |
199 | Character.Animate.Parent = nil |
200 | function FindNearestTorso(Position, Distance, SinglePlayer) |
201 | if SinglePlayer then |
202 | return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude |
203 | end |
204 | local List = {} |
205 | for i, v in pairs(workspace:GetChildren()) do |
206 | if v:IsA("Model") and v:findFirstChild("Torso") and v ~= Character and Distance >= (v.Torso.Position - Position).magnitude then |
207 | table.insert(List, v) |
208 | end |
209 | end |
210 | return List |
211 | end |
212 | function lerp(a, b, t) |
213 | return a + (b - a) * t |
214 | end |
215 | function slerp(a, b, t) |
216 | dot = a:Dot(b) |
217 | if dot > 0.99999 or dot < -0.99999 then |
218 | return t <= 0.5 and a or b |
219 | else |
220 | r = math.acos(dot) |
221 | return (a * math.sin((1 - t) * r) + b * math.sin(t * r)) / math.sin(r) |
222 | end |
223 | end |
224 | function matrixInterpolate(a, b, t) |
225 | local ax, ay, az, a00, a01, a02, a10, a11, a12, a20, a21, a22 = a:components() |
226 | local bx, by, bz, b00, b01, b02, b10, b11, b12, b20, b21, b22 = b:components() |
227 | local v0 = lerp(Vector3.new(ax, ay, az), Vector3.new(bx, by, bz), t) |
228 | local v1 = slerp(Vector3.new(a00, a01, a02), Vector3.new(b00, b01, b02), t) |
229 | local v2 = slerp(Vector3.new(a10, a11, a12), Vector3.new(b10, b11, b12), t) |
230 | local v3 = slerp(Vector3.new(a20, a21, a22), Vector3.new(b20, b21, b22), t) |
231 | local t = v1:Dot(v2) |
232 | if not (t < 0) and t ~= 0 and not (t > 0) then |
233 | return CFrame.new() |
234 | end |
235 | return CFrame.new(v0.x, v0.y, v0.z, v1.x, v1.y, v1.z, v2.x, v2.y, v2.z, v3.x, v3.y, v3.z) |
236 | end |
237 | function genWeld(a, b) |
238 | local w = Instance.new("Weld", a) |
239 | w.Part0 = a |
240 | w.Part1 = b |
241 | return w |
242 | end |
243 | function weld(a, b) |
244 | local weld = Instance.new("Weld") |
245 | weld.Name = "W" |
246 | weld.Part0 = a |
247 | weld.Part1 = b |
248 | weld.C0 = a.CFrame:inverse() * b.CFrame |
249 | weld.Parent = a |
250 | return weld |
251 | end |
252 | function Lerp(c1, c2, al) |
253 | local com1 = { |
254 | c1.X, |
255 | c1.Y, |
256 | c1.Z, |
257 | c1:toEulerAnglesXYZ() |
258 | } |
259 | local com2 = { |
260 | c2.X, |
261 | c2.Y, |
262 | c2.Z, |
263 | c2:toEulerAnglesXYZ() |
264 | } |
265 | for i, v in pairs(com1) do |
266 | com1[i] = v + (com2[i] - v) * al |
267 | end |
268 | return CFrame.new(com1[1], com1[2], com1[3]) * CFrame.Angles(select(4, unpack(com1))) |
269 | end |
270 | function clerp(a, b, t) |
271 | local qa = { |
272 | QuaternionFromCFrame(a) |
273 | } |
274 | local qb = { |
275 | QuaternionFromCFrame(b) |
276 | } |
277 | local ax, ay, az = a.x, a.y, a.z |
278 | local bx, by, bz = b.x, b.y, b.z |
279 | local _t = 1 - t |
280 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) |
281 | end |
282 | function QuaternionFromCFrame(cf) |
283 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() |
284 | local trace = m00 + m11 + m22 |
285 | if trace > 0 then |
286 | local s = math.sqrt(1 + trace) |
287 | local recip = 0.5 / s |
288 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 |
289 | else |
290 | local i = 0 |
291 | if m00 < m11 then |
292 | i = 1 |
293 | end |
294 | if m22 > (i == 0 and m00 or m11) then |
295 | i = 2 |
296 | end |
297 | if i == 0 then |
298 | local s = math.sqrt(m00 - m11 - m22 + 1) |
299 | local recip = 0.5 / s |
300 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip |
301 | elseif i == 1 then |
302 | local s = math.sqrt(m11 - m22 - m00 + 1) |
303 | local recip = 0.5 / s |
304 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip |
305 | elseif i == 2 then |
306 | local s = math.sqrt(m22 - m00 - m11 + 1) |
307 | local recip = 0.5 / s |
308 | return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip |
309 | end |
310 | end |
311 | end |
312 | function QuaternionToCFrame(px, py, pz, x, y, z, w) |
313 | local xs, ys, zs = x + x, y + y, z + z |
314 | local wx, wy, wz = w * xs, w * ys, w * zs |
315 | local xx = x * xs |
316 | local xy = x * ys |
317 | local xz = x * zs |
318 | local yy = y * ys |
319 | local yz = y * zs |
320 | local zz = z * zs |
321 | return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy)) |
322 | end |
323 | function QuaternionSlerp(a, b, t) |
324 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] |
325 | local startInterp, finishInterp |
326 | if cosTheta >= 1.0E-4 then |
327 | if 1 - cosTheta > 1.0E-4 then |
328 | local theta = math.acos(cosTheta) |
329 | local invSinTheta = 1 / math.sin(theta) |
330 | startInterp = math.sin((1 - t) * theta) * invSinTheta |
331 | finishInterp = math.sin(t * theta) * invSinTheta |
332 | else |
333 | startInterp = 1 - t |
334 | finishInterp = t |
335 | end |
336 | elseif 1 + cosTheta > 1.0E-4 then |
337 | local theta = math.acos(-cosTheta) |
338 | local invSinTheta = 1 / math.sin(theta) |
339 | startInterp = math.sin((t - 1) * theta) * invSinTheta |
340 | finishInterp = math.sin(t * theta) * invSinTheta |
341 | else |
342 | startInterp = t - 1 |
343 | finishInterp = t |
344 | end |
345 | return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp |
346 | end |
347 | function rayCast(Pos, Dir, Max, Ignore) |
348 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) |
349 | end |
350 | function part(formfactor, parent, reflectance, transparency, brickcolor, name, size) |
351 | local fp = it("Part") |
352 | fp.formFactor = formfactor |
353 | fp.Parent = parent |
354 | fp.Reflectance = reflectance |
355 | fp.Transparency = transparency |
356 | fp.CanCollide = false |
357 | fp.Locked = true |
358 | fp.BrickColor = brickcolor |
359 | fp.Name = name |
360 | fp.Size = size |
361 | fp.Position = Torso.Position |
362 | fp.BottomSurface = "Smooth" |
363 | fp.TopSurface = "Smooth" |
364 | fp:BreakJoints() |
365 | return fp |
366 | end |
367 | function mesh(Mesh, part, meshtype, meshid, offset, scale) |
368 | local mesh = it(Mesh) |
369 | mesh.Parent = part |
370 | if Mesh == "SpecialMesh" then |
371 | mesh.MeshType = meshtype |
372 | mesh.MeshId = meshid |
373 | end |
374 | mesh.Offset = offset |
375 | mesh.Scale = scale |
376 | return mesh |
377 | end |
378 | function weld(parent, part0, part1, c0) |
379 | local weld = it("Weld") |
380 | weld.Parent = parent |
381 | weld.Part0 = part0 |
382 | weld.Part1 = part1 |
383 | weld.C0 = c0 |
384 | return weld |
385 | end |
386 | function rayCast(Pos, Dir, Max, Ignore) |
387 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) |
388 | end |
389 | RSH, LSH = nil, nil |
390 | RW, LW = Instance.new("Weld"), Instance.new("Weld") |
391 | RW.Name = "Right Shoulder" |
392 | LW.Name = "Left Shoulder" |
393 | LH = Torso["Left Hip"] |
394 | RH = Torso["Right Hip"] |
395 | TorsoColor = Torso.BrickColor |
396 | function NoOutline(Part) |
397 | Part.TopSurface, Part.BottomSurface, Part.LeftSurface, Part.RightSurface, Part.FrontSurface, Part.BackSurface = 10, 10, 10, 10, 10, 10 |
398 | end |
399 | player = Player |
400 | ch = Character |
401 | RSH = ch.Torso["Right Shoulder"] |
402 | LSH = ch.Torso["Left Shoulder"] |
403 | RSH.Parent = nil |
404 | LSH.Parent = nil |
405 | RW.Name = "Right Shoulder" |
406 | RW.Part0 = ch.Torso |
407 | RW.C0 = cf(1.5, 0.5, 0) |
408 | RW.C1 = cf(0, 0.5, 0) |
409 | RW.Part1 = ch["Right Arm"] |
410 | RW.Parent = ch.Torso |
411 | LW.Name = "Left Shoulder" |
412 | LW.Part0 = ch.Torso |
413 | LW.C0 = cf(-1.5, 0.5, 0) |
414 | LW.C1 = cf(0, 0.5, 0) |
415 | LW.Part1 = ch["Left Arm"] |
416 | LW.Parent = ch.Torso |
417 | function newWeld(wp0, wp1, wc0x, wc0y, wc0z) |
418 | local wld = Instance.new("Weld", wp1) |
419 | wld.Part0 = wp0 |
420 | wld.Part1 = wp1 |
421 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) |
422 | end |
423 | newWeld(RootPart, Torso, 0, -1, 0) |
424 | Torso.Weld.C1 = CFrame.new(0, -1, 0) |
425 | newWeld(Torso, LeftLeg, -0.5, -1, 0) |
426 | LeftLeg.Weld.C1 = CFrame.new(0, 1, 0) |
427 | newWeld(Torso, RightLeg, 0.5, -1, 0) |
428 | RightLeg.Weld.C1 = CFrame.new(0, 1, 0) |
429 | Player = game:GetService("Players").LocalPlayer |
430 | Character = FakeCharacter |
431 | mouse = Player:GetMouse() |
432 | m = Instance.new("Model", Character) |
433 | local weldBetween = function(a, b) |
434 | local weldd = Instance.new("ManualWeld") |
435 | weldd.Part0 = a |
436 | weldd.Part1 = b |
437 | weldd.C0 = CFrame.new() |
438 | weldd.C1 = b.CFrame:inverse() * a.CFrame |
439 | weldd.Parent = a |
440 | return weldd |
441 | end |
442 | ArtificialHB = Instance.new("BindableEvent", script) |
443 | ArtificialHB.Name = "Heartbeat" |
444 | script:WaitForChild("Heartbeat") |
445 | frame = 0.016666666666666666 |
446 | tf = 0 |
447 | allowframeloss = false |
448 | tossremainder = false |
449 | lastframe = tick() |
450 | script.Heartbeat:Fire() |
451 | game:GetService("RunService").Heartbeat:connect(function(s, p) |
452 | tf = tf + s |
453 | if tf >= frame then |
454 | if allowframeloss then |
455 | script.Heartbeat:Fire() |
456 | lastframe = tick() |
457 | else |
458 | for i = 1, math.floor(tf / frame) do |
459 | script.Heartbeat:Fire() |
460 | end |
461 | lastframe = tick() |
462 | end |
463 | if tossremainder then |
464 | tf = 0 |
465 | else |
466 | tf = tf - frame * math.floor(tf / frame) |
467 | end |
468 | end |
469 | end) |
470 | function swait(num) |
471 | if num == 0 or num == nil then |
472 | ArtificialHB.Event:wait() |
473 | else |
474 | for i = 0, num do |
475 | ArtificialHB.Event:wait() |
476 | end |
477 | end |
478 | end |
479 | mouse.KeyDown:connect(function(key) |
480 | if key == "c" then |
481 | repeat |
482 | swait() |
483 | Chillmusic.Volume = Chillmusic.Volume - 0.05 |
484 | until Chillmusic.Volume == 0 |
485 | Chillmusic:Stop() |
486 | swait() |
487 | Chillmusic2:Play() |
488 | Chillmusic.Volume = 1 |
489 | end |
490 | end) |
491 | mouse.KeyDown:connect(function(key) |
492 | if key == "f" then |
493 | text.Text = "Guys why not just chill?" |
494 | wait(1) |
495 | text.Text = "It's just the way life should be." |
496 | wait(1) |
497 | text.Text = "Chill is life." |
498 | wait(1) |
499 | text.Text = "Chill is love." |
500 | wait(1) |
501 | text.Text = "Chill is for the best." |
502 | wait(1) |
503 | text.Text = "Maybe if you were chill you wouldn't be a skid..." |
504 | wait(3) |
505 | text.Text = "But some people cant handle the chill can they." |
506 | wait(3) |
507 | text.Text = "Chill Af" |
508 | end |
509 | end) |
510 | mouse.KeyDown:connect(function(key) |
511 | if key == "v" then |
512 | repeat |
513 | swait() |
514 | Chillmusic2.Volume = Chillmusic2.Volume - 0.05 |
515 | until Chillmusic2.Volume == 0 |
516 | Chillmusic2:Stop() |
517 | swait() |
518 | Chillmusic:Play() |
519 | Chillmusic2.Volume = 1 |
520 | end |
521 | end) |
522 | mouse.KeyDown:connect(function(key) |
523 | if key == "b" then |
524 | text.Text = "Be back scrubs." |
525 | wait(1) |
526 | text.Text = "Afk nibba..." |
527 | end |
528 | end) |
529 | mouse.KeyDown:connect(function(key) |
530 | if key == "n" then |
531 | text.Text = "K back you nubs's!" |
532 | wait(1) |
533 | text.Text = "Chill Af" |
534 | end |
535 | end) |
536 | m = Instance.new("ForceField", Character) |
537 | m.Visible = false |
538 | Character.Humanoid.WalkSpeed = 4 |
539 | mouse.KeyDown:connect(function(key) |
540 | if string.byte(key) == 48 then |
541 | Swing = 2 |
542 | Character.Humanoid.WalkSpeed = 40 |
543 | end |
544 | end) |
545 | mouse.KeyUp:connect(function(key) |
546 | if string.byte(key) == 48 then |
547 | Swing = 1 |
548 | Character.Humanoid.WalkSpeed = 4 |
549 | end |
550 | end) |
551 | local sine = 0 |
552 | local change = 1 |
553 | local val = 0 |
554 | spawn(function() |
555 | while true do |
556 | swait() |
557 | sine = sine + change |
558 | local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude |
559 | local velderp = RootPart.Velocity.y |
560 | hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character) |
561 | if equipped == true or equipped == false then |
562 | if attack == false then |
563 | idle = idle + 1 |
564 | Character.Humanoid.MaxHealth = math.huge |
565 | Character.Humanoid.Health = math.huge |
566 | else |
567 | idle = 0 |
568 | end |
569 | if not (idle >= 500) or attack == false then |
570 | end |
571 | if torvel < 1 and hitfloor ~= nil then |
572 | Anim = "Chill" |
573 | if attack == false then |
574 | Humanoid.CameraOffset = Vector3.new(0, 10.25 - 5.45 * math.cos(sine / 65), 0) |
575 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 10.25 - 5.45 * math.cos(sine / 65), 0) * CFrame.Angles(math.rad(90 + 15 * math.sin(sine / 60)), math.rad(0), math.rad(0)), 0.8) |
576 | Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-20 + 20 * math.cos(sine / 60)), math.rad(0 + 4 * math.sin(sine / 60)), math.rad(0)), 0.2) |
577 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-90 + 25 * math.cos(sine / 60)), math.rad(0 + 20 * math.sin(sine / 60)), math.rad(0 + 55 * math.sin(sine / 60))), 0.3) |
578 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-90 + 25 * math.cos(sine / 60)), math.rad(-20 - 20 * math.sin(sine / 60)), math.rad(0 - 55 * math.sin(sine / 60))), 0.3) |
579 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -0.86 + 0.03 * math.cos(sine / 65), -0.4) * CFrame.Angles(math.rad(15 - 45 * math.cos(sine / 70)), math.rad(3), math.rad(-4)), 0.8) |
580 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1 + 0.05 * math.cos(sine / 65), -0.4) * CFrame.Angles(math.rad(15 - 35 * math.cos(sine / 65)), math.rad(-3), math.rad(4)), 0.8) |
581 | end |
582 | elseif torvel > 2 and torvel < 22 and hitfloor ~= nil then |
583 | Anim = "Walk" |
584 | if attack == false then |
585 | Humanoid.CameraOffset = Vector3.new(0, 6 - 2.55 * math.cos(sine / 48.5), 0) |
586 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.2) |
587 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 6 - 2.55 * math.cos(sine / 48.5), 0) * CFrame.Angles(math.rad(-90 + 5 * math.cos(sine / 45)), math.rad(180 * math.cos(sine / 48.5)), math.rad(0)), 0.8) |
588 | Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-4 + 2 * math.sin(sine / 48)), math.rad(0), math.rad(0)), 0.2) |
589 | RW.C0 = clerp(RW.C0, cf(1.5, 0.5 + 0.1 * math.cos(sine / 45), 0) * angles(math.rad(90), math.rad(0), math.rad(90 - 20.5 * math.cos(sine / 45))), 0.3) |
590 | LW.C0 = clerp(LW.C0, cf(-1.5, 0.5 + 0.1 * math.cos(sine / 45), 0) * angles(math.rad(90), math.rad(0), math.rad(-90 + 20.5 * math.cos(sine / 45))), 0.3) |
591 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1 - 0.05 * math.cos(sine / 45), 0) * CFrame.Angles(math.rad(0), math.rad(3), math.rad(-4)), 0.8) |
592 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1 + 0.05 * math.cos(sine / 45), 0) * CFrame.Angles(math.rad(0), math.rad(-3), math.rad(4)), 0.8) |
593 | end |
594 | elseif torvel >= 22 and hitfloor ~= nil then |
595 | Anim = "Run" |
596 | if attack == false then |
597 | Humanoid.CameraOffset = Vector3.new(0, 6 - 1.55 * math.cos(sine / 68.5), 0) |
598 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 6 - 1.55 * math.cos(sine / 68.5), -0.2) * angles(math.rad(50), math.rad(0), math.rad(0)), 0.2) |
599 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 6 - 1.55 * math.cos(sine / 68.5), 0) * CFrame.Angles(math.rad(-40 + 20 * math.sin(sine / 68.5)), 0, 0), 0.8) |
600 | Torso.Neck.C0 = clerp(Torso.Neck.C0, necko * angles(math.rad(-12 + 17 * math.cos(sine / 68.5)), math.rad(0), math.rad(0)), 0.2) |
601 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-90), math.rad(0), math.rad(40 - 20 * math.cos(sine / 68.5))), 0.2) |
602 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-90), math.rad(0), math.rad(-40 + 20 * math.cos(sine / 68.5))), 0.2) |
603 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -0.87, -0.25) * CFrame.Angles(math.rad(-45 - 10 * math.cos(sine / 68.5)), math.rad(0), math.rad(0)), 0.8) |
604 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, -0.1) * CFrame.Angles(math.rad(-35 - 10 * math.cos(sine / 68.5)), math.rad(0), math.rad(0)), 0.8) |
605 | end |
606 | end |
607 | end |
608 | end |
609 | end) |
610 | |
611 | |
612 | |
613 | -- Objects |
614 | |
615 | local Chill_Gui_Bro = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui) |
616 | local Header = Instance.new("Frame") |
617 | local BackGround = Instance.new("Frame") |
618 | local Chill_Gui_Label = Instance.new("TextLabel") |
619 | local Play_ID_Button = Instance.new("TextButton") |
620 | local ID_Box = Instance.new("TextBox") |
621 | local Set_Vol_Button = Instance.new("TextButton") |
622 | local Vol_Box = Instance.new("TextBox") |
623 | local Set_Tpos_Button = Instance.new("TextButton") |
624 | local Tpos_Box = Instance.new("TextBox") |
625 | local Set_Text_Button = Instance.new("TextButton") |
626 | local Tpos_Box_2 = Instance.new("TextBox") |
627 | local Toggle_Chat_Button = Instance.new("TextButton") |
628 | local Chat_Toggle_Label = Instance.new("TextLabel") |
629 | local Current_Song_Label = Instance.new("TextLabel") |
630 | |
631 | -- Properties |
632 | |
633 | Chill_Gui_Bro.Name = "Chill_Gui_Bro" |
634 | |
635 | Header.Name = "Header" |
636 | Header.Parent = Chill_Gui_Bro |
637 | Header.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) |
638 | Header.BorderSizePixel = 0 |
639 | Header.Draggable = true |
640 | Header.Active = true |
641 | Header.Selectable = true |
642 | Header.Position = UDim2.new(0.469539374, 0, 0.147921771, 0) |
643 | Header.Size = UDim2.new(0, 250, 0, 45) |
644 | |
645 | BackGround.Name = "BackGround" |
646 | BackGround.Parent = Header |
647 | BackGround.BackgroundColor3 = Color3.new(0.196078, 0.196078, 0.196078) |
648 | BackGround.BorderSizePixel = 0 |
649 | BackGround.Draggable = true |
650 | BackGround.Position = UDim2.new(0, 0, 1, 0) |
651 | BackGround.Size = UDim2.new(0, 250, 0, 299) |
652 | |
653 | Chill_Gui_Label.Name = "Chill_Gui_Label" |
654 | Chill_Gui_Label.Parent = Header |
655 | Chill_Gui_Label.BackgroundColor3 = Color3.new(1, 1, 1) |
656 | Chill_Gui_Label.BackgroundTransparency = 1 |
657 | Chill_Gui_Label.BorderSizePixel = 0 |
658 | Chill_Gui_Label.Draggable = true |
659 | Chill_Gui_Label.Size = UDim2.new(0, 250, 0, 45) |
660 | Chill_Gui_Label.Font = Enum.Font.Arcade |
661 | Chill_Gui_Label.Text = "~»Chill Gui«~" |
662 | Chill_Gui_Label.TextColor3 = Color3.new(1, 1, 1) |
663 | Chill_Gui_Label.TextScaled = true |
664 | Chill_Gui_Label.TextSize = 14 |
665 | Chill_Gui_Label.TextWrapped = true |
666 | |
667 | Play_ID_Button.Name = "Play_ID_Button" |
668 | Play_ID_Button.Parent = Header |
669 | Play_ID_Button.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) |
670 | Play_ID_Button.BorderColor3 = Color3.new(0, 0, 0) |
671 | Play_ID_Button.BorderSizePixel = 0 |
672 | Play_ID_Button.Position = UDim2.new(0.0520000011, 0, 1.22222221, 0) |
673 | Play_ID_Button.Size = UDim2.new(0, 68, 0, 35) |
674 | Play_ID_Button.Font = Enum.Font.Arcade |
675 | Play_ID_Button.Text = "Play ID" |
676 | Play_ID_Button.TextColor3 = Color3.new(1, 1, 1) |
677 | Play_ID_Button.TextSize = 20 |
678 | Play_ID_Button.TextWrapped = true |
679 | |
680 | ID_Box.Name = "ID_Box" |
681 | ID_Box.Parent = Header |
682 | ID_Box.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) |
683 | ID_Box.BorderColor3 = Color3.new(0, 0, 0) |
684 | ID_Box.BorderSizePixel = 0 |
685 | ID_Box.Position = UDim2.new(0.356000006, 0, 1.22222221, 0) |
686 | ID_Box.Size = UDim2.new(0, 140, 0, 35) |
687 | ID_Box.Font = Enum.Font.Arcade |
688 | ID_Box.Text = "ID here" |
689 | ID_Box.TextColor3 = Color3.new(1, 1, 1) |
690 | ID_Box.TextSize = 35 |
691 | ID_Box.TextWrapped = true |
692 | |
693 | Set_Vol_Button.Name = "Set_Vol_Button" |
694 | Set_Vol_Button.Parent = Header |
695 | Set_Vol_Button.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) |
696 | Set_Vol_Button.BorderColor3 = Color3.new(0, 0, 0) |
697 | Set_Vol_Button.BorderSizePixel = 0 |
698 | Set_Vol_Button.Position = UDim2.new(0.0520000011, 0, 2.20000005, 0) |
699 | Set_Vol_Button.Size = UDim2.new(0, 68, 0, 35) |
700 | Set_Vol_Button.Font = Enum.Font.Arcade |
701 | Set_Vol_Button.Text = "Set Vol" |
702 | Set_Vol_Button.TextColor3 = Color3.new(1, 1, 1) |
703 | Set_Vol_Button.TextSize = 20 |
704 | Set_Vol_Button.TextWrapped = true |
705 | |
706 | Vol_Box.Name = "Vol_Box" |
707 | Vol_Box.Parent = Header |
708 | Vol_Box.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) |
709 | Vol_Box.BorderColor3 = Color3.new(0, 0, 0) |
710 | Vol_Box.BorderSizePixel = 0 |
711 | Vol_Box.Position = UDim2.new(0.356000006, 0, 2.20000005, 0) |
712 | Vol_Box.Size = UDim2.new(0, 140, 0, 35) |
713 | Vol_Box.Font = Enum.Font.Arcade |
714 | Vol_Box.Text = "Volume" |
715 | Vol_Box.TextColor3 = Color3.new(1, 1, 1) |
716 | Vol_Box.TextSize = 35 |
717 | Vol_Box.TextWrapped = true |
718 | |
719 | Set_Tpos_Button.Name = "Set_Tpos_Button" |
720 | Set_Tpos_Button.Parent = Header |
721 | Set_Tpos_Button.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) |
722 | Set_Tpos_Button.BorderColor3 = Color3.new(0, 0, 0) |
723 | Set_Tpos_Button.BorderSizePixel = 0 |
724 | Set_Tpos_Button.Position = UDim2.new(0.0520000011, 0, 3.24444437, 0) |
725 | Set_Tpos_Button.Size = UDim2.new(0, 68, 0, 35) |
726 | Set_Tpos_Button.Font = Enum.Font.Arcade |
727 | Set_Tpos_Button.Text = "Set Tpos" |
728 | Set_Tpos_Button.TextColor3 = Color3.new(1, 1, 1) |
729 | Set_Tpos_Button.TextSize = 18 |
730 | Set_Tpos_Button.TextWrapped = true |
731 | |
732 | Tpos_Box.Name = "Tpos_Box" |
733 | Tpos_Box.Parent = Header |
734 | Tpos_Box.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) |
735 | Tpos_Box.BorderColor3 = Color3.new(0, 0, 0) |
736 | Tpos_Box.BorderSizePixel = 0 |
737 | Tpos_Box.Position = UDim2.new(0.356000006, 0, 3.24444437, 0) |
738 | Tpos_Box.Size = UDim2.new(0, 140, 0, 35) |
739 | Tpos_Box.Font = Enum.Font.Arcade |
740 | Tpos_Box.Text = "Time Position" |
741 | Tpos_Box.TextColor3 = Color3.new(1, 1, 1) |
742 | Tpos_Box.TextSize = 20 |
743 | Tpos_Box.TextWrapped = true |
744 | |
745 | Set_Text_Button.Name = "Set_Text_Button" |
746 | Set_Text_Button.Parent = Header |
747 | Set_Text_Button.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) |
748 | Set_Text_Button.BorderColor3 = Color3.new(0, 0, 0) |
749 | Set_Text_Button.BorderSizePixel = 0 |
750 | Set_Text_Button.Position = UDim2.new(0.0600000024, 0, 4.22222233, 0) |
751 | Set_Text_Button.Size = UDim2.new(0, 68, 0, 35) |
752 | Set_Text_Button.Font = Enum.Font.Arcade |
753 | Set_Text_Button.Text = "Set Text" |
754 | Set_Text_Button.TextColor3 = Color3.new(1, 1, 1) |
755 | Set_Text_Button.TextSize = 18 |
756 | Set_Text_Button.TextWrapped = true |
757 | |
758 | Tpos_Box_2.Name = "Tpos_Box" |
759 | Tpos_Box_2.Parent = Header |
760 | Tpos_Box_2.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) |
761 | Tpos_Box_2.BorderColor3 = Color3.new(0, 0, 0) |
762 | Tpos_Box_2.BorderSizePixel = 0 |
763 | Tpos_Box_2.Position = UDim2.new(0.356000006, 0, 4.22222233, 0) |
764 | Tpos_Box_2.Size = UDim2.new(0, 140, 0, 35) |
765 | Tpos_Box_2.Font = Enum.Font.Arcade |
766 | Tpos_Box_2.Text = "Text" |
767 | Tpos_Box_2.TextColor3 = Color3.new(1, 1, 1) |
768 | Tpos_Box_2.TextSize = 20 |
769 | Tpos_Box_2.TextWrapped = true |
770 | |
771 | Toggle_Chat_Button.Name = "Toggle_Chat_Button" |
772 | Toggle_Chat_Button.Parent = Header |
773 | Toggle_Chat_Button.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) |
774 | Toggle_Chat_Button.BorderColor3 = Color3.new(0, 0, 0) |
775 | Toggle_Chat_Button.BorderSizePixel = 0 |
776 | Toggle_Chat_Button.Position = UDim2.new(0.0579999983, 0, 5.26666689, 0) |
777 | Toggle_Chat_Button.Size = UDim2.new(0, 97, 0, 35) |
778 | Toggle_Chat_Button.Font = Enum.Font.Arcade |
779 | Toggle_Chat_Button.Text = "Toggle Chat" |
780 | Toggle_Chat_Button.TextColor3 = Color3.new(1, 1, 1) |
781 | Toggle_Chat_Button.TextSize = 20 |
782 | Toggle_Chat_Button.TextWrapped = true |
783 | |
784 | Chat_Toggle_Label.Name = "Chat_Toggle_Label" |
785 | Chat_Toggle_Label.Parent = Header |
786 | Chat_Toggle_Label.BackgroundColor3 = Color3.new(1, 1, 1) |
787 | Chat_Toggle_Label.BackgroundTransparency = 0.89999997615814 |
788 | Chat_Toggle_Label.BorderColor3 = Color3.new(1, 1, 1) |
789 | Chat_Toggle_Label.Position = UDim2.new(0.540000021, 0, 5.26666689, 0) |
790 | Chat_Toggle_Label.Size = UDim2.new(0, 94, 0, 35) |
791 | Chat_Toggle_Label.Font = Enum.Font.Arcade |
792 | Chat_Toggle_Label.Text = "~»False«~" |
793 | Chat_Toggle_Label.TextColor3 = Color3.new(1, 1, 1) |
794 | Chat_Toggle_Label.TextScaled = true |
795 | Chat_Toggle_Label.TextSize = 14 |
796 | Chat_Toggle_Label.TextWrapped = true |
797 | |
798 | Current_Song_Label.Name = "Current_Song_Label" |
799 | Current_Song_Label.Parent = Header |
800 | Current_Song_Label.BackgroundColor3 = Color3.new(1, 1, 1) |
801 | Current_Song_Label.BackgroundTransparency = 0.89999997615814 |
802 | Current_Song_Label.BorderColor3 = Color3.new(1, 1, 1) |
803 | Current_Song_Label.Position = UDim2.new(0.0520000011, 0, 6.64444447, 0) |
804 | Current_Song_Label.Size = UDim2.new(0, 225, 0, 35) |
805 | Current_Song_Label.Font = Enum.Font.Arcade |
806 | Current_Song_Label.Text = "~»Current Song: None«~" |
807 | Current_Song_Label.TextColor3 = Color3.new(1, 1, 1) |
808 | Current_Song_Label.TextScaled = true |
809 | Current_Song_Label.TextSize = 14 |
810 | Current_Song_Label.TextWrapped = true |
811 | |
812 | Play_ID_Button.MouseButton1Down:Connect(function() |
813 | if tonumber(ID_Box.Text) then |
814 | Chillmusic:Stop() |
815 | Chillmusic.SoundId='rbxassetid://'..tonumber(ID_Box.Text) |
816 | Chillmusic:Play() |
817 | currentsong = game:GetService("MarketplaceService"):GetProductInfo(tonumber(ID_Box.Text)).Name |
818 | text.Text = "~»Chill Af«~ Now Playing: "..currentsong |
819 | Current_Song_Label.Text = "~»Current Song: "..currentsong.."«~" |
820 | wait(4) |
821 | text.Text = "~»Fell Apart AF«~" |
822 | end |
823 | end) |
824 | local ischatting = false |
825 | |
826 | Set_Vol_Button.MouseButton1Down:Connect(function() |
827 | |
828 | Chillmusic.Volume = tonumber(Vol_Box.Text) |
829 | end) |
830 | |
831 | Set_Tpos_Button.MouseButton1Down:Connect(function() |
832 | |
833 | Chillmusic.TimePosition = tonumber(Tpos_Box.Text) |
834 | end) |
835 | |
836 | Set_Text_Button.MouseButton1Down:Connect(function() |
837 | |
838 | text.Text = "~»"..Tpos_Box_2.Text.."«~" |
839 | end) |
840 | |
841 | Toggle_Chat_Button.MouseButton1Down:Connect(function() |
842 | if ischatting == false then |
843 | ischatting = true |
844 | Chat_Toggle_Label.Text = "~»True«~" |
845 | spawn(function() |
846 | game.Players.LocalPlayer.Chatted:connect(function(msg) |
847 | for i = 0, msg:len(), 1 do |
848 | text.Text = "~»"..msg:sub(0, i).."«~" |
849 | end |
850 | wait(3) |
851 | text.Text = "~»Fell Apart AF«~" |
852 | end) |
853 | end) |
854 | else |
855 | ischatting = false |
856 | Chat_Toggle_Label.Text = "~»False«~" |
857 | end |
858 | end) |
859 | end)() |
860 | local Connection |
861 | Connection = game.Workspace.DescendantAdded:Connect(function(c) |
862 | if c.Name == "Animate" and c.Parent == Player.Character then |
863 | c.Enabled = false |
864 | Connection:Disconnect() |
865 | end |
866 | end) |
867 | repeat task.wait() until game.Players.LocalPlayer.Character |
868 | task.wait(0.1) |
869 | local RealChar = Player.Character |
870 | RealChar.Archivable = true |
871 | FakeCharacter.Name = Player.Name .. "_Fake" |
872 | FakeCharacter.Parent = workspace |
873 | task.spawn(function() |
874 | for i, LS in ipairs(FakeCharacter:GetChildren()) do |
875 | if LS:IsA("LocalScript") then |
876 | LS.Enabled = false |
877 | task.wait(0.1) |
878 | LS.Enabled = false |
879 | end |
880 | end |
881 | end) |
882 | |
883 | for i, Part in ipairs(FakeCharacter:GetDescendants()) do |
884 | if Part:IsA("BasePart")then |
885 | Part.Transparency = fake_transparency |
886 | end |
887 | end |
888 | |
889 | for i, Decal in ipairs(FakeCharacter:GetDescendants()) do |
890 | if Decal:IsA("Decal")then |
891 | Decal.Transparency = fake_transparency |
892 | end |
893 | end |
894 | |
895 | Player.Character = FakeCharacter |
896 | |
897 | |
898 | local function MotorAngle() |
899 | if RealChar:FindFirstChild("Torso") then |
900 | for MotorName, Motor6DAngle in pairs(Motors) do |
901 | if RealChar:FindFirstChild("Torso"):FindFirstChild(MotorName) then |
902 | RealChar:FindFirstChild("Torso"):FindFirstChild(MotorName).DesiredAngle = Motor6DAngle |
903 | end |
904 | end |
905 | end |
906 | end |
907 | |
908 | local function SetAngles() |
909 | if FakeCharacter:FindFirstChild("Torso") then |
910 | for MotorName, Motor6DAngle in pairs(Motors) do |
911 | if FakeCharacter:FindFirstChild("Torso"):FindFirstChild(MotorName) then |
912 | local Motor = FakeCharacter:FindFirstChild("Torso"):FindFirstChild(MotorName) |
913 | local rx, ry, rz = Motor.Part1.CFrame:ToObjectSpace(FakeCharacter:FindFirstChild("Torso").CFrame):ToOrientation() |
914 | --Motors[MotorName] = rx |
915 | if Motor.Name == "Right Shoulder" then |
916 | Motors[MotorName] = -rx |
917 | end |
918 | if Motor.Name == "Left Shoulder" then |
919 | Motors[MotorName] = rx |
920 | end |
921 | if Motor.Name == "Right Hip" then |
922 | Motors[MotorName] = -rx |
923 | end |
924 | if Motor.Name == "Left Hip" then |
925 | Motors[MotorName] = rx |
926 | end |
927 | if Motor.Name == "Neck" then |
928 | Motors[MotorName] = -ry |
929 | end |
930 | end |
931 | end |
932 | end |
933 | end |
934 | |
935 | local KFFolder = Instance.new("Folder") |
936 | KFFolder.Parent = game.ReplicatedStorage |
937 | |
938 | local function LoadAllAnimations() |
939 | for i, AnimID in pairs(AnimIDs) do |
940 | local Anim = Instance.new("Animation") |
941 | Anim.AnimationId = "rbxassetid://" .. AnimID |
942 | local LoadedAnim = RealChar:WaitForChild("Humanoid"):LoadAnimation(Anim) |
943 | end |
944 | end |
945 | |
946 | local function BaseCol() |
947 | for i, Part in ipairs(RealChar:GetChildren()) do |
948 | if Part:IsA("BasePart")then |
949 | Part.CanCollide = false |
950 | end |
951 | end |
952 | for i, Part in ipairs(FakeCharacter:GetChildren()) do |
953 | if Part:IsA("BasePart")then |
954 | Part.CanCollide = false |
955 | end |
956 | end |
957 | end |
958 | |
959 | RunService.Heartbeat:Connect(function() |
960 | SetAngles() |
961 | MotorAngle() |
962 | RealChar.HumanoidRootPart.CFrame = FakeCharacter.Torso.CFrame |
963 | end) |
964 | |
965 | RunService.PreSimulation:Connect(function() |
966 | BaseCol() |
967 | end) |
968 | |
969 | LoadAllAnimations() |