Advertisement
21jg845502abc

Untitled

Nov 17th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.09 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. local p = owner
  87. wait(1.5)
  88. local c = p.Character
  89. local atk = false
  90. local lerp = 0
  91. local sound = Instance.new("Sound",c.Torso)
  92. sound.SoundId = "rbxassetid://2013105032"
  93. sound.Volume = 6
  94. sound:Play()
  95. local torso = c.Torso
  96. local pew = Instance.new("Sound",c["Right Arm"])
  97. pew.SoundId = "rbxassetid://357614490"
  98. pew.Volume = 6
  99. c.Humanoid.Animator.Parent = nil
  100. torso["Right Shoulder"].C0 = CFrame.new(1.5,0.5,-0.5) * CFrame.Angles(0,0,1.55)
  101. torso["Left Shoulder"].C0 = CFrame.new(-1.5,0.5,-0.5) * CFrame.Angles(0,0,-1.55)
  102. gui1=Instance.new("BillboardGui")
  103. gui1.Parent = c.Head
  104. gui1.Adornee = c.Head
  105. gui1.Size=UDim2.new(400.5,0,1,0)
  106. gui1.StudsOffset=Vector3.new(0,2,0)
  107. gui1.AlwaysOnTop = false
  108. text1=Instance.new("TextLabel")
  109. text1.Font = Enum.Font.SourceSans
  110. c.Humanoid.WalkSpeed = 60
  111. text1.TextColor3 = Color3.fromRGB(0,255,255)
  112. text1.TextStrokeTransparency = 0
  113. text1.TextWrapped = true
  114. text1.TextScaled = true
  115. text1.Text = "T Pose"
  116. text1.Size=UDim2.new(1,0,1,0)
  117. text1.Position=UDim2.new(0,0,0,0)
  118. text1.BackgroundTransparency = 1
  119. text1.Parent=gui1
  120. mouse.KeyDown:connect(function(k)
  121. if k == "l" and atk == false then
  122. atk = true
  123. lerp = 0.3
  124. for i = 1,10 do
  125. lerp = lerp - 0.03
  126. wait()
  127. torso["Right Shoulder"].C0 = torso["Right Shoulder"].C0 * CFrame.new(0,0.1,0) *CFrame.Angles(lerp,0,0)
  128. end
  129. if mouse.Target ~= nil then
  130. local part = Instance.new("Part",workspace)
  131. part.CanCollide = false
  132. part.CFrame = c["Right Arm"].CFrame * CFrame.new(0,-1,0)
  133.  
  134. part.Anchored = true
  135. part.Size = Vector3.new(1,1,1)
  136. local part2 = Instance.new("Part",workspace)
  137. part2.CanCollide = false
  138. part2.CFrame = mouse.Hit
  139. part.Transparency = 1
  140. part2.Transparency = 1
  141. part2.Anchored = true
  142. part2.Size = Vector3.new(1,1,1)
  143. local joint = part.Position + part2.Position
  144. local distance = (part.Position - part2.Position).magnitude
  145. pew:Play()
  146. joint = joint/2
  147. local segment = Instance.new("Part",workspace)
  148. segment.Size = Vector3.new(.7,.7,distance)
  149. segment.Name = "LazerSegment"
  150. segment.Anchored = true
  151. segment.CanCollide = false
  152. segment.Material = "Neon"
  153. local naameval =Instance.new("StringValue",segment)
  154. naameval.Value = p.Name
  155. segment.CFrame = CFrame.new(part.Position,joint) * CFrame.new(0,0,-distance/2)
  156. part:Destroy()
  157. part2:Destroy()
  158. lerp = -0.3
  159. if mouse.Target.Parent:FindFirstChildOfClass("Humanoid") then
  160. mouse.Target.Parent:FindFirstChildOfClass("Humanoid").Health = mouse.Target.Parent:FindFirstChildOfClass("Humanoid").Health - 30
  161. end
  162. end
  163.  
  164. wait(0.5)
  165. for i = 1,10 do
  166. lerp = lerp + 0.03
  167. wait()
  168. torso["Right Shoulder"].C0 = torso["Right Shoulder"].C0 * CFrame.new(0,-0.1,0) *CFrame.Angles(lerp,0,0)
  169. end
  170. torso["Right Shoulder"].C0 = CFrame.new(1.5,0.5,-0.5) * CFrame.Angles(0,0,1.55)
  171. atk = false
  172. end
  173. end)
  174. while wait() do
  175. for i,v in pairs(workspace:GetChildren()) do
  176. if v.Name == "LazerSegment" then
  177. if v.Value.Value == p.Name then
  178. v.Size = v.Size + Vector3.new(0.1,0.1,0)
  179. v.Transparency = v.Transparency + 0.1
  180. if v.Transparency > 1 then
  181. v:Destroy()
  182. end
  183. end
  184. end
  185. end
  186. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement