View difference between Paste ID: NZEHYtwv and YjeaWbJn
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-
F = part(Enum.FormFactor.Plate, m, Enum.Material.Plastic, 0, 0, "Royal purple", "Handle", Vector3.new(3.5875988, 0.478346467, 1.19586647))
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
154
wait(1)
155
Player = game:GetService("Players").LocalPlayer
156
Character = Player.Character
157
Mouse = Player:GetMouse()
158
m = Instance.new("Model", Character)
159
local weldBetween = function(a, b)
160
  local weldd = Instance.new("ManualWeld")
161
  weldd.Part0 = a
162
  weldd.Part1 = b
163
  weldd.C0 = CFrame.new()
164
  weldd.C1 = b.CFrame:inverse() * a.CFrame
165
  weldd.Parent = a
166
  return weldd
167
end
168
it = Instance.new
169
function nooutline(part)
170
  part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
171
end
172
function part(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
173
  local fp = it("Part")
174
  fp.formFactor = formfactor
175
  fp.Parent = parent
176
  fp.Reflectance = reflectance
177
  fp.Transparency = transparency
178
  fp.CanCollide = false
179
  fp.Locked = true
180
  fp.BrickColor = BrickColor.new(tostring(brickcolor))
181
  fp.Name = name
182
  fp.Size = size
183
  fp.Position = Character.Torso.Position
184
  nooutline(fp)
185
  fp.Material = material
186
  fp:BreakJoints()
187
  return fp
188
end
189
function mesh(Mesh, part, meshtype, meshid, offset, scale)
190
  local mesh = it(Mesh)
191
  mesh.Parent = part
192
  if Mesh == "SpecialMesh" then
193
    mesh.MeshType = meshtype
194
    mesh.MeshId = meshid
195
  end
196
  mesh.Offset = offset
197
  mesh.Scale = scale
198
  return mesh
199
end
200
function weld(parent, part0, part1, c0, c1)
201
  local weld = it("Weld")
202
  weld.Parent = parent
203
  weld.Part0 = part0
204
  weld.Part1 = part1
205
  weld.C0 = c0
206
  weld.C1 = c1
207
  return weld
208
end
209
F = part(Enum.FormFactor.Plate, m, Enum.Material.Plastic, 0, 0, "Fossil", "Handle", Vector3.new(3.5875988, 0.478346467, 1.19586647))
210
Fweld = weld(m, Character.Head, F, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.0157470703, -0.438977718, 0.00266170502, 0.995733142, 0, 0.0922800079, 0.00925354939, 0.994959533, -0.0998490006, -0.0918148756, 0.10027688, 0.990714252))
211
mesh("SpecialMesh", F, Enum.MeshType.FileMesh, "http://www.roblox.com/asset/?id=1029012", Vector3.new(0, 0, 0), Vector3.new(1.31545293, 1.31545281, 1.31545317))
212
player = game.Players.LocalPlayer
213
char = player.Character
214
run = game:GetService("RunService")
215
local xd = Instance.new("Model", game.Workspace)
216
xd.Name = player.Name .. "'s INSTANCES"
217
ignore = {}
218
mouse = player:GetMouse()
219
mouse.TargetFilter = xd
220
local IdleAndWalk = false
221
current = true
222
skl = false
223
function onKeyDown(key)
224
  key:lower()
225
  if key == "f" then
226
    do
227
      local Camera = game.Workspace.CurrentCamera
228
      local Player = game:GetService("Players").LocalPlayer
229
      repeat
230
        wait()
231
      until Player.Character
232
      Camera.CameraType = "Scriptable"
233
      game:GetService("RunService").Stepped:connect(function()
234
        Camera.CoordinateFrame = Camera.CoordinateFrame * CFrame.fromEulerAnglesXYZ(0.01, 0.01, 0.01)
235
      end)
236
    end
237
  end
238
end
239
mouse.KeyDown:connect(onKeyDown)
240
function onKeyDown(key)
241
  key:lower()
242
  if key == "g" then
243
    local Camera = game.Workspace.CurrentCamera
244
    Camera.CameraType = "Follow"
245
  end
246
end
247
mouse.KeyDown:connect(onKeyDown)
248
local Player, Character, Mouse = game:service("Players").LocalPlayer, game:GetService("Players").LocalPlayer.Character, game:GetService("Players").LocalPlayer:GetMouse()
249
local currentCam = workspace.CurrentCamera
250
Humanoid = Character:findFirstChild("Humanoid")
251
Torso = Character:findFirstChild("Torso")
252
Head = Character:findFirstChild("Head")
253
Right_Arm = Character:findFirstChild("Right Arm")
254
Left_Arm = Character:findFirstChild("Left Arm")
255
Right_Leg = Character:findFirstChild("Right Leg")
256
Right_Leg.FormFactor = "Custom"
257
Left_Leg = Character:findFirstChild("Left Leg")
258
Left_Leg.FormFactor = "Custom"
259
Right_Shoulder = Torso:findFirstChild("Right Shoulder")
260
Left_Shoulder = Torso:findFirstChild("Left Shoulder")
261
Right_Hip = Torso:findFirstChild("Right Hip")
262
Left_Hip = Torso:findFirstChild("Left Hip")
263
Neck = Torso:findFirstChild("Neck")
264
rootPart = Character:findFirstChild("HumanoidRootPart")
265
rootPart.Archivable = true
266
rootJoint = rootPart:findFirstChild("RootJoint")
267
rootJoint.Archivable = true
268
c_new = CFrame.new
269
i_new = Instance.new
270
c_angles = CFrame.Angles
271
Humanoid:ClearAllChildren()
272
local Animations = false
273
local followMouse = false
274
local isSprinting = false
275
local Angle = 0
276
local angleSpeed = 1
277
local currentAnim
278
local Vaping = false
279
local vapePower = 2.5
280
local Release = false
281
local currentFace = Head.face.Texture
282
function math_pos(float)
283
  if float < 0 then
284
    float = 0
285
  end
286
  return float
287
end
288
function math_neg(float)
289
  if float > 0 then
290
    float = 0
291
  end
292
  return float
293
end
294
function math_max(float, max)
295
  if max < float then
296
    float = max
297
  end
298
  return float
299
end
300
function math_min(float, min)
301
  if min < float then
302
    float = min
303
  end
304
  return float
305
end
306
function newWeld(wp0, wp1, wc0x, wc0y, wc0z)
307
  wld = Instance.new("Weld", wp1)
308
  wld.Part0 = wp0
309
  wld.Part1 = wp1
310
  wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
311
  return wld
312
end
313
function newWeld2(wp02, wp12, wc0x2, wc0y2, wc0z2, wc0x12, wc0y12, wc0z12)
314
  wld2 = Instance.new("Weld", wp12)
315
  wld2.Part0 = wp02
316
  wld2.Part1 = wp12
317
  wld2.C0 = CFrame.new(wc0x2, wc0y2, wc0z2) * CFrame.Angles(wc0x12, wc0y12, wc0z12)
318
  return wld2
319
end
320
LA_Weld = newWeld(Torso, Left_Arm, -1.5, 0.5, 0)
321
Left_Arm.Weld.C1 = CFrame.new(0, 0.5, 0)
322
RA_Weld = newWeld(Torso, Right_Arm, 1.5, 0.5, 0)
323
Right_Arm.Weld.C1 = CFrame.new(0, 0.5, 0)
324
LL_Weld = newWeld(Torso, Left_Leg, -0.5, -1, 0)
325-
    z2.SoundId = "rbxassetid://179697562"
325+
326
RL_Weld = newWeld(Torso, Right_Leg, 0.5, -1, 0)
327-
    z2.Pitch = 0.72
327+
328
Torso_Weld = newWeld(rootPart, Torso, 0, -1, 0)
329
Torso.Weld.C1 = CFrame.new(0, -1, 0)
330
Head_Weld = newWeld(Torso, Head, 0, 1.5, 0)
331
function nooutline(part)
332
  part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
333
end
334
function part(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
335
  local fp = i_new("Part")
336
  fp.formFactor = formfactor
337-
      Head.face.Texture = "http://www.roblox.com/asset/?id=7317691"
337+
338
  fp.Reflectance = reflectance
339
  fp.Transparency = transparency
340
  fp.CanCollide = false
341
  fp.Locked = true
342-
    z.SoundId = "rbxassetid://394983740"
342+
343
  fp.Name = name
344-
    z.Pitch = 0.72
344+
345
  fp.Position = Character.Torso.Position
346
  nooutline(fp)
347
  fp.Material = material
348
  fp:BreakJoints()
349
  return fp
350
end
351
function mesh(Mesh, part, meshtype, meshid, offset, scale)
352
  local mesh = i_new(Mesh)
353
  mesh.Parent = part
354
  if Mesh == "SpecialMesh" then
355
    mesh.MeshType = meshtype
356
    mesh.MeshId = meshid
357
  end
358
  mesh.Offset = offset
359
  mesh.Scale = scale
360
  return mesh
361
end
362
function weld(parent, part0, part1, c0, c1)
363
  local weld = i_new("Weld")
364
  weld.Parent = parent
365
  weld.Part0 = part0
366
  weld.Part1 = part1
367
  weld.C0 = c0
368
  weld.C1 = c1
369
  return weld
370
end
371
function swait(num)
372
  if num == 0 or num == nil then
373
    game:GetService("RunService").Stepped:wait(0)
374
  else
375
    for i = 0, num do
376
      game:GetService("RunService").Stepped:wait(0)
377
    end
378
  end
379
end
380
function newRay(start, face, range, wat)
381
  local ray = Ray.new(start.p, (face.p - start.p).Unit * range)
382
  hit, pos = workspace:findPartOnRayWithIgnoreList(ray, wat)
383
  return ray, hit, pos
384
end
385
function QuaternionFromCFrame(cf)
386
  local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
387
  local trace = m00 + m11 + m22
388
  if trace > 0 then
389
    local s = math.sqrt(1 + trace)
390
    local recip = 0.5 / s
391
    return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
392
  else
393
    local i = 0
394
    if m00 < m11 then
395
      i = 1
396
    end
397
    if m22 > (i == 0 and m00 or m11) then
398
      i = 2
399-
          Head.face.Texture = "http://www.roblox.com/asset/?id=7317691"
399+
400
    if i == 0 then
401
      local s = math.sqrt(m00 - m11 - m22 + 1)
402
      local recip = 0.5 / s
403
      return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
404
    elseif i == 1 then
405
      local s = math.sqrt(m11 - m22 - m00 + 1)
406
      local recip = 0.5 / s
407
      return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
408
    elseif i == 2 then
409
      local s = math.sqrt(m22 - m00 - m11 + 1)
410
      local recip = 0.5 / s
411
      return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
412-
Handle = part(Enum.FormFactor.Symmetric, Vepr, Enum.Material.Metal, 1, 0, "Royal purple", "Handle", Vector3.new(0.200000003, 0.800000012, 0.200000003))
412+
413
  end
414
end
415
function QuaternionToCFrame(px, py, pz, x, y, z, w)
416
  local xs, ys, zs = x + x, y + y, z + z
417
  local wx, wy, wz = w * xs, w * ys, w * zs
418
  local xx = x * xs
419
  local xy = x * ys
420
  local xz = x * zs
421
  local yy = y * ys
422
  local yz = y * zs
423
  local zz = z * zs
424
  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))
425
end
426
function QuaternionSlerp(a, b, t)
427
  local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
428
  local startInterp, finishInterp
429
  if cosTheta >= 1.0E-4 then
430
    if 1 - cosTheta > 1.0E-4 then
431
      local theta = math.acos(cosTheta)
432
      local invSinTheta = 1 / math.sin(theta)
433
      startInterp = math.sin((1 - t) * theta) * invSinTheta
434
      finishInterp = math.sin(t * theta) * invSinTheta
435
    else
436
      startInterp = 1 - t
437
      finishInterp = t
438
    end
439
  elseif 1 + cosTheta > 1.0E-4 then
440
    local theta = math.acos(-cosTheta)
441
    local invSinTheta = 1 / math.sin(theta)
442
    startInterp = math.sin((t - 1) * theta) * invSinTheta
443
    finishInterp = math.sin(t * theta) * invSinTheta
444
  else
445
    startInterp = t - 1
446
    finishInterp = t
447
  end
448
  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
449
end
450
function clerp(a, b, t)
451
  local qa = {
452
    QuaternionFromCFrame(a)
453
  }
454
  local qb = {
455
    QuaternionFromCFrame(b)
456
  }
457
  local ax, ay, az = a.x, a.y, a.z
458
  local bx, by, bz = b.x, b.y, b.z
459
  local _t = 1 - t
460
  return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
461
end
462
local freeFalling = false
463
Humanoid.FreeFalling:connect(function(f)
464
  if f then
465
    freeFalling = true
466
  else
467
    freeFalling = false
468-
BottleR = part(Enum.FormFactor.Plate, m, Enum.Material.Neon, 0, 0, "Royal purple", "Handle", Vector3.new(1.44916654, 1.73900044, 1.44916654))
468+
469
end)
470-
mesh("SpecialMesh", BottleR, Enum.MeshType.FileMesh, "http://www.roblox.com/asset/?id=11409474", Vector3.new(0, 0, 0), Vector3.new(2.17374969, 3.62291789, 2.17374969))
470+
471
end
472
function Vape()
473
  if Release == true and vapePower > 5 then
474
    Vaping = true
475
    Humanoid.WalkSpeed = 0
476
    Humanoid.JumpPower = 0
477
    z2 = Instance.new("Sound", char)
478
    z2.SoundId = "rbxassetid://399712419"
479
    z2.Looped = false
480
    z2.Pitch = 1
481
    z2.Volume = 5
482
    for i = 0, 3, 0.01 do
483
      Animations = true
484
      RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, 0.1) * c_angles(math.rad(20), math.rad(0), math.rad(20)), 0.01)
485
      LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0.1) * c_angles(math.rad(20), math.rad(0), math.rad(-20)), 0.01)
486
      LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(-5.5)), 0.005)
487
      RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(5.5)), 0.005)
488
      Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(0), math.rad(0), 0), 0.01)
489
      Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(-5), math.rad(0), 0), 0.005)
490
      Head.face.Texture = "http://www.roblox.com/asset/?id=108394858"
491
      swait()
492
    end
493
    z2:Play()
494
    z = Instance.new("Sound", char)
495
    z.SoundId = "rbxassetid://399712419"
496
    z.Looped = false
497
    z.Pitch = 1
498
    z.Volume = 10
499
    wait(0.1)
500
    z:Play()
501
    wait(7.5)
502
    Head.face.Texture = currentFace
503
    Humanoid.WalkSpeed = 16
504
    Humanoid.JumpPower = 50
505
    Animations = false
506
    wait(1)
507
    Vaping = false
508
    vapePower = 2.5
509
  elseif vapePower < 5 then
510
    Vaping = false
511
    vapePower = 2.5
512
  end
513
end
514
Mouse.KeyDown:connect(function(key)
515
  if key == "z" and followMouse == false then
516
    followMouse = true
517
    gyro = Instance.new("BodyGyro", rootPart)
518
    gyro.P = 10000000
519
    gyro.D = 1000
520
    gyro.MaxTorque = Vector3.new(0, 10000000, 0)
521
    coroutine.resume(coroutine.create(function()
522
      while wait() do
523
        gyro.CFrame = CFrame.new(Vector3.new(), (Mouse.Hit.p - rootPart.CFrame.p).unit * 100)
524
      end
525-
BottleL = part(Enum.FormFactor.Plate, m, Enum.Material.Neon, 0, 0, "Royal purple", "Handle", Vector3.new(1.44916654, 1.73900044, 1.44916654))
525+
526
  elseif key == "z" and followMouse == true then
527-
mesh("SpecialMesh", BottleL, Enum.MeshType.FileMesh, "http://www.roblox.com/asset/?id=11409474", Vector3.new(0, 0, 0), Vector3.new(2.17374969, 3.62291789, 2.17374969))
527+
528
    gyro:Destroy()
529
  end
530
end)
531
Mouse.Button1Down:connect(function()
532
  if Vaping == false then
533
    Vaping = true
534
    Release = false
535
    Mouse.Button1Up:connect(function()
536
      Release = true
537
    end)
538
    if Release == false then
539
      repeat
540
        Animations = true
541
        vapePower = vapePower + 0.1
542
        Humanoid.WalkSpeed = 0
543
        Humanoid.JumpPower = 0
544
        wait()
545
        RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.8, 1.4, -1) * c_angles(math.rad(60), math.rad(-25), math.rad(-80)) * CFrame.Angles(0, math.rad(150), 0), 0.1)
546
        LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0.1) * c_angles(math.rad(-12.5), math.rad(10), math.rad(-25)), 0.1)
547
        LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.rad(-15), math.rad(0), math.rad(-5)), 0.01)
548
        RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(math.rad(-15), math.rad(0), math.rad(5)), 0.01)
549
        Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, -0.05) * c_angles(math.rad(11.5), math.rad(0), 0), 0.05)
550
        Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(15), math.rad(0), 0), 0.01)
551
        if vapePower > 5 then
552
          Head.face.Texture = "http://www.roblox.com/asset/?id=108394858"
553
        elseif vapePower < 5 then
554
          Humanoid.WalkSpeed = 16
555
          Humanoid.JumpPower = 50
556
        end
557
        print(vapePower)
558
      until Release == true
559
    end
560
    Animations = false
561
    Vape()
562
  end
563
end)
564
Vepr = Instance.new("Model", Character)
565
Handle = part(Enum.FormFactor.Symmetric, Vepr, Enum.Material.Metal, 1, 0, "Fossil", "Handle", Vector3.new(0.200000003, 0.800000012, 0.200000003))
566
Handleweld = weld(Vepr, Right_Arm, Handle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.677656174, -0.199986219, -0.745416641, 0.721854568, 0.692044795, -4.12490877E-8, 0, 5.96046377E-8, 1, 0.692044854, -0.721854508, 4.30258851E-8))
567
Player = game:GetService("Players").LocalPlayer
568
Character = Player.Character
569
Mouse = Player:GetMouse()
570
m = Instance.new("Model", Character)
571
local weldBetween = function(a, b)
572
  local weldd = Instance.new("ManualWeld")
573
  weldd.Part0 = a
574
  weldd.Part1 = b
575
  weldd.C0 = CFrame.new()
576
  weldd.C1 = b.CFrame:inverse() * a.CFrame
577
  weldd.Parent = a
578
  return weldd
579
end
580
it = Instance.new
581
function nooutline(part)
582
  part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
583
end
584
function part(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
585
  local fp = it("Part")
586
  fp.formFactor = formfactor
587
  fp.Parent = parent
588
  fp.Reflectance = reflectance
589
  fp.Transparency = transparency
590
  fp.CanCollide = false
591
  fp.Locked = true
592
  fp.BrickColor = BrickColor.new(tostring(brickcolor))
593
  fp.Name = name
594
  fp.Size = size
595
  fp.Position = Character.Torso.Position
596
  nooutline(fp)
597
  fp.Material = material
598
  fp:BreakJoints()
599
  return fp
600
end
601
function mesh(Mesh, part, meshtype, meshid, offset, scale)
602
  local mesh = it(Mesh)
603
  mesh.Parent = part
604
  if Mesh == "SpecialMesh" then
605
    mesh.MeshType = meshtype
606
    mesh.MeshId = meshid
607
  end
608
  mesh.Offset = offset
609
  mesh.Scale = scale
610
  return mesh
611
end
612
function weld(parent, part0, part1, c0, c1)
613
  local weld = it("Weld")
614
  weld.Parent = parent
615
  weld.Part0 = part0
616
  weld.Part1 = part1
617
  weld.C0 = c0
618
  weld.C1 = c1
619
  return weld
620
end
621
BottleR = part(Enum.FormFactor.Plate, m, Enum.Material.Neon, 0, 0, "Earth orange", "Handle", Vector3.new(1.44916654, 1.73900044, 1.44916654))
622
BottleRweld = weld(m, Character["Right Arm"], BottleR, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.150012493, 1.13759422, -1.12566471, -1, 0, 0, 0, 0.146834984, -0.989161015, 0, -0.989160895, -0.146834999))
623
mesh("SpecialMesh", BottleR, Enum.MeshType.FileMesh, "http://www.roblox.com/asset/?id=1352690460", Vector3.new(0, 0, 0), Vector3.new(2.17374969, 3.62291789, 2.17374969))
624
Player = game:GetService("Players").LocalPlayer
625
Character = Player.Character
626
Mouse = Player:GetMouse()
627
m = Instance.new("Model", Character)
628
local weldBetween = function(a, b)
629
  local weldd = Instance.new("ManualWeld")
630
  weldd.Part0 = a
631
  weldd.Part1 = b
632
  weldd.C0 = CFrame.new()
633
  weldd.C1 = b.CFrame:inverse() * a.CFrame
634
  weldd.Parent = a
635
  return weldd
636
end
637
it = Instance.new
638
function nooutline(part)
639
  part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
640
end
641
function part(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
642
  local fp = it("Part")
643
  fp.formFactor = formfactor
644
  fp.Parent = parent
645
  fp.Reflectance = reflectance
646
  fp.Transparency = transparency
647
  fp.CanCollide = false
648
  fp.Locked = true
649
  fp.BrickColor = BrickColor.new(tostring(brickcolor))
650
  fp.Name = name
651
  fp.Size = size
652
  fp.Position = Character.Torso.Position
653
  nooutline(fp)
654
  fp.Material = material
655
  fp:BreakJoints()
656
  return fp
657
end
658
function mesh(Mesh, part, meshtype, meshid, offset, scale)
659
  local mesh = it(Mesh)
660
  mesh.Parent = part
661
  if Mesh == "SpecialMesh" then
662
    mesh.MeshType = meshtype
663
    mesh.MeshId = meshid
664
  end
665
  mesh.Offset = offset
666
  mesh.Scale = scale
667
  return mesh
668
end
669
function weld(parent, part0, part1, c0, c1)
670
  local weld = it("Weld")
671
  weld.Parent = parent
672
  weld.Part0 = part0
673
  weld.Part1 = part1
674
  weld.C0 = c0
675
  weld.C1 = c1
676
  return weld
677
end
678
BottleL = part(Enum.FormFactor.Plate, m, Enum.Material.Neon, 0, 0, "Earth orange", "Handle", Vector3.new(1.44916654, 1.73900044, 1.44916654))
679
BottleLweld = weld(m, Character["Left Arm"], BottleL, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.229987741, 1.13759422, -1.12566471, -1, 0, 0, 0, 0.146834984, -0.989161015, 0, -0.989160895, -0.146834999))
680
mesh("SpecialMesh", BottleL, Enum.MeshType.FileMesh, "http://www.roblox.com/asset/?id=1352690460", Vector3.new(0, 0, 0), Vector3.new(2.17374969, 3.62291789, 2.17374969))
681
game:GetService("RunService").Stepped:connect(function()
682
  Angle = Angle % 100 + angleSpeed / 10
683
  walkingMagnitude = Vector3.new(rootPart.Velocity.X, 0, rootPart.Velocity.Z).magnitude
684
  jumpVel = Torso.Velocity.Y
685
  if Humanoid.Jump and jumpVel > 1 then
686
    currentAnim = "Jumping"
687
  elseif freeFalling == true then
688
    currentAnim = "Falling"
689
  elseif walkingMagnitude < 2 then
690
    currentAnim = "Idling"
691
  elseif isSprinting == true then
692
    currentAnim = "Sprinting"
693
  elseif walkingMagnitude > 2 then
694
    currentAnim = "Walking"
695
  end
696
  if currentAnim == "Jumping" and Animations == false then
697
    angleSpeed = 1
698
    axisSpeed = 1
699
    RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, -0.1) * c_angles(math.rad(-10), math.rad(0), math.rad(10)), 0.15)
700
    LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, -0.1) * c_angles(math.rad(-10), math.rad(0), math.rad(-10)), 0.15)
701
    LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.rad(-10), math.rad(0), math.rad(-10)), 0.15)
702
    RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(math.rad(-10), math.rad(0), math.rad(10)), 0.15)
703
    Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)) * c_angles(math.rad(0), math.rad(0), rootPart.RotVelocity.Y / 55), 0.4)
704
    Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(15), math.rad(0), math.rad(0)), 0.15)
705
  elseif currentAnim == "Falling" and Animations == false then
706
    angleSpeed = 1
707
    axisSpeed = 1
708
    RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, -0.1) * c_angles(math.rad(0), math.rad(0), math.rad(65)), 0.125)
709
    LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, -0.1) * c_angles(math.rad(0), math.rad(0), math.rad(-65)), 0.125)
710
    LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -0.4, -0.4) * c_angles(math.rad(-5), math.rad(0), math.rad(-2.5)), 0.125)
711
    RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -0.4, -0.4) * c_angles(math.rad(-5), math.rad(0), math.rad(2.5)), 0.125)
712
    Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(-20), math.rad(0), math.rad(0)), 0.05)
713
    Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(-17.5), math.rad(0), math.rad(0)), 0.125)
714
  elseif currentAnim == "Idling" and Animations == false then
715
    angleSpeed = 0.25
716
    axisSpeed = 0.25
717
    RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5 + math.sin(Angle) * 0.075, 0.1) * c_angles(math.rad(15) + math.sin(Angle) * 0.075, math.rad(0), math.rad(10) + math.sin(Angle) * 0.075), 0.125)
718
    LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5 + math.sin(Angle) * 0.075, 0.1) * c_angles(math.rad(-10) + math.sin(Angle) * 0.075, math.rad(0), math.rad(-10) - math.sin(Angle) * 0.075), 0.125)
719
    LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1.1 - math.sin(Angle) * 0.075, -0.25) * c_angles(math.rad(15), math.rad(0), math.rad(-7.5)), 0.125)
720
    RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1.1 - math.sin(Angle) * 0.075, -0.25) * c_angles(math.rad(-15), math.rad(0), math.rad(7.5)), 0.125)
721
    Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1 + math.sin(Angle) * 0.075, 0) * c_angles(math.rad(-5), math.rad(0), 0), 0.3)
722
    Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, -0.05) * c_angles(math.rad(-5) + math.sin(Angle) * 0.05, math.rad(0), 0), 0.125)
723
  elseif currentAnim == "Sprinting" and Animations == false then
724
    angleSpeed = 2
725
    axisSpeed = 2
726
    RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, 0) * c_angles(-math.sin(Angle) * 2, math.rad(5) + math.sin(Angle) * 0.1, math.rad(5) + rootPart.RotVelocity.Y / 35), 0.15)
727
    RA_Weld.C1 = c_new(0, 0.5, 0)
728
    LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(-math.sin(Angle) * -2, math.rad(-5) + math.sin(Angle) * 0.1, math.rad(-5) + rootPart.RotVelocity.Y / 35), 0.15)
729
    LA_Weld.C1 = c_new(0, 0.5, 0)
730
    LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1.15 + math_pos(-math.cos(Angle - 0.25) * 0.65), math_neg(math.asin(math.sin(Angle)) * 0.65)) * c_angles(-0.025 - math.asin(math.sin(Angle)) * 1, 0, -0.025 + -math.asin(math.sin(Angle)) * 0.025 + rootPart.RotVelocity.Y / 25), 0.15)
731
    RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1.15 + math_pos(math.cos(Angle - 0.25) * 0.65), math_neg(-math.asin(math.sin(Angle)) * 0.65)) * c_angles(-0.025 + math.asin(math.sin(Angle)) * 1, 0, 0.025 + -math.asin(math.sin(Angle)) * 0.025 + rootPart.RotVelocity.Y / 25), 0.15)
732
    Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1 + math.abs(math.sin(Angle) * 0.25), 0) * c_angles(math.rad(-20) + math.abs(math.sin(Angle) * 0.05) + rootPart.RotVelocity.Y / 35, math.sin(Angle) * 0.015, rootPart.RotVelocity.Y / 55), 0.15)
733
    Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.abs(math.sin(Angle / 2) * 0.5 * 0.05), math.sin(Angle) * -0.05 + rootPart.RotVelocity.Y / 15, 0), 0.15)
734
  elseif currentAnim == "Walking" and Animations == false then
735
    angleSpeed = 1
736
    axisSpeed = 1
737
    Humanoid.WalkSpeed = 7
738
    RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, 0) * c_angles(-math.sin(Angle) * 0.6, math.rad(5) + math.sin(Angle) * 0.05, math.rad(5)), 0.15)
739
    LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(-math.sin(Angle) * -0.6, math.rad(-5) + math.sin(Angle) * 0.05, math.rad(-5)), 0.15)
740
    LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1.05 + math_pos(-math.cos(Angle - 0.25) * 0.35), math_neg(math.asin(math.sin(Angle)) * 0.35)) * c_angles(-0.025 - math.asin(math.sin(Angle)) * 0.4, 0, -0.025 + -math.asin(math.sin(Angle)) * 0.025 - rootPart.RotVelocity.Y / 65), 0.15)
741
    RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1.05 + math_pos(math.cos(Angle - 0.25) * 0.35), math_neg(-math.asin(math.sin(Angle)) * 0.35)) * c_angles(-0.025 + math.asin(math.sin(Angle)) * 0.4, 0, 0.025 + -math.asin(math.sin(Angle)) * 0.025 - rootPart.RotVelocity.Y / 65), 0.15)
742
    Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1 + math.abs(math.sin(Angle) * 0.05), 0) * c_angles(math.rad(-12.5) + math.abs(math.sin(Angle) * 0.05), math.sin(Angle) * 0.015, rootPart.RotVelocity.Y / 55), 0.15)
743
    Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.abs(math.sin(Angle / 2) * 0.5 * 0.05), math.sin(Angle) * -0.05 + rootPart.RotVelocity.Y / 45, 0), 0.15)
744
  end
745
end)