Advertisement
Guest User

TEST

a guest
Oct 22nd, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.89 KB | None | 0 0
  1. wait(1 / 60)
  2. Effects = { }
  3. local Player = game.Players.ErayBeyC
  4. local Character = Player.Character
  5. local Humanoid = Character.Humanoid
  6. local LeftArm = Character["Left Arm"]
  7. local RightArm = Character["Right Arm"]
  8. local LeftLeg = Character["Left Leg"]
  9. local RightLeg = Character["Right Leg"]
  10. local Head = Character.Head
  11. local Torso = Character.Torso
  12. local cam = game.Workspace.CurrentCamera
  13. local RootPart = Character.HumanoidRootPart
  14. local RootJoint = RootPart.RootJoint
  15. local equipped = false
  16. local attack = false
  17. local Anim = 'Idle'
  18. local idle = 0
  19. local attacktype = 1
  20. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  21. local velocity = RootPart.Velocity.y
  22. local sine = 0
  23. local change = 1
  24. local grabbed = false
  25. local cn = CFrame.new
  26. local mr = math.rad
  27. local angles = CFrame.Angles
  28. local ud = UDim2.new
  29. local c3 = Color3.new
  30. local autofind = false
  31. game.Players.LocalPlayer.Character.Sound:Destroy()
  32. local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  33. Humanoid.Animator:Destroy()
  34. Character.Animate:Destroy()
  35. EFS = Instance.new("Sound")
  36. EFS.Parent = Torso
  37. EFS.SoundId = "rbxassetid://"
  38. EFS.Volume = 4
  39. EFS.Looped = false
  40. EFS:Play()
  41. EFS2 = Instance.new("Sound")
  42. EFS2.Parent = Torso
  43. EFS2.SoundId = "rbxassetid://177339878"
  44. EFS2.Volume = 0.2
  45. EFS2.Looped = true
  46. EFS2:Play()
  47. EFS3 = Instance.new("Sound")
  48. EFS3.Parent = Torso
  49. EFS3.SoundId = "rbxassetid://585364476"
  50. EFS3.Volume = 0.8
  51. EFS3.Looped = false
  52.  
  53. local naeeym2 = IN("BillboardGui",Char)
  54. naeeym2.AlwaysOnTop = true
  55. naeeym2.Size = UDim2.new(5,35,2,15)
  56. naeeym2.StudsOffset = V3.N(0,2.5,0)
  57. naeeym2.Adornee = Char.Head
  58. naeeym2.Name = "Name"
  59. naeeym2.PlayerToHideFrom = Nobody
  60. local tecks2 = IN("TextLabel",naeeym2)
  61. tecks2.BackgroundTransparency = 1
  62. tecks2.TextScaled = true
  63. tecks2.BorderSizePixel = 0
  64. tecks2.Text = "By ErayBeyC"
  65. tecks2.Font = Enum.Font.Bodoni
  66. tecks2.TextSize = 30
  67. tecks2.TextStrokeTransparency = 0
  68. tecks2.TextColor3 = C3.N(0,0,0)
  69. tecks2.TextStrokeColor3 = C3.N(.7,0,0)
  70. tecks2.Size = UDim2.new(1,0,0.5,0)
  71. tecks2.Parent = naeeym2
  72.  
  73. local naeeym2 = IN("BillboardGui",Char)
  74. naeeym2.AlwaysOnTop = true
  75. naeeym2.Size = UDim2.new(5,35,2,15)
  76. naeeym2.StudsOffset = V3.N(0,3.5,0)
  77. naeeym2.Adornee = Char.Head
  78. naeeym2.Name = "Name"
  79. naeeym2.PlayerToHideFrom = Nobody
  80. local tecks2 = IN("TextLabel",naeeym2)
  81. tecks2.BackgroundTransparency = 1
  82. tecks2.TextScaled = true
  83. tecks2.BorderSizePixel = 0
  84. tecks2.Text = "SCP-106"
  85. tecks2.Font = Enum.Font.Bodoni
  86. tecks2.TextSize = 30
  87. tecks2.TextStrokeTransparency = 0
  88. tecks2.TextColor3 = C3.N(0,0,0)
  89. tecks2.TextStrokeColor3 = C3.N(.7,0,0)
  90. tecks2.Size = UDim2.new(1,0,0.5,0)
  91. tecks2.Parent = naeeym2
  92.  
  93.  
  94.  
  95. ATS = Instance.new("Sound")
  96. ATS.Parent = Torso
  97. ATS.SoundId = "rbxassetid://347611423"
  98. ATS.Volume = 2
  99. ATS.Looped = false
  100.  
  101.  
  102. ff = Instance.new("ForceField", game.Players.LocalPlayer.Character)
  103. ff.Visible = false
  104.  
  105.  
  106. Character.Humanoid.WalkSpeed = 3
  107.  
  108.  
  109.  
  110. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  111. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  112. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  113.  
  114. RSH, LSH = nil, nil
  115.  
  116. RW = Instance.new("Weld")
  117. LW = Instance.new("Weld")
  118.  
  119. RH = Torso["Right Hip"]
  120. LH = Torso["Left Hip"]
  121.  
  122. RSH = Torso["Right Shoulder"]
  123. LSH = Torso["Left Shoulder"]
  124.  
  125. RSH.Parent = nil
  126. LSH.Parent = nil
  127.  
  128. RW.Name = "RW"
  129. RW.Part0 = Torso
  130. RW.C0 = cn(1.5, 0.5, 0)
  131. RW.C1 = cn(0, 0.5, 0)
  132. RW.Part1 = RightArm
  133. RW.Parent = Torso
  134.  
  135. LW.Name = "LW"
  136. LW.Part0 = Torso
  137. LW.C0 = cn(-1.5, 0.5, 0)
  138. LW.C1 = cn(0, 0.5, 0)
  139. LW.Part1 = LeftArm
  140. LW.Parent = Torso
  141.  
  142. function clerp(a, b, t)
  143. local qa = {
  144. QuaternionFromCFrame(a)
  145. }
  146. local qb = {
  147. QuaternionFromCFrame(b)
  148. }
  149. local ax, ay, az = a.x, a.y, a.z
  150. local bx, by, bz = b.x, b.y, b.z
  151. local _t = 1 - t
  152. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  153. end
  154.  
  155. function QuaternionFromCFrame(cf)
  156. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  157. local trace = m00 + m11 + m22
  158. if trace > 0 then
  159. local s = math.sqrt(1 + trace)
  160. local recip = 0.5 / s
  161. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  162. else
  163. local i = 0
  164. if m11 > m00 then
  165. i = 1
  166. end
  167. if m22 > (i == 0 and m00 or m11) then
  168. i = 2
  169. end
  170. if i == 0 then
  171. local s = math.sqrt(m00 - m11 - m22 + 1)
  172. local recip = 0.5 / s
  173. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  174. elseif i == 1 then
  175. local s = math.sqrt(m11 - m22 - m00 + 1)
  176. local recip = 0.5 / s
  177. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  178. elseif i == 2 then
  179. local s = math.sqrt(m22 - m00 - m11 + 1)
  180. local recip = 0.5 / s
  181. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  182. end
  183. end
  184. end
  185.  
  186. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  187. local xs, ys, zs = x + x, y + y, z + z
  188. local wx, wy, wz = w * xs, w * ys, w * zs
  189. local xx = x * xs
  190. local xy = x * ys
  191. local xz = x * zs
  192. local yy = y * ys
  193. local yz = y * zs
  194. local zz = z * zs
  195. 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))
  196. end
  197.  
  198. function QuaternionSlerp(a, b, t)
  199. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  200. local startInterp, finishInterp;
  201. if cosTheta >= 0.0001 then
  202. if (1 - cosTheta) > 0.0001 then
  203. local theta = math.acos(cosTheta)
  204. local invSinTheta = 1 / math.sin(theta)
  205. startInterp = math.sin((1 - t) * theta) * invSinTheta
  206. finishInterp = math.sin(t * theta) * invSinTheta
  207. else
  208. startInterp = 1 - t
  209. finishInterp = t
  210. end
  211. else
  212. if (1 + cosTheta) > 0.0001 then
  213. local theta = math.acos(-cosTheta)
  214. local invSinTheta = 1 / math.sin(theta)
  215. startInterp = math.sin((t - 1) * theta) * invSinTheta
  216. finishInterp = math.sin(t * theta) * invSinTheta
  217. else
  218. startInterp = t - 1
  219. finishInterp = t
  220. end
  221. end
  222. 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
  223. end
  224.  
  225. function swait(num)
  226. if num == 0 or num == nil then
  227. game:service'RunService'.RenderStepped:wait(0)
  228. else
  229. for i = 0, num do
  230. game:service'RunService'.RenderStepped:wait(0)
  231. end
  232. end
  233. end
  234.  
  235. local RbxUtility = LoadLibrary("RbxUtility")
  236. local Create = RbxUtility.Create
  237.  
  238. function RemoveOutlines(part)
  239. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  240. end
  241.  
  242. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  243. local Part = Create("Part"){
  244. formFactor = FormFactor,
  245. Parent = Parent,
  246. Reflectance = Reflectance,
  247. Transparency = Transparency,
  248. CanCollide = false,
  249. Locked = true,
  250. BrickColor = BrickColor.new(tostring(BColor)),
  251. Name = Name,
  252. Size = Size,
  253. Material = Material,
  254. }
  255. RemoveOutlines(Part)
  256. return Part
  257. end
  258.  
  259. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  260. local Msh = Create(Mesh){
  261. Parent = Part,
  262. Offset = OffSet,
  263. Scale = Scale,
  264. }
  265. if Mesh == "SpecialMesh" then
  266. Msh.MeshType = MeshType
  267. Msh.MeshId = MeshId
  268. end
  269. return Msh
  270. end
  271.  
  272. function CreateWeld(Parent, Part0, Part1, C0, C1)
  273. local Weld = Create("Weld"){
  274. Parent = Parent,
  275. Part0 = Part0,
  276. Part1 = Part1,
  277. C0 = C0,
  278. C1 = C1,
  279. }
  280. return Weld
  281. end
  282.  
  283. function rayCast(Position, Direction, Range, Ignore)
  284. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  285. end
  286.  
  287. function CreateSound(id, par, vol, pit)
  288. coroutine.resume(coroutine.create(function()
  289. local sou = Instance.new("Sound", par or workspace)
  290. sou.Volume = vol
  291. sou.Pitch = pit or 1
  292. sou.SoundId = id
  293. wait()
  294. sou:play()
  295. game:GetService("Debris"):AddItem(sou, 6)
  296. end))
  297. end
  298.  
  299. local function getclosest(obj, distance)
  300. local last, lastx = distance + 1
  301. for i, v in pairs(workspace:GetChildren()) do
  302. if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
  303. local t = v.Torso
  304. local dist = (t.Position - obj.Position).magnitude
  305. if dist 2 then
  306. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-50 * math.cos(sine / 4)), math.rad(0), math.rad(4 * math.cos(sine / 4))), .2)
  307. RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  308. LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  309. elseif Torsovelocity < 1 then
  310. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1)
  311. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  312. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  313. end
  314. end
  315. attack = false
  316.  
  317.  
  318.  
  319. game:GetService'RunService'.Stepped:connect(function()
  320. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  321. velocity = RootPart.Velocity.y
  322. sine = sine + change
  323. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  324. if equipped == true or equipped == false then
  325. if RootPart.Velocity.y > 1 and hit == nil then
  326. Anim = "Jump"
  327. if attack == false then
  328. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  329. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  330. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(30)), .1)
  331. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(-30)), .1)
  332. RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
  333. LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
  334. end
  335. elseif RootPart.Velocity.y < -1 and hit == nil then
  336. Anim = "Fall"
  337. if attack == false then
  338. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  339. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  340. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), .1)
  341. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), .1)
  342. RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  343. LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  344. end
  345. elseif Torsovelocity < 1 and hit ~= nil then
  346. Anim = "Idle"
  347. if attack == false then
  348. change = .3
  349. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.05 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .05)
  350. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(25 - 1 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .05)
  351. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(5 + 3 * math.cos(sine / 25))), 0.05)
  352. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5 - 3 * math.cos(sine / 25))), 0.05)
  353. RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.05 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-2), math.rad(0 + 0 * math.cos(sine / 25))), .05)
  354. LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.05 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-2), math.rad(0 + 0 * math.cos(sine / 25))), .05)
  355. end
  356. elseif Torsovelocity > 2 and hit ~= nil then
  357. Anim = "Walk"
  358. if attack == false then
  359. change = 0.3
  360. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, -0.175 + 0.025 * math.cos(sine / 3.5) + -math.sin(sine / 3.5) / 7) * angles(math.rad(5 - 2.5 * math.cos(sine / 3.5)), math.rad(0), math.rad(10 * math.cos(sine / 7))), 0.15)
  361. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * CFrame.new(0, 0, 0 + 0.025 * math.cos(sine / 3.5)) * angles(math.rad(0 - 4.5 * math.cos(sine / 3.5)), math.rad(5 - 6.5 * math.cos(sine / 3.5)), math.rad(-10 * math.cos(sine / 7))), 0.15)
  362. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(15 * math.cos(sine / 7)) + math.sin(sine / 7) / 2.5, math.rad(0), math.rad(10)), 0.05)
  363. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-15 * math.cos(sine / 7)) + -math.sin(sine / 7) / 2.5, math.rad(0), math.rad(-10)), 0.05)
  364. RH.C0 = clerp(RH.C0, CFrame.new(1, -0.925 - 0.5 * math.cos(sine / 7) / 2, 0.5 * math.cos(sine / 7) / 2) * angles(math.rad(-15 - 15 * math.cos(sine / 7)) + -math.sin(sine / 7) / 2.5, math.rad(90 - 10 * math.cos(sine / 7)), math.rad(0)) * angles(math.rad(0 + 2.5 * math.cos(sine / 7)), math.rad(0), math.rad(0)), 0.15)
  365. LH.C0 = clerp(LH.C0, CFrame.new(-1, -0.925 + 0.5 * math.cos(sine / 7) / 2, -0.5 * math.cos(sine / 7) / 2) * angles(math.rad(-15 + 15 * math.cos(sine / 7)) + math.sin(sine / 7) / 2.5, math.rad(-90 - 10 * math.cos(sine / 7)), math.rad(0)) * angles(math.rad(0 - 2.5 * math.cos(sine / 7)), math.rad(0), math.rad(0)), 0.15)
  366. end
  367. end
  368. end
  369. if #Effects > 0 then
  370. for e = 1, #Effects do
  371. if Effects[e] ~= nil then
  372. local Thing = Effects[e]
  373. if Thing ~= nil then
  374. local Part = Thing[1]
  375. local Mode = Thing[2]
  376. local Delay = Thing[3]
  377. local IncX = Thing[4]
  378. local IncY = Thing[5]
  379. local IncZ = Thing[6]
  380. if Thing[1].Transparency
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement