Advertisement
yoyo74456

Dual Alc

Sep 6th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.20 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end
  2. print("FE Compatibility: by WaverlyCole & Mokiros")
  3. InternalData = {}
  4. do
  5. script.Parent = owner.Character
  6. local Event = Instance.new("RemoteEvent")
  7. Event.Name = "UserInput"
  8. local function NewFakeEvent()
  9. local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect
  10. return Fake
  11. end
  12. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  13. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  14. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  15. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  16. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  17. local function TriggerEvent(self,Event,...)
  18. local Trigger = Mouse[Event]
  19. if Trigger and Trigger.fakeEvent and Trigger.Function then
  20. Trigger.Function(...)
  21. end
  22. end
  23. Mouse.TrigEvent = TriggerEvent
  24. UserInputService.TrigEvent = TriggerEvent
  25. Event.OnServerEvent:Connect(function(FiredBy,Input)
  26. if FiredBy.Name ~= owner.Name then end
  27. if Input.MouseEvent then
  28. Mouse.Target = Input.Target
  29. Mouse.Hit = Input.Hit
  30. else
  31. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  32. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  33. return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up")
  34. end
  35. for _,Action in pairs(ContextActionService.Actions) do
  36. for _,Key in pairs(Action.Keys) do
  37. if Key==Input.KeyCode then
  38. Action.Function(Action.Name,Input.UserInputState,Input)
  39. end
  40. end
  41. end
  42. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  43. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  44. end
  45. end)
  46. InternalData["Mouse"] = Mouse
  47. InternalData["ContextActionService"] = ContextActionService
  48. InternalData["UserInputService"] = UserInputService
  49. Event.Parent = NLS([[
  50. local Player = owner
  51. local Event = script:WaitForChild("UserInput")
  52. local UserInputService = game:GetService("UserInputService")
  53. local Mouse = Player:GetMouse()
  54. local Input = function(Input,gameProcessedEvent)
  55. if gameProcessedEvent then return end
  56. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  57. end
  58. UserInputService.InputBegan:Connect(Input)
  59. UserInputService.InputEnded:Connect(Input)
  60. local Hit,Target
  61. while wait(1/30) do
  62. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  63. Hit,Target = Mouse.Hit,Mouse.Target
  64. Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  65. end
  66. end
  67. ]],owner.Character)
  68. end
  69. RealGame = game;game = setmetatable({},{
  70. __index = function (self,Index)
  71. local Sandbox = function (Thing)
  72. if Thing:IsA("Player") then
  73. local RealPlayer = Thing
  74. return setmetatable({},{
  75. __index = function (self,Index)
  76. local Type = type(RealPlayer[Index])
  77. if Type == "function" then
  78. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  79. return function (self)
  80. return InternalData["Mouse"]
  81. end
  82. end
  83. return function (self,...)
  84. return RealPlayer[Index](RealPlayer,...)
  85. end
  86. else
  87. if Index == "PlrObj" then
  88. return RealPlayer
  89. end
  90. return RealPlayer[Index]
  91. end
  92. end;
  93. __tostring = function(self)
  94. return RealPlayer.Name
  95. end
  96. })
  97. end
  98. end
  99. if RealGame[Index] then
  100. local Type = type(RealGame[Index])
  101. if Type == "function" then
  102. if Index:lower() == "getservice" or Index:lower() == "service" then
  103. return function (self,Service)
  104. if Service:lower() == "players" then
  105. return setmetatable({},{
  106. __index = function (self2,Index2)
  107. local RealService = RealGame:GetService(Service)
  108. local Type2 = type(Index2)
  109. if Type2 == "function" then
  110. return function (self,...)
  111. return RealService[Index2](RealService,...)
  112. end
  113. else
  114. if Index2:lower() == "localplayer" then
  115. return Sandbox(owner)
  116. end
  117. return RealService[Index2]
  118. end
  119. end;
  120. __tostring = function(self)
  121. return RealGame:GetService(Service).Name
  122. end
  123. })
  124. elseif Service:lower() == "contextactionservice" then
  125. return InternalData["ContextActionService"]
  126. elseif Service:lower() == "contextactionservice" then
  127. return InternalData["UserInputService"]
  128. elseif Service:lower() == "runservice" then
  129. return setmetatable({},{
  130. __index = function(self2,Index2)
  131. local RealService = RealGame:GetService(Service)
  132. local Type2 = type(Index2)
  133. if Type2 == "function" then
  134. return function (self,...)
  135. return RealService[Index2](RealService,...)
  136. end
  137. else
  138. if Index2:lower() == "bindtorenderstep" then
  139. return function (self,Name,Priority,Function)
  140. return RealGame:GetService("RunService").Stepped:Connect(Function)
  141. end
  142. end
  143. if Index2:lower() == "renderstepped" then
  144. return RealService["Stepped"]
  145. end
  146. return RealService[Index2]
  147. end
  148. end
  149. })
  150. else
  151. return RealGame:GetService(Service)
  152. end
  153. end
  154. end
  155. return function (self,...)
  156. return RealGame[Index](RealGame,...)
  157. end
  158. else
  159. if game:GetService(Index) then
  160. return game:GetService(Index)
  161. end
  162. return RealGame[Index]
  163. end
  164. else
  165. return nil
  166. end
  167. end
  168. });Game = game;owner = game:GetService("Players").LocalPlayer;script = {}
  169. Player = game:GetService("Players").LocalPlayer
  170. Character = Player.Character
  171. Mouse = Player:GetMouse()
  172. m = Instance.new("Model", Character)
  173. local weldBetween = function(a, b)
  174. local weldd = Instance.new("ManualWeld")
  175. weldd.Part0 = a
  176. weldd.Part1 = b
  177. weldd.C0 = CFrame.new()
  178. weldd.C1 = b.CFrame:inverse() * a.CFrame
  179. weldd.Parent = a
  180. return weldd
  181. end
  182. it = Instance.new
  183. function nooutline(part)
  184. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  185. end
  186. function part(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
  187. local fp = it("Part")
  188. fp.formFactor = formfactor
  189. fp.Parent = parent
  190. fp.Reflectance = reflectance
  191. fp.Transparency = transparency
  192. fp.CanCollide = false
  193. fp.Locked = true
  194. fp.BrickColor = BrickColor.new(tostring(brickcolor))
  195. fp.Name = name
  196. fp.Size = size
  197. fp.Position = Character.Torso.Position
  198. nooutline(fp)
  199. fp.Material = material
  200. fp:BreakJoints()
  201. return fp
  202. end
  203. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  204. local mesh = it(Mesh)
  205. mesh.Parent = part
  206. if Mesh == "SpecialMesh" then
  207. mesh.MeshType = meshtype
  208. mesh.MeshId = meshid
  209. end
  210. mesh.Offset = offset
  211. mesh.Scale = scale
  212. return mesh
  213. end
  214. function weld(parent, part0, part1, c0, c1)
  215. local weld = it("Weld")
  216. weld.Parent = parent
  217. weld.Part0 = part0
  218. weld.Part1 = part1
  219. weld.C0 = c0
  220. weld.C1 = c1
  221. return weld
  222. end
  223. F = part(Enum.FormFactor.Plate, m, Enum.Material.Plastic, 0, 0, "Royal purple", "Handle", Vector3.new(3.5875988, 0.478346467, 1.19586647))
  224. 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))
  225. 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))
  226. player = game.Players.LocalPlayer
  227. char = player.Character
  228. run = game:GetService("RunService")
  229. local xd = Instance.new("Model", game.Workspace)
  230. xd.Name = player.Name .. "'s INSTANCES"
  231. ignore = {}
  232. mouse = player:GetMouse()
  233. mouse.TargetFilter = xd
  234. local IdleAndWalk = false
  235. current = true
  236. skl = false
  237. function onKeyDown(key)
  238. key:lower()
  239. if key == "f" then
  240. do
  241. local Camera = game.Workspace.CurrentCamera
  242. local Player = game:GetService("Players").LocalPlayer
  243. repeat
  244. wait()
  245. until Player.Character
  246. Camera.CameraType = "Scriptable"
  247. game:GetService("RunService").Stepped:connect(function()
  248. Camera.CoordinateFrame = Camera.CoordinateFrame * CFrame.fromEulerAnglesXYZ(0.01, 0.01, 0.01)
  249. end)
  250. end
  251. end
  252. end
  253. mouse.KeyDown:connect(onKeyDown)
  254. function onKeyDown(key)
  255. key:lower()
  256. if key == "g" then
  257. local Camera = game.Workspace.CurrentCamera
  258. Camera.CameraType = "Follow"
  259. end
  260. end
  261. mouse.KeyDown:connect(onKeyDown)
  262. local Player, Character, Mouse = game:service("Players").LocalPlayer, game:GetService("Players").LocalPlayer.Character, game:GetService("Players").LocalPlayer:GetMouse()
  263. local currentCam = workspace.CurrentCamera
  264. Humanoid = Character:findFirstChild("Humanoid")
  265. Torso = Character:findFirstChild("Torso")
  266. Head = Character:findFirstChild("Head")
  267. Right_Arm = Character:findFirstChild("Right Arm")
  268. Left_Arm = Character:findFirstChild("Left Arm")
  269. Right_Leg = Character:findFirstChild("Right Leg")
  270. Right_Leg.FormFactor = "Custom"
  271. Left_Leg = Character:findFirstChild("Left Leg")
  272. Left_Leg.FormFactor = "Custom"
  273. Right_Shoulder = Torso:findFirstChild("Right Shoulder")
  274. Left_Shoulder = Torso:findFirstChild("Left Shoulder")
  275. Right_Hip = Torso:findFirstChild("Right Hip")
  276. Left_Hip = Torso:findFirstChild("Left Hip")
  277. Neck = Torso:findFirstChild("Neck")
  278. rootPart = Character:findFirstChild("HumanoidRootPart")
  279. rootPart.Archivable = true
  280. rootJoint = rootPart:findFirstChild("RootJoint")
  281. rootJoint.Archivable = true
  282. c_new = CFrame.new
  283. i_new = Instance.new
  284. c_angles = CFrame.Angles
  285. Humanoid:ClearAllChildren()
  286. local Animations = false
  287. local followMouse = false
  288. local isSprinting = false
  289. local Angle = 0
  290. local angleSpeed = 1
  291. local currentAnim
  292. local Vaping = false
  293. local vapePower = 2.5
  294. local Release = false
  295. local currentFace = Head.face.Texture
  296. function math_pos(float)
  297. if float < 0 then
  298. float = 0
  299. end
  300. return float
  301. end
  302. function math_neg(float)
  303. if float > 0 then
  304. float = 0
  305. end
  306. return float
  307. end
  308. function math_max(float, max)
  309. if max < float then
  310. float = max
  311. end
  312. return float
  313. end
  314. function math_min(float, min)
  315. if min < float then
  316. float = min
  317. end
  318. return float
  319. end
  320. function newWeld(wp0, wp1, wc0x, wc0y, wc0z)
  321. wld = Instance.new("Weld", wp1)
  322. wld.Part0 = wp0
  323. wld.Part1 = wp1
  324. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  325. return wld
  326. end
  327. function newWeld2(wp02, wp12, wc0x2, wc0y2, wc0z2, wc0x12, wc0y12, wc0z12)
  328. wld2 = Instance.new("Weld", wp12)
  329. wld2.Part0 = wp02
  330. wld2.Part1 = wp12
  331. wld2.C0 = CFrame.new(wc0x2, wc0y2, wc0z2) * CFrame.Angles(wc0x12, wc0y12, wc0z12)
  332. return wld2
  333. end
  334. LA_Weld = newWeld(Torso, Left_Arm, -1.5, 0.5, 0)
  335. Left_Arm.Weld.C1 = CFrame.new(0, 0.5, 0)
  336. RA_Weld = newWeld(Torso, Right_Arm, 1.5, 0.5, 0)
  337. Right_Arm.Weld.C1 = CFrame.new(0, 0.5, 0)
  338. LL_Weld = newWeld(Torso, Left_Leg, -0.5, -1, 0)
  339. Left_Leg.Weld.C1 = CFrame.new(0, 1, 0)
  340. RL_Weld = newWeld(Torso, Right_Leg, 0.5, -1, 0)
  341. Right_Leg.Weld.C1 = CFrame.new(0, 1, 0)
  342. Torso_Weld = newWeld(rootPart, Torso, 0, -1, 0)
  343. Torso.Weld.C1 = CFrame.new(0, -1, 0)
  344. Head_Weld = newWeld(Torso, Head, 0, 1.5, 0)
  345. function nooutline(part)
  346. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  347. end
  348. function part(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
  349. local fp = i_new("Part")
  350. fp.formFactor = formfactor
  351. fp.Parent = parent
  352. fp.Reflectance = reflectance
  353. fp.Transparency = transparency
  354. fp.CanCollide = false
  355. fp.Locked = true
  356. fp.BrickColor = BrickColor.new(tostring(brickcolor))
  357. fp.Name = name
  358. fp.Size = size
  359. fp.Position = Character.Torso.Position
  360. nooutline(fp)
  361. fp.Material = material
  362. fp:BreakJoints()
  363. return fp
  364. end
  365. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  366. local mesh = i_new(Mesh)
  367. mesh.Parent = part
  368. if Mesh == "SpecialMesh" then
  369. mesh.MeshType = meshtype
  370. mesh.MeshId = meshid
  371. end
  372. mesh.Offset = offset
  373. mesh.Scale = scale
  374. return mesh
  375. end
  376. function weld(parent, part0, part1, c0, c1)
  377. local weld = i_new("Weld")
  378. weld.Parent = parent
  379. weld.Part0 = part0
  380. weld.Part1 = part1
  381. weld.C0 = c0
  382. weld.C1 = c1
  383. return weld
  384. end
  385. function swait(num)
  386. if num == 0 or num == nil then
  387. game:GetService("RunService").Stepped:wait(0)
  388. else
  389. for i = 0, num do
  390. game:GetService("RunService").Stepped:wait(0)
  391. end
  392. end
  393. end
  394. function newRay(start, face, range, wat)
  395. local ray = Ray.new(start.p, (face.p - start.p).Unit * range)
  396. hit, pos = workspace:findPartOnRayWithIgnoreList(ray, wat)
  397. return ray, hit, pos
  398. end
  399. function QuaternionFromCFrame(cf)
  400. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  401. local trace = m00 + m11 + m22
  402. if trace > 0 then
  403. local s = math.sqrt(1 + trace)
  404. local recip = 0.5 / s
  405. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  406. else
  407. local i = 0
  408. if m00 < m11 then
  409. i = 1
  410. end
  411. if m22 > (i == 0 and m00 or m11) then
  412. i = 2
  413. end
  414. if i == 0 then
  415. local s = math.sqrt(m00 - m11 - m22 + 1)
  416. local recip = 0.5 / s
  417. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  418. elseif i == 1 then
  419. local s = math.sqrt(m11 - m22 - m00 + 1)
  420. local recip = 0.5 / s
  421. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  422. elseif i == 2 then
  423. local s = math.sqrt(m22 - m00 - m11 + 1)
  424. local recip = 0.5 / s
  425. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  426. end
  427. end
  428. end
  429. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  430. local xs, ys, zs = x + x, y + y, z + z
  431. local wx, wy, wz = w * xs, w * ys, w * zs
  432. local xx = x * xs
  433. local xy = x * ys
  434. local xz = x * zs
  435. local yy = y * ys
  436. local yz = y * zs
  437. local zz = z * zs
  438. 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))
  439. end
  440. function QuaternionSlerp(a, b, t)
  441. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  442. local startInterp, finishInterp
  443. if cosTheta >= 1.0E-4 then
  444. if 1 - cosTheta > 1.0E-4 then
  445. local theta = math.acos(cosTheta)
  446. local invSinTheta = 1 / math.sin(theta)
  447. startInterp = math.sin((1 - t) * theta) * invSinTheta
  448. finishInterp = math.sin(t * theta) * invSinTheta
  449. else
  450. startInterp = 1 - t
  451. finishInterp = t
  452. end
  453. elseif 1 + cosTheta > 1.0E-4 then
  454. local theta = math.acos(-cosTheta)
  455. local invSinTheta = 1 / math.sin(theta)
  456. startInterp = math.sin((t - 1) * theta) * invSinTheta
  457. finishInterp = math.sin(t * theta) * invSinTheta
  458. else
  459. startInterp = t - 1
  460. finishInterp = t
  461. end
  462. 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
  463. end
  464. function clerp(a, b, t)
  465. local qa = {
  466. QuaternionFromCFrame(a)
  467. }
  468. local qb = {
  469. QuaternionFromCFrame(b)
  470. }
  471. local ax, ay, az = a.x, a.y, a.z
  472. local bx, by, bz = b.x, b.y, b.z
  473. local _t = 1 - t
  474. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  475. end
  476. local freeFalling = false
  477. Humanoid.FreeFalling:connect(function(f)
  478. if f then
  479. freeFalling = true
  480. else
  481. freeFalling = false
  482. end
  483. end)
  484. function Vapor()
  485. end
  486. function Vape()
  487. if Release == true and vapePower > 5 then
  488. Vaping = true
  489. Humanoid.WalkSpeed = 0
  490. Humanoid.JumpPower = 0
  491. z2 = Instance.new("Sound", char)
  492. z2.SoundId = "rbxassetid://179697562"
  493. z2.Looped = false
  494. z2.Pitch = 0.72
  495. z2.Volume = 5
  496. for i = 0, 3, 0.01 do
  497. Animations = true
  498. 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)
  499. 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)
  500. 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)
  501. 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)
  502. Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(0), math.rad(0), 0), 0.01)
  503. Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(-5), math.rad(0), 0), 0.005)
  504. Head.face.Texture = "http://www.roblox.com/asset/?id=7317691"
  505. swait()
  506. end
  507. z2:Play()
  508. z = Instance.new("Sound", char)
  509. z.SoundId = "rbxassetid://394983740"
  510. z.Looped = false
  511. z.Pitch = 0.72
  512. z.Volume = 10
  513. wait(0.1)
  514. z:Play()
  515. wait(7.5)
  516. Head.face.Texture = currentFace
  517. Humanoid.WalkSpeed = 16
  518. Humanoid.JumpPower = 50
  519. Animations = false
  520. wait(1)
  521. Vaping = false
  522. vapePower = 2.5
  523. elseif vapePower < 5 then
  524. Vaping = false
  525. vapePower = 2.5
  526. end
  527. end
  528. Mouse.KeyDown:connect(function(key)
  529. if key == "z" and followMouse == false then
  530. followMouse = true
  531. gyro = Instance.new("BodyGyro", rootPart)
  532. gyro.P = 10000000
  533. gyro.D = 1000
  534. gyro.MaxTorque = Vector3.new(0, 10000000, 0)
  535. coroutine.resume(coroutine.create(function()
  536. while wait() do
  537. gyro.CFrame = CFrame.new(Vector3.new(), (Mouse.Hit.p - rootPart.CFrame.p).unit * 100)
  538. end
  539. end))
  540. elseif key == "z" and followMouse == true then
  541. followMouse = false
  542. gyro:Destroy()
  543. end
  544. end)
  545. Mouse.Button1Down:connect(function()
  546. if Vaping == false then
  547. Vaping = true
  548. Release = false
  549. Mouse.Button1Up:connect(function()
  550. Release = true
  551. end)
  552. if Release == false then
  553. repeat
  554. Animations = true
  555. vapePower = vapePower + 0.1
  556. Humanoid.WalkSpeed = 0
  557. Humanoid.JumpPower = 0
  558. wait()
  559. 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)
  560. 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)
  561. 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)
  562. 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)
  563. 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)
  564. Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(15), math.rad(0), 0), 0.01)
  565. if vapePower > 5 then
  566. Head.face.Texture = "http://www.roblox.com/asset/?id=7317691"
  567. elseif vapePower < 5 then
  568. Humanoid.WalkSpeed = 16
  569. Humanoid.JumpPower = 50
  570. end
  571. print(vapePower)
  572. until Release == true
  573. end
  574. Animations = false
  575. Vape()
  576. end
  577. end)
  578. Vepr = Instance.new("Model", Character)
  579. Handle = part(Enum.FormFactor.Symmetric, Vepr, Enum.Material.Metal, 1, 0, "Royal purple", "Handle", Vector3.new(0.200000003, 0.800000012, 0.200000003))
  580. 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))
  581. Player = game:GetService("Players").LocalPlayer
  582. Character = Player.Character
  583. Mouse = Player:GetMouse()
  584. m = Instance.new("Model", Character)
  585. local weldBetween = function(a, b)
  586. local weldd = Instance.new("ManualWeld")
  587. weldd.Part0 = a
  588. weldd.Part1 = b
  589. weldd.C0 = CFrame.new()
  590. weldd.C1 = b.CFrame:inverse() * a.CFrame
  591. weldd.Parent = a
  592. return weldd
  593. end
  594. it = Instance.new
  595. function nooutline(part)
  596. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  597. end
  598. function part(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
  599. local fp = it("Part")
  600. fp.formFactor = formfactor
  601. fp.Parent = parent
  602. fp.Reflectance = reflectance
  603. fp.Transparency = transparency
  604. fp.CanCollide = false
  605. fp.Locked = true
  606. fp.BrickColor = BrickColor.new(tostring(brickcolor))
  607. fp.Name = name
  608. fp.Size = size
  609. fp.Position = Character.Torso.Position
  610. nooutline(fp)
  611. fp.Material = material
  612. fp:BreakJoints()
  613. return fp
  614. end
  615. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  616. local mesh = it(Mesh)
  617. mesh.Parent = part
  618. if Mesh == "SpecialMesh" then
  619. mesh.MeshType = meshtype
  620. mesh.MeshId = meshid
  621. end
  622. mesh.Offset = offset
  623. mesh.Scale = scale
  624. return mesh
  625. end
  626. function weld(parent, part0, part1, c0, c1)
  627. local weld = it("Weld")
  628. weld.Parent = parent
  629. weld.Part0 = part0
  630. weld.Part1 = part1
  631. weld.C0 = c0
  632. weld.C1 = c1
  633. return weld
  634. end
  635. BottleR = part(Enum.FormFactor.Plate, m, Enum.Material.Neon, 0, 0, "Royal purple", "Handle", Vector3.new(1.44916654, 1.73900044, 1.44916654))
  636. 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))
  637. 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))
  638. Player = game:GetService("Players").LocalPlayer
  639. Character = Player.Character
  640. Mouse = Player:GetMouse()
  641. m = Instance.new("Model", Character)
  642. local weldBetween = function(a, b)
  643. local weldd = Instance.new("ManualWeld")
  644. weldd.Part0 = a
  645. weldd.Part1 = b
  646. weldd.C0 = CFrame.new()
  647. weldd.C1 = b.CFrame:inverse() * a.CFrame
  648. weldd.Parent = a
  649. return weldd
  650. end
  651. it = Instance.new
  652. function nooutline(part)
  653. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  654. end
  655. function part(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
  656. local fp = it("Part")
  657. fp.formFactor = formfactor
  658. fp.Parent = parent
  659. fp.Reflectance = reflectance
  660. fp.Transparency = transparency
  661. fp.CanCollide = false
  662. fp.Locked = true
  663. fp.BrickColor = BrickColor.new(tostring(brickcolor))
  664. fp.Name = name
  665. fp.Size = size
  666. fp.Position = Character.Torso.Position
  667. nooutline(fp)
  668. fp.Material = material
  669. fp:BreakJoints()
  670. return fp
  671. end
  672. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  673. local mesh = it(Mesh)
  674. mesh.Parent = part
  675. if Mesh == "SpecialMesh" then
  676. mesh.MeshType = meshtype
  677. mesh.MeshId = meshid
  678. end
  679. mesh.Offset = offset
  680. mesh.Scale = scale
  681. return mesh
  682. end
  683. function weld(parent, part0, part1, c0, c1)
  684. local weld = it("Weld")
  685. weld.Parent = parent
  686. weld.Part0 = part0
  687. weld.Part1 = part1
  688. weld.C0 = c0
  689. weld.C1 = c1
  690. return weld
  691. end
  692. BottleL = part(Enum.FormFactor.Plate, m, Enum.Material.Neon, 0, 0, "Royal purple", "Handle", Vector3.new(1.44916654, 1.73900044, 1.44916654))
  693. 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))
  694. 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))
  695. game:GetService("RunService").Stepped:connect(function()
  696. Angle = Angle % 100 + angleSpeed / 10
  697. walkingMagnitude = Vector3.new(rootPart.Velocity.X, 0, rootPart.Velocity.Z).magnitude
  698. jumpVel = Torso.Velocity.Y
  699. if Humanoid.Jump and jumpVel > 1 then
  700. currentAnim = "Jumping"
  701. elseif freeFalling == true then
  702. currentAnim = "Falling"
  703. elseif walkingMagnitude < 2 then
  704. currentAnim = "Idling"
  705. elseif isSprinting == true then
  706. currentAnim = "Sprinting"
  707. elseif walkingMagnitude > 2 then
  708. currentAnim = "Walking"
  709. end
  710. if currentAnim == "Jumping" and Animations == false then
  711. angleSpeed = 1
  712. axisSpeed = 1
  713. 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)
  714. 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)
  715. 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)
  716. 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)
  717. 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)
  718. 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)
  719. elseif currentAnim == "Falling" and Animations == false then
  720. angleSpeed = 1
  721. axisSpeed = 1
  722. 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)
  723. 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)
  724. 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)
  725. 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)
  726. 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)
  727. 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)
  728. elseif currentAnim == "Idling" and Animations == false then
  729. angleSpeed = 0.25
  730. axisSpeed = 0.25
  731. 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)
  732. 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)
  733. 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)
  734. 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)
  735. 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)
  736. 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)
  737. elseif currentAnim == "Sprinting" and Animations == false then
  738. angleSpeed = 2
  739. axisSpeed = 2
  740. 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)
  741. RA_Weld.C1 = c_new(0, 0.5, 0)
  742. 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)
  743. LA_Weld.C1 = c_new(0, 0.5, 0)
  744. 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)
  745. 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)
  746. 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)
  747. 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)
  748. elseif currentAnim == "Walking" and Animations == false then
  749. angleSpeed = 1
  750. axisSpeed = 1
  751. Humanoid.WalkSpeed = 7
  752. 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)
  753. 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)
  754. 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)
  755. 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)
  756. 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)
  757. 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)
  758. end
  759. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement