Advertisement
Guest User

Flowey script fe roblox

a guest
Mar 25th, 2019
645
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.80 KB | None | 0 0
  1. --[[
  2. Controls:
  3. LCTRL: Fire a friendliness pellet
  4. K: Evil laugh
  5. Z: Angry flowy
  6. J: Spooky flowy theme
  7. G: Normal flowy theme
  8. F: Stop music
  9. X: Remove dialogue box
  10. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  11. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  12. do
  13. print("FE Compatibility code by Mokiros")
  14. script.Parent = Player.Character
  15.  
  16. --RemoteEvent for communicating
  17. local Event = Instance.new("RemoteEvent")
  18. Event.Name = "UserInput_Event"
  19.  
  20. --Fake event to make stuff like Mouse.KeyDown work
  21. local function fakeEvent()
  22. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  23. t.connect = t.Connect
  24. return t
  25. end
  26.  
  27. --Creating fake input objects with fake variables
  28. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  29. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  30. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  31. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  32. end}
  33. --Merged 2 functions into one by checking amount of arguments
  34. CAS.UnbindAction = CAS.BindAction
  35.  
  36. --This function will trigger the events that have been :Connect()'ed
  37. local function te(self,ev,...)
  38. local t = m[ev]
  39. if t and t._fakeEvent and t.Function then
  40. t.Function(...)
  41. end
  42. end
  43. m.TrigEvent = te
  44. UIS.TrigEvent = te
  45.  
  46. Event.OnServerEvent:Connect(function(plr,io)
  47. if plr~=Player then return end
  48. if io.isMouse then
  49. m.Target = io.Target
  50. m.Hit = io.Hit
  51. else
  52. local b = io.UserInputState == Enum.UserInputState.Begin
  53. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  54. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  55. end
  56. for _,t in pairs(CAS.Actions) do
  57. for _,k in pairs(t.Keys) do
  58. if k==io.KeyCode then
  59. t.Function(t.Name,io.UserInputState,io)
  60. end
  61. end
  62. end
  63. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  64. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  65. end
  66. end)
  67. Event.Parent = NLS([==[
  68. local Player = game:GetService("Players").LocalPlayer
  69. local Event = script:WaitForChild("UserInput_Event")
  70.  
  71. local UIS = game:GetService("UserInputService")
  72. local input = function(io,a)
  73. if a then return end
  74. --Since InputObject is a client-side instance, we create and pass table instead
  75. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  76. end
  77. UIS.InputBegan:Connect(input)
  78. UIS.InputEnded:Connect(input)
  79.  
  80. local Mouse = Player:GetMouse()
  81. local h,t
  82. --Give the server mouse data 30 times every second, but only if the values changed
  83. --If player is not moving their mouse, client won't fire events
  84. while wait(1/30) do
  85. if h~=Mouse.Hit or t~=Mouse.Target then
  86. h,t=Mouse.Hit,Mouse.Target
  87. Event:FireServer({isMouse=true,Target=t,Hit=h})
  88. end
  89. end]==],Player.Character)
  90. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  91. end
  92. ]]--
  93. dot = false
  94. shoot = true
  95. des = false
  96. local ChatService = game:GetService("Chat")
  97. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  98. if v:IsA('Part') then v.Transparency = 1
  99. if v:IsA('Hat') then v.Handle.Transparency = 1
  100.  
  101. end
  102. end
  103. end
  104. local player = owner
  105. player.Character.Head.face:Remove()
  106.  
  107. m=player:GetMouse()
  108. bb = Instance.new("BillboardGui",player.Character.Head)
  109. bb.Enabled = true
  110. bb.AlwaysOnTop = true
  111.  
  112. bb.Size = UDim2.new(0,200,0,50)
  113. bb.StudsOffset = Vector3.new(-0.5,-0.5,0)
  114. fl = Instance.new("Part",player.Character)
  115.  
  116. fl.FormFactor = 3
  117. fl.Size = Vector3.new(3,3,0.01)
  118. fl.Transparency = 1
  119. aa = 0.075
  120. fl.CanCollide = false
  121. dec = Instance.new("Decal",fl)
  122. dec.Face = "Front"
  123. dec.Texture = "rbxassetid://379128237"
  124. dec1 = Instance.new("Decal",fl)
  125. dec1.Face = "Back"
  126. dec1.Texture = "rbxassetid://379128324"
  127. wel = Instance.new("Weld",fl)
  128. wel.Part0=fl
  129. wel.Part1=player.Character.Torso
  130. wel.C0 = CFrame.new(0,2,0)
  131. gui=Instance.new("TextBox",bb)
  132. gui.Text = "* "
  133. gui.Size = UDim2.new(0,266,0,90)
  134.  
  135. gui.Position=UDim2.new(0,94,0,-60)
  136. gui.TextColor3 = Color3.new(255,255,255)
  137. gui.BackgroundColor3=Color3.new(0,0,0)
  138. gui.TextWrapped = true
  139. gui.TextScaled = true
  140. gui.TextXAlignment = "Left"
  141. gui.TextYAlignment = "Top"
  142. gui.Visible = false
  143. gui.BorderColor3 = Color3.new(0,0,0)
  144.  
  145. gui1=Instance.new("TextButton",bb)
  146. gui1.Position=UDim2.new(0,5,0,-66)
  147. gui1.Size = UDim2.new(0,380,0,102)
  148.  
  149. gui1.TextColor3 = Color3.new(255,255,255)
  150. gui1.BackgroundColor3=Color3.new(255,255,255)
  151.  
  152. gui1.Visible = false
  153. img = Instance.new("ImageLabel",bb)
  154. img.Size = UDim2.new(0,92,0,94)
  155. img.Position = UDim2.new(0,15,0,-62)
  156. img.Image = "rbxassetid://340492116"
  157. img.BorderColor3 = Color3.new(0,0,0)
  158. img.Visible = false
  159. sid = "379851665"
  160. asd = Instance.new("Sound",player.Character.Torso)
  161. asd.SoundId = "http://www.roblox.com/asset/?id =379851665"
  162.  
  163. asd1 = Instance.new("Sound",player.Character.Torso)
  164. asd1.SoundId = "http://www.roblox.com/asset/?id =379851665"
  165.  
  166. asd2 = Instance.new("Sound",player.Character.Torso)
  167. asd2.SoundId = "http://www.roblox.com/asset/?id = 317393485"
  168. asd2.Looped = true
  169. asd3 = Instance.new("Sound",player.Character.Torso)
  170. asd3.SoundId = "http://www.roblox.com/asset/?id = 316014309"
  171. asd3.Looped = true
  172. asd4 = Instance.new("Sound",player.Character.Torso)
  173. asd4.SoundId = "http://www.roblox.com/asset/?id = 370435986"
  174. asd4.Looped = true
  175. asd5 = Instance.new("Sound",player.Character.Torso)
  176. asd5.SoundId = "http://www.roblox.com/asset/?id = 379865908"
  177. asd5.Looped = true
  178. asd6 = Instance.new("Sound",player.Character.Torso)
  179. asd6.SoundId = "http://www.roblox.com/asset/?id = 379865908"
  180. asd7 = Instance.new("Sound",player.Character.Torso)
  181. asd7.SoundId = "http://www.roblox.com/asset/?id = 379874748"
  182. asd7.Looped = true
  183. m.KeyDown:connect(function(k)
  184.  
  185. if k == string.char(50) then
  186. if shoot == true then
  187. shoot = false
  188. b = Instance.new("Part",workspace)
  189. b.CFrame = fl.CFrame * CFrame.new(0,0,1)
  190. b.BrickColor = BrickColor.new("asd")
  191. b.TopSurface = "Universal"
  192. b.BottomSurface = "Universal"
  193. b.LeftSurface = 0
  194. b.RightSurface = 0
  195. b.FrontSurface = 0
  196. b.BackSurface = 0
  197. b.FormFactor = 3
  198. b.Size = Vector3.new(0.2,0.2,0.5)
  199. b.Material = "Neon"
  200. b.Anchored = false
  201. b.CanCollide = false
  202. b.Reflectance = 0
  203.  
  204. b.Velocity = CFrame.new(b.Position,player:GetMouse().Hit.p).lookVector * 200
  205. b.Touched:connect(function(h)
  206. if h.Parent.Name ==game.Players.LocalPlayer.Name then
  207. x = h.Parent:findFirstChild("Humanoid")
  208. x:TakeDamage(0)
  209. else x = h.Parent:findFirstChild("Humanoid")
  210. if x then
  211.  
  212. x:TakeDamage(15)
  213.  
  214.  
  215.  
  216. end end end)
  217. wait(0.3)
  218. b:Remove()
  219. shoot = true
  220.  
  221.  
  222.  
  223.  
  224. end
  225. end
  226. end)
  227.  
  228.  
  229.  
  230.  
  231. function play(play)
  232. asd:Play()
  233.  
  234. asd1:Play()
  235. end
  236. eye = Instance.new("Part",player.Character)
  237. eye.BrickColor = BrickColor.new("Toothpaste")
  238. eye.Material = "Neon"
  239. eye.FormFactor = 3
  240. eye.Shape = "Ball"
  241. eye.Size = Vector3.new(0.37,0.37,0.1)
  242. weld = Instance.new("Weld",eye)
  243. weld.Part0 = eye
  244. weld.Part1 = player.Character.Head
  245. weld.C0 = CFrame.new(0.1,-0.2,0.45)
  246. eye.Transparency = 1
  247. -- listen for their chatting
  248. player.Chatted:connect(function(message)
  249. a = string.len(message)
  250. gui.Text = "* "
  251. gui.Visible = true
  252. gui1.Visible = true
  253. des = false
  254. img.Visible = true
  255. print(a)
  256. if dot == false then
  257. for i = 1,string.len(message) do wait(aa)
  258. gui.Text =gui.Text..message:sub(i,i)
  259. play()
  260.  
  261. end
  262. end
  263.  
  264.  
  265. des = true
  266. end)
  267. m.KeyDown:connect(function(k)
  268. if k == "g" then
  269. asd2:Play()
  270. eye.Transparency = 1
  271.  
  272. end
  273. end)
  274.  
  275.  
  276.  
  277. m.KeyDown:connect(function(k)
  278. if k == "z" then
  279. aa = 0.08
  280. asd1.SoundId = "http://www.roblox.com/asset/?id =379862308"
  281. asd.SoundId = "http://www.roblox.com/asset/?id =379862308"
  282. img.Image = "rbxassetid://311067910"
  283. end
  284. end)
  285. m.KeyDown:connect(function(k)
  286. if k == "c" then
  287. aa=0.075
  288. asd1.SoundId = "http://www.roblox.com/asset/?id =379851665"
  289. asd.SoundId = "http://www.roblox.com/asset/?id =379851665"
  290. img.Image = "rbxassetid://340492116"
  291. end
  292. end)
  293. m.KeyDown:connect(function(k)
  294. if k == "n" then
  295. sid = "379851665"
  296. --img.Image = "rbxassetid://379880202"
  297. end
  298. end)
  299. m.KeyDown:connect(function(k)
  300. if k == "b" then
  301. --img.Image = "rbxassetid://379866291"
  302. end
  303. end)
  304. m.KeyDown:connect(function(k)
  305. if k == "m" then
  306. --img.Image = "rbxassetid://379866374"
  307. end
  308. end)
  309. m.KeyDown:connect(function(k)
  310. if k == "v" then
  311. --img.Image = "rbxassetid://378619540"
  312. end
  313. end)
  314. m.KeyDown:connect(function(k)
  315. if k == "k" then
  316. asd6:Play()
  317. end
  318. end)
  319. m.KeyDown:connect(function(k)
  320. if k == "j" then
  321. asd7:Play()
  322. end
  323. end)
  324.  
  325. m.KeyDown:connect(function(k)
  326. if k == "x" then
  327. if des == true then
  328. gui.Visible = false
  329. gui.Text = "* "
  330. gui1.Visible = false
  331. img.Visible = false
  332. end
  333. end
  334. end)
  335. m.KeyDown:connect(function(k)
  336. if k == "f" then
  337. asd3:Stop()
  338. asd2:Stop()
  339. asd7:Stop()
  340. asd4:Stop()
  341. eye.Transparency = 1
  342. asd5:Stop()
  343. end
  344. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement