Advertisement
Kittdy2

Untitled

Jan 20th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.35 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 = game:GetService("Players").LocalPlayer
  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 Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87.  
  88.  
  89. t = Instance.new("Tool")
  90. t.Parent = owner.Backpack
  91. t.Name = "Devil"
  92.  
  93. local handlee = Instance.new("Part")
  94. handlee.Name = "Handle"
  95. handlee.Parent = t
  96. handlee.Shape = "Ball"
  97. handlee.BrickColor = BrickColor.new("New Yeller")
  98. handlee.Size = Vector3.new(1, 1, 1)
  99. handlee.TopSurface = "Smooth"
  100. handlee.BottomSurface = "Smooth"
  101. handlee.Transparency = 0
  102. handlee.Reflectance = 0
  103. -----------------------------------------mesh
  104. m = Instance.new("BlockMesh")
  105. m.Parent = handlee
  106. m.Scale = Vector3.new(0.5, 1.0, 0.5)
  107. -----------------------------------------Brick2
  108. local brick3 = Instance.new("Part")
  109. brick3.Name = "Part"
  110. brick3.Parent = t
  111. brick3.formFactor = "Plate"
  112. brick3.BrickColor = BrickColor.new("Neon orange")
  113. brick3.Size = Vector3.new(2, 1, 1)
  114. brick3.TopSurface = "Smooth"
  115. brick3.BottomSurface = "Smooth"
  116. brick3.Transparency = 0
  117. brick3.Reflectance = 0
  118. -----------------------------------------mesh
  119. m = Instance.new("CylinderMesh")
  120. m.Parent = brick3
  121. m.Scale = Vector3.new(1.4, 0.3, 1.4)
  122. -----------------------------------------weld
  123. w2 = Instance.new("Weld")
  124. w2.Parent = handlee
  125. w2.Part0 = brick3
  126. w2.Part1 = handlee
  127. w2.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) + Vector3.new(0, -2, 0)
  128. -----------------------------------------Brick2
  129. local brick2 = Instance.new("Part")
  130. brick2.Name = "Part"
  131. brick2.Parent = t
  132. brick2.formFactor = "Plate"
  133. brick2.BrickColor = BrickColor.new("Bright red")
  134. brick2.Size = Vector3.new(1, 1, 1)
  135. brick2.TopSurface = "Smooth"
  136. brick2.BottomSurface = "Smooth"
  137. brick2.Transparency = 0.5
  138. brick2.Reflectance = 0
  139. -----------------------------------------mesh
  140. m = Instance.new("CylinderMesh")
  141. m.Parent = brick2
  142. m.Scale = Vector3.new(5, 10000, 5)
  143. m.Offset = Vector3.new(0, -5000, 0)
  144. -----------------------------------------weld
  145. w2 = Instance.new("Weld")
  146. w2.Parent = handlee
  147. w2.Part0 = brick2
  148. w2.Part1 = handlee
  149. w2.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) + Vector3.new(0, -2, 0)
  150.  
  151. ---------------------Part 2
  152. ---------------------Part 2
  153. ---------------------Part 2
  154.  
  155. r = game:service("RunService")
  156.  
  157.  
  158. local damage = 100000
  159.  
  160.  
  161. local slash_damage = 100000
  162.  
  163.  
  164. sword = brick3
  165. Tool = t
  166.  
  167. function attack()
  168. local anim = Instance.new("StringValue")
  169. anim.Name = "toolanim"
  170. anim.Value = "Slash"
  171. anim.Parent = Tool
  172. end
  173.  
  174.  
  175. function swordUp()
  176. Tool.GripForward = Vector3.new(-1,0,0)
  177. Tool.GripRight = Vector3.new(0,1,0)
  178. Tool.GripUp = Vector3.new(0,0,1)
  179. end
  180.  
  181. function swordOut()
  182. Tool.GripForward = Vector3.new(0,0,1)
  183. Tool.GripRight = Vector3.new(0,-1,0)
  184. Tool.GripUp = Vector3.new(-1,0,0)
  185. end
  186.  
  187.  
  188.  
  189. Tool.Enabled = true
  190.  
  191. function onActivated()
  192.  
  193. if not Tool.Enabled then
  194. return
  195. end
  196.  
  197. Tool.Enabled = false
  198.  
  199. local character = Tool.Parent;
  200. local humanoid = character.Humanoid
  201. if humanoid == nil then
  202. print("Humanoid not found")
  203. return
  204. end
  205.  
  206.  
  207.  
  208. attack()
  209.  
  210. wait()
  211.  
  212. Tool.Enabled = true
  213. end
  214.  
  215.  
  216. function onEquipped()
  217.  
  218. end
  219.  
  220.  
  221. ------part 3
  222. ------part 3
  223. ------part 3
  224. function onTouched(hit)
  225. h = hit.Parent:findFirstChild("Humanoid")
  226. if h ~= nil then
  227. h.Health = 0
  228. end
  229. end
  230.  
  231.  
  232. Tool.Activated:connect(onActivated)
  233. Tool.Equipped:connect(onEquipped)
  234. sword.Touched:connect(onTouched)
  235.  
  236. t = Instance.new("Tool")
  237. t.Parent = game.Players.acb227.Backpack
  238. t.Name = "Claw"
  239.  
  240. local handlee = Instance.new("Part")
  241. handlee.Name = "Handle"
  242. handlee.Parent = t
  243. handlee.BrickColor = BrickColor.new("Really black")
  244. handlee.Size = Vector3.new(1, 1, 2)
  245. handlee.TopSurface = "Smooth"
  246. handlee.BottomSurface = "Smooth"
  247. handlee.Transparency = 0
  248. handlee.Reflectance = 0
  249. -----------------------------------------mesh
  250. m = Instance.new("BlockMesh")
  251. m.Parent = handlee
  252. m.Scale = Vector3.new(0.2, 0.2, 1)
  253. -----------------------------------------Brick2
  254. local brick3 = Instance.new("Part")
  255. brick3.Name = "Part"
  256. brick3.Parent = t
  257. brick3.formFactor = "Plate"
  258. brick3.BrickColor = BrickColor.new("Really black")
  259. brick3.Size = Vector3.new(1, 1, 2)
  260. brick3.TopSurface = "Smooth"
  261. brick3.BottomSurface = "Smooth"
  262. brick3.Transparency = 0
  263. brick3.Reflectance = 0
  264. -----------------------------------------mesh
  265. m = Instance.new("BlockMesh")
  266. m.Parent = brick3
  267. m.Scale = Vector3.new(0.2, 0.2, 1)
  268. -----------------------------------------weld
  269. w2 = Instance.new("Weld")
  270. w2.Parent = handlee
  271. w2.Part0 = brick3
  272. w2.Part1 = handlee
  273. w2.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) + Vector3.new(-0.3, 0, 0)
  274. -----------------------------------------Brick2
  275. local brick4 = Instance.new("Part")
  276. brick4.Name = "Part"
  277. brick4.Parent = t
  278. brick4.formFactor = "Plate"
  279. brick4.BrickColor = BrickColor.new("Really black")
  280. brick4.Size = Vector3.new(1, 1, 2)
  281. brick4.TopSurface = "Smooth"
  282. brick4.BottomSurface = "Smooth"
  283. brick4.Transparency = 0
  284. brick4.Reflectance = 0
  285. -----------------------------------------mesh
  286. m = Instance.new("BlockMesh")
  287. m.Parent = brick4
  288. m.Scale = Vector3.new(0.2, 0.2, 1)
  289. -----------------------------------------weld
  290. w2 = Instance.new("Weld")
  291. w2.Parent = handlee
  292. w2.Part0 = brick4
  293. w2.Part1 = handlee
  294. w2.C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0) + Vector3.new(0.3, 0, 0)
  295.  
  296. ---------------------Part 2
  297. ---------------------Part 2
  298. ---------------------Part 2
  299.  
  300. r = game:service("RunService")
  301.  
  302.  
  303. local damage = 100000
  304.  
  305.  
  306. local slash_damage = 100000
  307.  
  308.  
  309. sword = brick4
  310. Tool = t
  311.  
  312. function attack()
  313. local anim = Instance.new("StringValue")
  314. anim.Name = "toolanim"
  315. anim.Value = "Slash"
  316. anim.Parent = Tool
  317. end
  318.  
  319.  
  320. function swordUp()
  321. Tool.GripForward = Vector3.new(-1,0,0)
  322. Tool.GripRight = Vector3.new(0,1,0)
  323. Tool.GripUp = Vector3.new(0,0,1)
  324. end
  325.  
  326. function swordOut()
  327. Tool.GripForward = Vector3.new(0,0,1)
  328. Tool.GripRight = Vector3.new(0,-1,0)
  329. Tool.GripUp = Vector3.new(-1,0,0)
  330. end
  331.  
  332.  
  333.  
  334. Tool.Enabled = true
  335.  
  336. function onActivated()
  337.  
  338. if not Tool.Enabled then
  339. return
  340. end
  341.  
  342. Tool.Enabled = false
  343.  
  344. local character = Tool.Parent;
  345. local humanoid = character.Humanoid
  346. if humanoid == nil then
  347. print("Humanoid not found")
  348. return
  349. end
  350.  
  351.  
  352.  
  353. attack()
  354.  
  355. wait()
  356.  
  357. Tool.Enabled = true
  358. end
  359.  
  360.  
  361. function onEquipped()
  362.  
  363. end
  364.  
  365.  
  366. ------part 3
  367. ------part 3
  368. ------part 3
  369. function onTouched(hit)
  370. h = hit.Parent:findFirstChild("Humanoid")
  371. if h ~= nil then
  372. h:TakeDamage(25)
  373. end
  374. end
  375.  
  376.  
  377. Tool.Activated:connect(onActivated)
  378. Tool.Equipped:connect(onEquipped)
  379. sword.Touched:connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement