Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. Plrs = game:GetService("Players")
  88.  
  89. Name = "orange5096"
  90. me = Plrs[Name]
  91. char = me.Character
  92. Modelname = "PokeSoul"
  93. Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"}
  94. necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  95.  
  96. Add = {
  97. Sphere = function(P)
  98. local m = Instance.new("SpecialMesh",P)
  99. m.MeshType = "Sphere"
  100. return m
  101. end,
  102. BF = function(P)
  103. local bf = Instance.new("BodyForce",P)
  104. bf.force = Vector3.new(0, P:GetMass()*187, 0)
  105. return bf
  106. end,
  107. BP = function(P)
  108. local bp = Instance.new("BodyPosition",P)
  109. bp.maxForce = Vector3.new(math.huge, 0, math.huge)
  110. bp.P = 14000
  111. return bp
  112. end,
  113. BG = function(P)
  114. local bg = Instance.new("BodyGyro",P)
  115. bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  116. bg.P = 14000
  117. return bg
  118. end
  119. }
  120.  
  121. function Part(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break)
  122. local p = Instance.new("Part")
  123. p.formFactor = "Custom"
  124. p.Anchored = Anchor
  125. p.CanCollide = Collide
  126. p.Transparency = Tran
  127. p.Reflectance = Ref
  128. p.BrickColor = BrickColor.new(Color)
  129. for _, Surf in pairs(Surfaces) do
  130. p[Surf] = "Smooth"
  131. end
  132. p.Size = Vector3.new(X, Y, Z)
  133. if Break then
  134. p:BreakJoints()
  135. else p:MakeJoints() end
  136. p.Parent = Parent
  137. return p
  138. end
  139.  
  140. function Weld(p0, p1, x, y, z, a, b, c)
  141. local w = Instance.new("Weld")
  142. w.Parent = p0
  143. w.Part0 = p0
  144. w.Part1 = p1
  145. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(a,b,c)
  146. return w
  147. end
  148.  
  149. function ComputePos(pos1, pos2)
  150. local pos3 = Vector3.new(pos2.x, pos1.y, pos2.z)
  151. return CFrame.new(pos1, pos3)
  152. end
  153.  
  154. for i,v in pairs(char:children()) do
  155. if v.Name == Modelname then
  156. v:remove()
  157. end
  158. end
  159.  
  160. torso = char.Torso
  161. neck = torso.Neck
  162. hum = char.Humanoid
  163. Rarm = char["Right Arm"]
  164. Larm = char["Left Arm"]
  165. Rleg = char["Right Leg"]
  166. Lleg = char["Left Leg"]
  167.  
  168. slash = Instance.new("Sound")
  169. slash.SoundId = "rbxasset://sounds//swordslash.wav"
  170. slash.Volume = 0.8
  171. slash.Pitch = 1.4
  172. slash.Parent = Rarm
  173.  
  174. hitsound = Instance.new("Sound")
  175. hitsound.SoundId = "http://www.roblox.com/asset/?id=2801263"
  176. hitsound.Volume = 0.55
  177. hitsound.Pitch = 2.1
  178. hitsound.Parent = torso
  179.  
  180. Mo = Instance.new("Model")
  181. Mo.Name = Modelname
  182.  
  183. RABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  184. LABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  185. RLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  186. LLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  187.  
  188. RABW = Weld(torso, RABrick, -1.5, -0.5, 0, 0, 0, 0)
  189. LABW = Weld(torso, LABrick, 1.5, -0.5, 0, 0, 0, 0)
  190. RLBW = Weld(torso, RLBrick, -0.5, 1.2, 0, 0, 0, 0)
  191. LLBW = Weld(torso, LLBrick, 0.5, 1.2, 0, 0, 0, 0)
  192.  
  193. RAW = Weld(RABrick, nil, 0, 0.5, 0, 0, 0, 0)
  194. LAW = Weld(LABrick, nil, 0, 0.5, 0, 0, 0, 0)
  195. RLW = Weld(RLBrick, nil, 0, 0.8, 0, 0, 0, 0)
  196. LLW = Weld(LLBrick, nil, 0, 0.8, 0, 0, 0, 0)
  197.  
  198. for i = -100, -1, 25 do
  199. local p = Part(Mo, false, false, 0, 0, "Black", 0.8, 0.3, 0.1, true)
  200. local w = Weld(torso, p, 0, 0, 0, 0, 0, 0)
  201. w.C0 = CFrame.new(0, -0.5, -0.6) * CFrame.Angles(0, math.rad(i), 0)
  202. w.C1 = CFrame.new(0, 0, -0.6)
  203. end
  204.  
  205. Mo.Parent = char
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement