Advertisement
5325325325

Untitled

Nov 2nd, 2018
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.28 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = owner
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local h,t
  75. --Give the server mouse data 30 times every second, but only if the values changed
  76. --If player is not moving their mouse, client won't fire events
  77. while wait(1/30) do
  78. if h~=Mouse.Hit or t~=Mouse.Target then
  79. h,t=Mouse.Hit,Mouse.Target
  80. Event:FireServer({isMouse=true,Target=t,Hit=h})
  81. end
  82. end]==],Player.Character)
  83. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  84. end
  85.  
  86. wait()
  87. -- by Theamazingnater
  88. plr = owner
  89. chara = plr.Character
  90. Create = Instance.new
  91. Huge = math.huge
  92.  
  93. local music = Create("Sound",chara.HumanoidRootPart)
  94. music.SoundId = "rbxassetid://1043259261"
  95. music.Volume = 1
  96. music.Looped = true
  97. music:Play()
  98. local shadowhead = Create("Part",chara.Head)
  99. shadowhead.BrickColor = BrickColor.new("Really black")
  100. shadowhead.Size = Vector3.new(1.2, 0.6, 1)
  101. shadowhead.CanCollide = false
  102. local shadowheadmesh = Create("SpecialMesh",shadowhead)
  103. shadowheadmesh.MeshType = "Head"
  104. shadowheadmesh.Scale = Vector3.new(1.26, 1.5, 1.26)
  105. local weld2 = Create("Weld",shadowhead)
  106. weld2.Part0 = shadowhead
  107. weld2.Part1 = chara.Head
  108. weld2.C1 = CFrame.new(0, 0.200000048, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  109.  
  110.  
  111. -- Chat
  112.  
  113. function swait(num)
  114. if num==0 or num==nil then
  115. game:service'RunService'.Stepped:wait(0)
  116. else
  117. for i=0,num do
  118. game:service'RunService'.Stepped:wait(0)
  119. end
  120. end
  121. end
  122.  
  123. function chatfunc(text)
  124. local chat = coroutine.wrap(function()
  125. if chara:FindFirstChild("TalkingBillBoard")~= nil then
  126. chara:FindFirstChild("TalkingBillBoard"):destroy()
  127. end
  128. local naeeym2 = Instance.new("BillboardGui",chara)
  129. naeeym2.Size = UDim2.new(0,100,0,40)
  130. naeeym2.StudsOffset = Vector3.new(0,3,0)
  131. naeeym2.Adornee = chara.Head
  132. naeeym2.Name = "TalkingBillBoard"
  133. local tecks2 = Instance.new("TextLabel",naeeym2)
  134. tecks2.BackgroundTransparency = 1
  135. tecks2.BorderSizePixel = 0
  136. tecks2.Text = ""
  137. tecks2.Font = "Fantasy"
  138. tecks2.TextSize = 30
  139. tecks2.TextStrokeTransparency = 0
  140. tecks2.TextColor3 = Color3.new(.6,0,0)
  141. tecks2.TextStrokeColor3 = Color3.new(0,0,0)
  142. tecks2.Size = UDim2.new(1,0,0.5,0)
  143. local tecks3 = Instance.new("TextLabel",naeeym2)
  144. tecks3.BackgroundTransparency = 1
  145. tecks3.BorderSizePixel = 0
  146. tecks3.Text = ""
  147. tecks3.Font = "Fantasy"
  148. tecks3.TextSize = 30
  149. tecks3.TextStrokeTransparency = 0
  150. tecks3.TextColor3 = Color3.new(0,0,0)
  151. tecks3.TextStrokeColor3 = Color3.new(1,1,1)
  152. tecks3.Size = UDim2.new(1,0,0.5,0)
  153. for i = 1,string.len(text),1 do
  154. tecks2.Text = string.sub(text,1,i)
  155. tecks3.Text = string.sub(text,1,i)
  156. wait(0.01)
  157. end
  158. wait(2)
  159. for i = 1, 50 do
  160. swait()
  161. tecks2.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5))
  162. tecks2.Rotation = tecks2.Rotation - .8
  163. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
  164. tecks2.TextTransparency = tecks2.TextTransparency + .04
  165. tecks3.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5))
  166. tecks3.Rotation = tecks2.Rotation + .8
  167. tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
  168. tecks3.TextTransparency = tecks2.TextTransparency + .04
  169. end
  170. naeeym2:Destroy()
  171. end)
  172. chat()
  173. end
  174. function onChatted(msg)
  175. chatfunc(msg)
  176. end
  177. plr.Chatted:connect(onChatted)
  178. chatfunc("Come to me... =)")
  179. local sound = Create("Sound",chara.Torso)
  180. sound.SoundId = "rbxassetid://357417055"
  181. sound.Volume = 4
  182. local hit = Create("Sound",chara.Torso)
  183. hit.SoundId = "rbxassetid://623904185"
  184. hit.Volume = 4
  185. CV="Really red"
  186.  
  187. local txt = Instance.new("BillboardGui", chara)
  188. txt.Adornee = chara.Head
  189. txt.Name = "_status"
  190. txt.Size = UDim2.new(2, 0, 1.2, 0)
  191. txt.StudsOffset = Vector3.new(-9, 11, 0)
  192. local text = Instance.new("TextLabel", txt)
  193. text.Size = UDim2.new(10, 0, 7, 0)
  194. text.FontSize = "Size24"
  195. text.TextScaled = true
  196. text.TextTransparency = 0
  197. text.BackgroundTransparency = 1
  198. text.TextTransparency = 0
  199. text.TextStrokeTransparency = 0
  200. text.Font = "Arcade"
  201. text.TextStrokeColor3 = Color3.new(255,0,0)
  202.  
  203. v=Instance.new("Part")
  204. v.Name = "ColorBrick"
  205. v.Parent=chara
  206. v.FormFactor="Symmetric"
  207. v.Anchored=true
  208. v.CanCollide=false
  209. v.BottomSurface="Smooth"
  210. v.TopSurface="Smooth"
  211. v.Size=Vector3.new(10,5,3)
  212. v.Transparency=1
  213. v.CFrame=chara.Torso.CFrame
  214. v.BrickColor=BrickColor.new(CV)
  215. v.Transparency=1
  216. text.TextColor3 = Color3.new(0,0,0)
  217. v.Shape="Block"
  218. text.Text = plr.Name .. " Level: ???"
  219. v:Destroy()
  220. local knife = Create("Part",chara["Right Arm"])
  221. knife.Name = "knifu"
  222. knife.CanCollide = false
  223. local knifemesh = Create("FileMesh",knife)
  224. knifemesh.MeshId = "http://www.roblox.com/asset/?id=121944778"
  225. knifemesh.TextureId = "http://www.roblox.com/asset/?id=121944805"
  226. local knifeweld = Create("Weld",knife)
  227. knifeweld.Part0 = knife
  228. knifeweld.Part1 = chara["Right Arm"]
  229. knifeweld.C0 = CFrame.new(0, -0.800003052, 0.999999046, 1, 0, 0, 0, 0, -1, 0, 0.999999523, 0)
  230. local hitbox = Create("Part",knife)
  231. hitbox.Size = Vector3.new(0.2, 1.89, 0.57)
  232. hitbox.Transparency = 1
  233. hitbox.CanCollide = false
  234. hitbox.Name = "TrailPart"
  235. local hitboxwe = Create("Weld",hitbox)
  236. hitboxwe.Part0 = hitbox
  237. hitboxwe.Part1 = knife
  238. hitboxwe.C0 = CFrame.new(0.00499999523, -0.529999495, -0.0149999857, 1, 0, 0, 0, 1, 0, 0, 0, 0.99999809)
  239. local TrailAtt = Create("Attachment",hitbox)
  240. TrailAtt.Position = Vector3.new(0.02, 0.79, -0.285)
  241. local TrailAtt2 = Create("Attachment",hitbox)
  242. TrailAtt2.Position = Vector3.new(0.01, -0.54, -0.285)
  243. local trail = Create("Trail",hitbox)
  244. trail.Enabled = false
  245. trail.Color = ColorSequence.new(Color3.new(.6,0,0))
  246. trail.Attachment0 = TrailAtt
  247. trail.Attachment1 = TrailAtt2
  248. trail.Lifetime = 0.1
  249. local sound = Create("Sound",chara.Torso)
  250. sound.SoundId = "rbxassetid://357417055"
  251. sound.Volume = 4
  252. local hit = Create("Sound",chara.Torso)
  253. hit.SoundId = "rbxassetid://623904185"
  254. hit.Volume = 4
  255. -- Animations
  256. anim = Create("Animation",chara)
  257. anim.AnimationId = "rbxassetid://186934658"
  258. anim.Name = "Slash"
  259. ranim = chara.Humanoid:LoadAnimation(anim)
  260.  
  261.  
  262. function Slash()
  263. sound:Play()
  264. ranim:Play()
  265. local hitbox = Create("Part",knife)
  266. hitbox.Name = "HurtBox"
  267. hitbox.Transparency = 1
  268. hitbox.CanCollide = false
  269. hitbox.Size = Vector3.new(0.4, 1.02, 0.53)
  270. local weld = Create("Weld",hitbox)
  271. weld.Part0 = hitbox
  272. weld.Part1 = knife
  273. weld.C0 = CFrame.new(0, -0.970016479, 0.0149999857, 1, 0, 0, 0, 1, 0, 0, 0, 0.999997616)
  274. trail.Enabled = true
  275. function Hit(brick)
  276. local human = brick.Parent:FindFirstChildOfClass("Humanoid")
  277. if human then
  278. for i,v in pairs(human.Parent:GetChildren()) do
  279. if v.ClassName == "ShirtGraphic" then
  280. v:Destroy()
  281. end
  282. end
  283. hit:Play()
  284. human:Destroy()
  285. end
  286. end
  287. hitbox.Touched:connect(Hit)
  288. wait(0.6)
  289. trail.Enabled = false
  290. hitbox:Destroy()
  291. end
  292. mouse.Button1Down:connect(Slash)
  293.  
  294. function Sprint(key)
  295. if key == "e" then
  296. chara.Humanoid.WalkSpeed = 40
  297. chara["Right Leg"].Transparency = 0.1
  298. chara["Right Arm"].Transparency = 0.1
  299. chara["Left Leg"].Transparency = 0.1
  300. chara["Left Arm"].Transparency = 0.1
  301. chara.Head.Transparency = 0.1
  302. chara.Torso.Transparency = 0.1
  303. wait(0.01)
  304. chara["Right Leg"].Transparency = 0.2
  305. chara["Right Arm"].Transparency = 0.2
  306. chara["Left Leg"].Transparency = 0.2
  307. chara["Left Arm"].Transparency = 0.2
  308. chara.Head.Transparency = 0.2
  309. chara.Torso.Transparency = 0.2
  310. wait(0.01)
  311. chara["Right Leg"].Transparency = 0.3
  312. chara["Right Arm"].Transparency = 0.3
  313. chara["Left Leg"].Transparency = 0.3
  314. chara["Left Arm"].Transparency = 0.3
  315. chara.Head.Transparency = 0.3
  316. chara.Torso.Transparency = 0.3
  317. wait(0.01)
  318. chara["Right Leg"].Transparency = 0.4
  319. chara["Right Arm"].Transparency = 0.4
  320. chara["Left Leg"].Transparency = 0.4
  321. chara["Left Arm"].Transparency = 0.4
  322. chara.Head.Transparency = 0.4
  323. chara.Torso.Transparency = 0.4
  324. wait(0.01)
  325. chara["Right Leg"].Transparency = 0.5
  326. chara["Right Arm"].Transparency = 0.5
  327. chara["Left Leg"].Transparency = 0.5
  328. chara["Left Arm"].Transparency = 0.5
  329. chara.Head.Transparency = 0.5
  330. chara.Torso.Transparency = 0.5
  331. wait(0.01)
  332. chara["Right Leg"].Transparency = 0.6
  333. chara["Right Arm"].Transparency = 0.6
  334. chara["Left Leg"].Transparency = 0.6
  335. chara["Left Arm"].Transparency = 0.6
  336. chara.Head.Transparency = 0.6
  337. chara.Torso.Transparency = 0.6
  338. wait(0.01)
  339. chara["Right Leg"].Transparency = 0.7
  340. chara["Right Arm"].Transparency = 0.7
  341. chara["Left Leg"].Transparency = 0.7
  342. chara["Left Arm"].Transparency = 0.7
  343. chara.Head.Transparency = 0.7
  344. chara.Torso.Transparency = 0.7
  345. wait(0.01)
  346. chara["Right Leg"].Transparency = 0.8
  347. chara["Right Arm"].Transparency = 0.8
  348. chara["Left Leg"].Transparency = 0.8
  349. chara["Left Arm"].Transparency = 0.8
  350. chara.Head.Transparency = 0.8
  351. chara.Torso.Transparency = 0.8
  352. wait(0.01)
  353. chara["Right Leg"].Transparency = 0.9
  354. chara["Right Arm"].Transparency = 0.9
  355. chara["Left Leg"].Transparency = 0.9
  356. chara["Left Arm"].Transparency = 0.9
  357. chara.Head.Transparency = 0.9
  358. chara.Torso.Transparency = 0.9
  359. wait(0.01)
  360. chara["Right Leg"].Transparency = 1
  361. chara["Right Arm"].Transparency = 1
  362. chara["Left Leg"].Transparency = 1
  363. chara["Left Arm"].Transparency = 1
  364. chara.Head.Transparency = 1
  365. chara.Torso.Transparency = 1
  366. end
  367. end
  368.  
  369.  
  370. function StopSprinting(key)
  371. if key == "r" then
  372. chara.Humanoid.WalkSpeed = 16
  373. chara["Right Leg"].Transparency = 1
  374. chara["Right Arm"].Transparency = 1
  375. chara["Left Leg"].Transparency = 1
  376. chara["Left Arm"].Transparency = 1
  377. chara.Head.Transparency = 1
  378. chara.Torso.Transparency = 1
  379. wait(0.01)
  380. chara["Right Leg"].Transparency = 0.9
  381. chara["Right Arm"].Transparency = 0.9
  382. chara["Left Leg"].Transparency = 0.9
  383. chara["Left Arm"].Transparency = 0.9
  384. chara.Head.Transparency = 0.9
  385. chara.Torso.Transparency = 0.9
  386. wait(0.01)
  387. chara["Right Leg"].Transparency = 0.8
  388. chara["Right Arm"].Transparency = 0.8
  389. chara["Left Leg"].Transparency = 0.8
  390. chara["Left Arm"].Transparency = 0.8
  391. chara.Head.Transparency = 0.8
  392. chara.Torso.Transparency = 0.8
  393. wait(0.01)
  394. chara["Right Leg"].Transparency = 0.7
  395. chara["Right Arm"].Transparency = 0.7
  396. chara["Left Leg"].Transparency = 0.7
  397. chara["Left Arm"].Transparency = 0.7
  398. chara.Head.Transparency = 0.7
  399. chara.Torso.Transparency = 0.7
  400. wait(0.01)
  401. chara["Right Leg"].Transparency = 0.6
  402. chara["Right Arm"].Transparency = 0.6
  403. chara["Left Leg"].Transparency = 0.6
  404. chara["Left Arm"].Transparency = 0.6
  405. chara.Head.Transparency = 0.6
  406. chara.Torso.Transparency = 0.6
  407. wait(0.01)
  408. chara["Right Leg"].Transparency = 0.5
  409. chara["Right Arm"].Transparency = 0.5
  410. chara["Left Leg"].Transparency = 0.5
  411. chara["Left Arm"].Transparency = 0.5
  412. chara.Head.Transparency = 0.5
  413. chara.Torso.Transparency = 0.5
  414. wait(0.01)
  415. chara["Right Leg"].Transparency = 0.4
  416. chara["Right Arm"].Transparency = 0.4
  417. chara["Left Leg"].Transparency = 0.4
  418. chara["Left Arm"].Transparency = 0.4
  419. chara.Head.Transparency = 0.4
  420. chara.Torso.Transparency = 0.4
  421. wait(0.01)
  422. chara["Right Leg"].Transparency = 0.3
  423. chara["Right Arm"].Transparency = 0.3
  424. chara["Left Leg"].Transparency = 0.3
  425. chara["Left Arm"].Transparency = 0.3
  426. chara.Head.Transparency = 0.3
  427. chara.Torso.Transparency = 0.3
  428. wait(0.01)
  429. chara["Right Leg"].Transparency = 0.2
  430. chara["Right Arm"].Transparency = 0.2
  431. chara["Left Leg"].Transparency = 0.2
  432. chara["Left Arm"].Transparency = 0.2
  433. chara.Head.Transparency = 0.2
  434. chara.Torso.Transparency = 0.2
  435. wait(0.01)
  436. chara["Right Leg"].Transparency = 0.1
  437. chara["Right Arm"].Transparency = 0.1
  438. chara["Left Leg"].Transparency = 0.1
  439. chara["Left Arm"].Transparency = 0.1
  440. chara.Head.Transparency = 0.1
  441. chara.Torso.Transparency = 0.1
  442. wait(0.01)
  443. chara["Right Leg"].Transparency = 0
  444. chara["Right Arm"].Transparency = 0
  445. chara["Left Leg"].Transparency = 0
  446. chara["Left Arm"].Transparency = 0
  447. chara.Head.Transparency = 0
  448. chara.Torso.Transparency = 0
  449. end
  450. end
  451.  
  452. mouse.KeyDown:connect(Sprint)
  453. mouse.KeyDown:connect(StopSprinting)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement