Advertisement
UnVenom

UNVENOM-FE2

May 26th, 2019
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.61 KB | None | 0 0
  1. -- This script was decompiled with Critmel
  2. -- Critmel b1 by UnVenom
  3.  
  4. local hum = script.Parent:WaitForChild("Humanoid")
  5. local humRtPt = script.Parent:WaitForChild("HumanoidRootPart")
  6. local Leg_L = script.parent:WaitForChild("Left Leg")
  7. local Leg_R = script.parent:WaitForChild("Right Leg")
  8. local animIDs = game.ReplicatedStorage:WaitForChild("AnimIDs")
  9. local mainClientScript = game.Players.LocalPlayer:WaitForChild("PlayerScripts"):WaitForChild("CL_MAIN_GameScript")
  10. local isLowPerformance = false
  11. spawn(function()
  12. while true do
  13. isLowPerformance = mainClientScript.isLowPerformance:Invoke()
  14. wait(1)
  15. end
  16. end)
  17. local wallAnim = Instance.new("Animation")
  18. wallAnim.AnimationId = "rbxassetid://" .. animIDs.WallHang.Value
  19. local anim = hum:LoadAnimation(wallAnim)
  20. local lastJump = tick()
  21. local onWall
  22. hum.Touched:connect(function()
  23. local notSwimming = hum:GetStateEnabled(Enum.HumanoidStateType.Jumping)
  24. local state = hum:GetState()
  25. if notSwimming and (state == Enum.HumanoidStateType.Jumping or state == Enum.HumanoidStateType.Freefall) then
  26. local ray = Ray.new(humRtPt.Position, (humRtPt.Position + humRtPt.CFrame.lookVector - humRtPt.Position).unit * 2.5)
  27. local part, pos, normal = workspace:FindPartOnRay(ray, script.Parent)
  28. if part and part:FindFirstChild("_Wall") and tick() > lastJump + 0.1 then
  29. do
  30. local landSnd = Instance.new("Sound")
  31. landSnd.SoundId = "rbxassetid://1527502984"
  32. landSnd.Volume = 1
  33. landSnd.Parent = game.Players.LocalPlayer
  34. landSnd:Play()
  35. game:GetService("Debris"):AddItem(landSnd, 1)
  36. humRtPt.Anchored = true
  37. humRtPt.CFrame = CFrame.new(humRtPt.Position, humRtPt.Position + normal)
  38. anim:Play()
  39. local begin = tick()
  40. local jumped
  41. spawn(function()
  42. game:GetService("UserInputService").JumpRequest:wait()
  43. if begin < tick() + 0.75 then
  44. jumped = true
  45. end
  46. end)
  47. repeat
  48. wait()
  49. until jumped or tick() > begin + 0.75
  50. anim:Stop()
  51. humRtPt.Anchored = false
  52. if jumped then
  53. humRtPt.Velocity = Vector3.new(normal.X * 50, 50 + normal.Y * 50, normal.Z * 50)
  54. local jumpSnd = Instance.new("Sound")
  55. jumpSnd.SoundId = "rbxassetid://1527481141"
  56. jumpSnd.Volume = 1
  57. jumpSnd.Parent = game.Players.LocalPlayer
  58. jumpSnd:Play()
  59. game:GetService("Debris"):AddItem(jumpSnd, 1)
  60. else
  61. humRtPt.Velocity = Vector3.new()
  62. end
  63. lastJump = tick()
  64. end
  65. end
  66. end
  67. end)
  68. hum.Jumping:connect(function(isJumping)
  69. if isJumping then
  70. humRtPt.Velocity = Vector3.new(humRtPt.Velocity.X, hum.JumpPower * 1.1, humRtPt.Velocity.Z)
  71. end
  72. end)
  73. local newShadowsEnabled = true
  74. local ignoreList = {
  75. script.Parent
  76. }
  77. function createShadow()
  78. local newSh = Instance.new("Part")
  79. newSh.Size = Vector3.new(4, 0.05, 4)
  80. newSh.Transparency = 1
  81. newSh.CanCollide = false
  82. newSh.Anchored = true
  83. newSh.Material = Enum.Material.Concrete
  84. newSh.Name = "ShadowPt"
  85. local decal = Instance.new("Decal")
  86. decal.Texture = "rbxassetid://1057492965"
  87. decal.Face = "Top"
  88. decal.Name = "ShadowImg"
  89. decal.Transparency = 0.5
  90. decal.Parent = newSh
  91. return newSh
  92. end
  93. if newShadowsEnabled then
  94. shadowL = workspace.CurrentCamera:FindFirstChild("ShadowL")
  95. shadowR = workspace.CurrentCamera:FindFirstChild("ShadowR")
  96. if not shadowL and not shadowR then
  97. shadowL = createShadow()
  98. shadowR = createShadow()
  99. shadowL.Parent = workspace.CurrentCamera
  100. shadowR.Parent = workspace.CurrentCamera
  101. else
  102. shadowL.ShadowImg.Transparency = 0.5
  103. shadowR.ShadowImg.Transparency = 0.5
  104. end
  105. hum.Died:connect(function()
  106. if shadowL and shadowR then
  107. shadowL:Destroy()
  108. shadowR:Destroy()
  109. end
  110. end)
  111. table.insert(ignoreList, shadowL)
  112. table.insert(ignoreList, shadowR)
  113. else
  114. shadow = workspace.CurrentCamera:FindFirstChild("ShadowPt")
  115. if not shadow then
  116. shadow = createShadow()
  117. shadow.Parent = workspace.CurrentCamera
  118. else
  119. shadow.ShadowImg.Transparency = 0.5
  120. end
  121. hum.Died:connect(function()
  122. if shadow then
  123. shadow.ShadowImg.Transparency = 1
  124. end
  125. end)
  126. table.insert(ignoreList, shadow)
  127. end
  128. workspace.ChildAdded:connect(function(item)
  129. if game.Players:FindFirstChild(item.Name) then
  130. table.insert(ignoreList, item)
  131. end
  132. end)
  133. for _, c in pairs(game.Players:GetPlayers()) do
  134. if c.Character then
  135. table.insert(ignoreList, c.Character)
  136. end
  137. end
  138. while game:GetService("RunService").Heartbeat:wait() do
  139. if newShadowsEnabled then
  140. if shadowL and shadowR and shadowL.Parent ~= nil and shadowR.Parent ~= nil then
  141. if isLowPerformance then
  142. shadowL.ShadowImg.Transparency = 1
  143. shadowR.ShadowImg.Transparency = 1
  144. else
  145. shadowL.ShadowImg.Transparency = 0.6
  146. local ray = Ray.new(Leg_L.Position, Vector3.new(0, -300, 0))
  147. local ignore = {
  148. shadowL,
  149. shadowR,
  150. script.Parent
  151. }
  152. local part, pos, normal = workspace:FindPartOnRayWithIgnoreList(ray, ignore)
  153. if pos then
  154. shadowL.CFrame = CFrame.new(pos)
  155. end
  156. shadowR.ShadowImg.Transparency = 0.6
  157. local ray = Ray.new(Leg_R.Position, Vector3.new(0, -300, 0))
  158. local ignore = {
  159. shadowL,
  160. shadowR,
  161. script.Parent
  162. }
  163. local part, pos, normal = workspace:FindPartOnRayWithIgnoreList(ray, ignore)
  164. if pos then
  165. shadowR.CFrame = CFrame.new(pos)
  166. end
  167. end
  168. end
  169. elseif isLowPerformance then
  170. shadow.ShadowImg.Transparency = 1
  171. else
  172. shadow.ShadowImg.Transparency = 0.5
  173. local ray = Ray.new(humRtPt.Position, Vector3.new(0, -300, 0))
  174. local ignore = {
  175. shadow,
  176. script.Parent
  177. }
  178. local part, pos, normal = workspace:FindPartOnRayWithIgnoreList(ray, ignore)
  179. if pos then
  180. shadow.CFrame = CFrame.new(pos)
  181. end
  182. end
  183. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement