Advertisement
Guest User

guhn

a guest
May 28th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.76 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. --made by kalepo36 lolol--
  89.  
  90. --Gun Thing--
  91. --------------------------
  92.  
  93. local player = owner
  94. local chara = player.Character
  95.  
  96.  
  97. local ra2 = nil
  98. local la2 = nil
  99. local head = chara:WaitForChild("Head")
  100. local tors = chara:WaitForChild("Torso")
  101. local ra = chara:WaitForChild("Right Arm")
  102. local la = chara:WaitForChild("Left Arm")
  103. local rl = chara:WaitForChild("Right Leg")
  104. local ll = chara:WaitForChild("Left Leg")
  105. local huma = chara:WaitForChild("Humanoid")
  106. local neck = Instance.new("Weld",tors)
  107. neck.Part0 = tors
  108. neck.Part1 = head
  109. neck.C0 = CFrame.new(0,1.5,0)
  110. local nek = neck.C1
  111. local root = chara.HumanoidRootPart.RootJoint.C0
  112. local rs = tors["Right Shoulder"].C0
  113. local ls = tors["Left Shoulder"].C0
  114. local rh = Instance.new("Weld",tors)
  115. rh.Part0 = tors
  116. rh.Part1 = rl
  117. rh.C0 = CFrame.new(0.5,-1,0)
  118. rh.C1 = CFrame.new(0,1,0)
  119. local rhh = rh.C0
  120.  
  121. local lh = Instance.new("Weld",tors)
  122. lh.Part0 = tors
  123. lh.Part1 = ll
  124. lh.C0 = CFrame.new(-0.5,-1,0)
  125. lh.C1 = CFrame.new(0,1,0)
  126. local lhh = lh.C0
  127.  
  128. local rootpart = chara:WaitForChild("HumanoidRootPart")
  129. local pose = "idle"
  130. local sine=0
  131. local speeed=1
  132. attacking = false
  133. -------------------------------------------------------------
  134. print'made by a kalepo36'
  135. print'Q - Run'
  136. -------------------------------------------------------------
  137. function ragdoll(noob)
  138.  
  139. local dead = Instance.new("VelocityMotor",noob)
  140. dead.Name = "Ragdolled"
  141.  
  142. local socket = Instance.new("BallSocketConstraint",noob.Head)
  143. local acth1 = Instance.new("Attachment",noob.Head)
  144. acth1.Position = Vector3.new(0,-0.5,0)
  145. local acth2 = Instance.new("Attachment",noob.Torso)
  146. acth2.Position = Vector3.new(0,1,0)
  147. socket.Attachment0 = acth1
  148. socket.Attachment1 = acth2
  149.  
  150. local socket2 = Instance.new("BallSocketConstraint",noob["Right Arm"])
  151. local acth3 = Instance.new("Attachment",noob["Right Arm"])
  152. acth3.Position = Vector3.new(0,0.5,0)
  153. local acth4 = Instance.new("Attachment",noob.Torso)
  154. acth4.Position = Vector3.new(1.5,0.5,0)
  155. socket2.Attachment0 = acth3
  156. socket2.Attachment1 = acth4
  157.  
  158. local socket3 = Instance.new("BallSocketConstraint",noob["Left Arm"])
  159. local acth5 = Instance.new("Attachment",noob["Left Arm"])
  160. acth5.Position = Vector3.new(0,0.5,0)
  161. local acth6 = Instance.new("Attachment",noob.Torso)
  162. acth6.Position = Vector3.new(-1.5,0.5,0)
  163. socket3.Attachment0 = acth5
  164. socket3.Attachment1 = acth6
  165.  
  166. local socket4 = Instance.new("BallSocketConstraint",noob["Right Leg"])
  167. local acth7 = Instance.new("Attachment",noob["Right Leg"])
  168. acth7.Position = Vector3.new(0,1,0)
  169. local acth8 = Instance.new("Attachment",noob.Torso)
  170. acth8.Position = Vector3.new(0.5,-1,0)
  171. socket4.Attachment0 = acth7
  172. socket4.Attachment1 = acth8
  173.  
  174. local socket5 = Instance.new("BallSocketConstraint",noob["Left Leg"])
  175. local acth9 = Instance.new("Attachment",noob["Left Leg"])
  176. acth9.Position = Vector3.new(0,1,0)
  177. local acth10 = Instance.new("Attachment",noob.Torso)
  178. acth10.Position = Vector3.new(-0.5,-1,0)
  179. socket5.Attachment0 = acth9
  180. socket5.Attachment1 = acth10
  181. end
  182.  
  183. function Noise(id,volume,parent,pitch)
  184. local sound = Instance.new("Sound", parent)
  185. sound.SoundId = "rbxassetid://"..id
  186. sound.Name = "SoundEffect"
  187. sound.PlaybackSpeed = pitch
  188. sound.Volume = volume
  189. sound:Play()
  190. coroutine.resume(coroutine.create(function()
  191. while sound ~= nil do
  192. wait()
  193. if sound.Playing == false then
  194. sound:Destroy()
  195. break
  196. end
  197. end
  198. end))
  199. end
  200.  
  201. function onRunning(speed)
  202. if speed>0 then
  203. pose = "walking"
  204. else
  205. pose = "idle"
  206. end
  207. end
  208. function onDied()
  209. ragdoll(chara)
  210. ra2.Parent:Destroy()
  211. la2.Parent:Destroy()
  212. rootpart:Destroy()
  213. while game:GetService("RunService").Stepped:wait(0) do
  214. ra.Transparency = 0
  215. la.Transparency = 0
  216. end
  217. end
  218. huma.Died:Connect(onDied)
  219. huma.Running:Connect(onRunning)
  220.  
  221. function Particle2(parent,material,direction,position,brickcolor,size,lifetime,speed,shape)
  222. local particle = Instance.new("Part",parent)
  223. particle.CFrame = position
  224. particle.Material = material
  225. particle.BrickColor = BrickColor.new(brickcolor)
  226. particle.Size = size
  227. particle.Anchored = true
  228. particle.CanCollide = false
  229. particle.Shape = shape
  230. local pos = particle.CFrame
  231. coroutine.resume(coroutine.create(function()
  232. for i = 0,lifetime,0.1 do
  233. game:GetService("RunService").Stepped:wait(0)
  234. particle.CFrame = particle.CFrame:Lerp(pos * speed,0.3)
  235. end
  236. local speed = 0.01
  237. repeat
  238. game:GetService("RunService").Stepped:wait(0)
  239. speed = speed + 0.01
  240. if direction == "Down" then
  241. particle.CFrame = particle.CFrame - Vector3.new(0,speed,0)
  242. elseif direction == "Up" then
  243. particle.CFrame = particle.CFrame + Vector3.new(0,speed,0)
  244. end
  245. particle.Transparency = particle.Transparency + 0.05
  246. until particle.Transparency >= 1
  247. particle:Destroy()
  248. end))
  249. end
  250. function Particle(parent,material,position,brickcolor,size,lifetime,speed,shape)
  251. local particle = Instance.new("Part",parent)
  252. particle.CFrame = position
  253. particle.Material = material
  254. particle.BrickColor = BrickColor.new(brickcolor)
  255. particle.Size = size
  256. particle.Anchored = true
  257. particle.CanCollide = false
  258. particle.Name = "Effect"
  259. local mezh = Instance.new("SpecialMesh",particle)
  260. mezh.MeshType = shape
  261. local pos = particle.CFrame
  262. coroutine.resume(coroutine.create(function()
  263. for i = 0,lifetime,0.1 do
  264. game:GetService("RunService").Stepped:wait(0)
  265. particle.CFrame = particle.CFrame:Lerp(pos * speed,0.3)
  266. end
  267. repeat
  268. game:GetService("RunService").Stepped:wait(0)
  269. particle.CFrame = particle.CFrame:Lerp(pos * speed,0.3)
  270. particle.Transparency = particle.Transparency + 0.05
  271. until particle.Transparency >= 1
  272. particle:Destroy()
  273. end))
  274. end
  275. function chat(text)
  276. if chara:FindFirstChild("ChatterBox") then
  277. chara:FindFirstChild("ChatterBox"):Destroy()
  278. end
  279. coroutine.resume(coroutine.create(function()
  280. local bill = Instance.new("BillboardGui",chara)
  281. bill.Adornee = head
  282. bill.StudsOffset = Vector3.new(0,3,0)
  283. local SO = bill.StudsOffset
  284. bill.Active = true
  285. bill.Size = UDim2.new(5,35,2,15)
  286. bill.Name = "ChatterBox"
  287. local tag = Instance.new("TextBox",bill)
  288. tag.Text = " "
  289. tag.Font = "Fantasy"
  290. tag.BackgroundTransparency = 1
  291. tag.Size = UDim2.new(1,0,0.5,0)
  292. tag.BorderSizePixel = 0
  293. tag.TextSize = 50
  294. tag.Active = true
  295. tag.TextColor3 = Color3.new(255,255,255)
  296. tag.TextStrokeTransparency = 1
  297. tag.TextTransparency = 1
  298. tag.TextStrokeColor3 = Color3.new(0, 0, 0)
  299. for i = 1, string.len(text) do
  300. game:GetService("RunService").Stepped:wait(0)
  301. Noise(418252437,1,head,math.random(8,12)/15)
  302. tag.Text = string.sub(text, 1, i)
  303. tag.TextStrokeTransparency = tag.TextStrokeTransparency - 0.05
  304. tag.TextTransparency = tag.TextTransparency - 0.05
  305. bill.StudsOffset = Vector3.new(math.random(-1,1)/15,3 + math.random(-1,1)/15,math.random(-1,1)/15)
  306. end
  307. bill.StudsOffset = Vector3.new(0,3,0)
  308. repeat
  309. game:GetService("RunService").Stepped:wait(0)
  310. tag.TextStrokeTransparency = tag.TextStrokeTransparency - 0.05
  311. tag.TextTransparency = tag.TextTransparency - 0.05
  312. bill.StudsOffset = Vector3.new(math.random(-1,1)/15,3 + math.random(-1,1)/15,math.random(-1,1)/15)
  313. until tag.TextTransparency <= 0
  314. local ang = math.random(-2.5,2.5)
  315. wait(2.5)
  316. for i = 0,10,0.1 do
  317. game:GetService("RunService").Stepped:wait(0)
  318. tag.TextTransparency = tag.TextTransparency + 0.05
  319. tag.TextStrokeTransparency = tag.TextStrokeTransparency + 0.05
  320. bill.StudsOffset = Vector3.new(0,3-i)
  321. tag.Rotation = tag.Rotation + ang
  322. end
  323. bill:Destroy()
  324. end))
  325. end
  326. -------------------------------------------------------------
  327.  
  328. huma.WalkSpeed = 8
  329.  
  330. -----------------------------------------------------------
  331. for i = 0,1,0.1 do
  332. game:GetService("RunService").Stepped:wait(0)
  333. if huma:FindFirstChild("Animator") then
  334. huma.Animator:Destroy()
  335. end
  336. end
  337. -----
  338. local model1 = Instance.new("Model",workspace)
  339. model1.Name = "FakeArmR"
  340. ra2 = ra:Clone()
  341. ra2.Parent = model1
  342. local weld = Instance.new("Weld",ra)
  343. weld.Part0 = ra
  344. weld.Part1 = ra2
  345. local huma2 = Instance.new("Humanoid",model1)
  346. for _, c in pairs(chara:GetChildren()) do
  347. if c:IsA("Shirt") or c:IsA("CharacterMesh") then
  348. c:Clone().Parent = model1
  349. end
  350. end
  351.  
  352. local model2 = Instance.new("Model",workspace)
  353. model2.Name = "FakeArmL"
  354. la2 = la:Clone()
  355. la2.Parent = model2
  356. local weld = Instance.new("Weld",la)
  357. weld.Part0 = la
  358. weld.Part1 = la2
  359. local huma3 = Instance.new("Humanoid",model2)
  360. for _, c in pairs(chara:GetChildren()) do
  361. if c:IsA("Shirt") or c:IsA("CharacterMesh") then
  362. c:Clone().Parent = model2
  363. end
  364. end
  365.  
  366. local camcf = huma.CameraOffset
  367.  
  368. local gun = Instance.new("Part",workspace)
  369. gun.Size = Vector3.new(0.5,1.1,2.5)
  370. local mesh = Instance.new("SpecialMesh",gun)
  371. mesh.MeshId = "rbxassetid://436697873"
  372. mesh.TextureId = "rbxassetid://436697889"
  373. mesh.Scale = Vector3.new(.035,.035,.035)
  374. local weld = Instance.new("Weld",ra)
  375. weld.Part0 = ra
  376. weld.Part1 = gun
  377. weld.C1 = CFrame.new(-0.4,-0.25,-1.5) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-190))
  378.  
  379. -----
  380. function Shoot()
  381. Noise(356911785,0.5,gun,math.random(13,18)/15)
  382. local bullet = Instance.new("Part",chara)
  383. bullet.Material = "Neon"
  384. bullet.Shape = "Cylinder"
  385. bullet.BrickColor = BrickColor.new("New Yeller")
  386. bullet.Size = Vector3.new((gun.CFrame.p - mouse.Hit.p).magnitude,0.5,0.5)
  387. bullet.CFrame = CFrame.new(gun.CFrame.p, mouse.Hit.p) * CFrame.new(0,0.5,-(gun.CFrame.p - mouse.Hit.p).magnitude/2) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
  388. bullet.Anchored = true
  389. bullet.CanCollide = false
  390. bullet.Touched:Connect(function(hit)
  391. if hit.Name ~= "Base" and hit ~= ra2 and hit ~= la2 and hit ~= gun and hit.Parent ~= chara and hit.Parent.Parent ~= chara then
  392. hit:BreakJoints()
  393. end
  394. end)
  395. coroutine.resume(coroutine.create(function()
  396. for i = 0,5,0.1 do
  397. game:GetService("RunService").Stepped:wait(0)
  398. bullet.Transparency = i
  399. bullet.Size = bullet.Size - Vector3.new(0.05,0.05,0.05)
  400. end
  401. bullet:Destroy()
  402. end))
  403. end
  404. -----
  405. ra.Transparency = 1
  406. la.Transparency = 1
  407. mouse.KeyDown:Connect(function(ky)
  408. if attacking == false then
  409. if ky == 'q' and huma.WalkSpeed == 8 then huma.WalkSpeed = 30
  410. elseif ky == 'q' and huma.WalkSpeed == 30 then huma.WalkSpeed = 8
  411. end
  412. end
  413. end)
  414. mouse.Button1Down:Connect(function()
  415. if attacking == false then
  416. Shoot()
  417. end
  418. end)
  419. --chatfunction V
  420. player.Chatted:Connect(function(msg)
  421. if msg == "im gae" or msg == "im gay" or msg == "i'm gae" or msg == "i'm gay" or msg == "Im gae" or msg == "Im gay" or msg == "I'm gae" or msg == "I'm gay" then
  422. chat("no im not")
  423. else
  424. chat(msg)
  425. end
  426. end)
  427. while game:GetService("RunService").Stepped:wait(0) do
  428. sine = sine + speeed
  429.  
  430. if huma.Health ~= 0 then
  431. ra.Transparency = 1
  432. la.Transparency = 1
  433. end
  434.  
  435. if pose == 'idle' and attacking == false then
  436.  
  437. speeed = 1
  438. huma.CameraOffset = huma.CameraOffset:Lerp(Vector3.new(0,0.1 *math.cos(sine / 20),0),0.15)
  439. neck.C1 = neck.C1:Lerp(nek * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-2.5 *math.cos(sine / 20)),math.rad(0),math.rad(0)),0.15)
  440. rootpart.RootJoint.C0 = rootpart.RootJoint.C0:Lerp(root * CFrame.new(0,0,0.1 *math.cos(sine / 20)) * CFrame.Angles(math.rad(1.25 *math.sin(sine / 20)),math.rad(0),math.rad(0)),0.15)
  441. tors["Right Shoulder"].C0 = tors["Right Shoulder"].C0:Lerp(rs * CFrame.new(0.2,0,-0.5) * CFrame.Angles(math.rad(0),math.rad(15),math.rad(90)),0.15)
  442. tors["Left Shoulder"].C0 = tors["Left Shoulder"].C0:Lerp(ls * CFrame.new(-0.4,0,-0.5) * CFrame.Angles(math.rad(0),math.rad(-50),math.rad(-90)),0.15)
  443. rh.C0 = rh.C0:Lerp(rhh * CFrame.new(0,-0.1 *math.cos(sine / 20),-0.025 *math.sin(sine / 20)) * CFrame.Angles(math.rad(1.25 *math.sin(sine / 20)),math.rad(0),math.rad(0)),0.15)
  444. lh.C0 = lh.C0:Lerp(lhh * CFrame.new(0,-0.1 *math.cos(sine / 20),-0.025 *math.sin(sine / 20)) * CFrame.Angles(math.rad(1.25 *math.sin(sine / 20)),math.rad(0),math.rad(0)),0.15)
  445.  
  446. elseif pose == 'walking' and attacking == false then
  447.  
  448. if huma.WalkSpeed <= 16 then
  449. speeed = 0.5
  450. huma.CameraOffset = huma.CameraOffset:Lerp(Vector3.new(0.075 *math.cos(sine / 7),0.125 *math.sin(sine / 3.5),0),0.15)
  451. neck.C1 = neck.C1:Lerp(nek * CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)),0.15)
  452. rootpart.RootJoint.C0 = rootpart.RootJoint.C0:Lerp(root * CFrame.new(0,0,0) * CFrame.Angles(math.rad(5),math.rad(0),math.rad(0)),0.15)
  453. tors["Right Shoulder"].C0 = tors["Right Shoulder"].C0:Lerp(rs * CFrame.new(0.2,0,-0.5) * CFrame.Angles(math.rad(0),math.rad(15),math.rad(90)),0.15)
  454. tors["Left Shoulder"].C0 = tors["Left Shoulder"].C0:Lerp(ls * CFrame.new(-0.4,0,-0.5) * CFrame.Angles(math.rad(0),math.rad(-50),math.rad(-90)),0.15)
  455. rh.C0 = rh.C0:Lerp(rhh * CFrame.new(0,0,0) * CFrame.Angles(math.rad(30 *math.cos(sine / 7)),math.rad(0),math.rad(0)),0.15)
  456. lh.C0 = lh.C0:Lerp(lhh * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-30 *math.cos(sine / 7)),math.rad(0),math.rad(0)),0.15)
  457. elseif huma.WalkSpeed >= 16 then
  458. speeed = 1
  459. huma.CameraOffset = huma.CameraOffset:Lerp(Vector3.new(0.075 *math.cos(sine / 7),0.125 *math.sin(sine / 3.5),0),0.15)
  460. neck.C1 = neck.C1:Lerp(nek * CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)),0.15)
  461. rootpart.RootJoint.C0 = rootpart.RootJoint.C0:Lerp(root * CFrame.new(0,0,0) * CFrame.Angles(math.rad(15),math.rad(0),math.rad(0)),0.15)
  462. tors["Right Shoulder"].C0 = tors["Right Shoulder"].C0:Lerp(rs * CFrame.new(0.2,0,-0.5) * CFrame.Angles(math.rad(0),math.rad(15),math.rad(90)),0.15)
  463. tors["Left Shoulder"].C0 = tors["Left Shoulder"].C0:Lerp(ls * CFrame.new(-0.4,0,-0.5) * CFrame.Angles(math.rad(0),math.rad(-50),math.rad(-90)),0.15)
  464. rh.C0 = rh.C0:Lerp(rhh * CFrame.new(0,0,0) * CFrame.Angles(math.rad(70 *math.cos(sine / 7)),math.rad(0),math.rad(0)),0.15)
  465. lh.C0 = lh.C0:Lerp(lhh * CFrame.new(0,0,0) * CFrame.Angles(math.rad(-70 *math.cos(sine / 7)),math.rad(0),math.rad(0)),0.15)
  466. end
  467.  
  468. end
  469. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement