|
| 12 Feb 2016 07:54 PM |
--I'm sorry if i post too much. i just love making games.
game.Players.LocalPlayer.CharacterAdded:wait() thingy = 1
while true do thingy = script.Parent:WaitForChild("Waste").Value if game.Players.LocalPlayer.leaderstats.Hunger.Value == 0 then game.Players.LocalPlayer.Character.Humanoid.Health = game.Players.LocalPlayer.Character.Humanoid.Health - 1 wait(0.1) elseif game.Players.LocalPlayer.Character.Humanoid.Health == 0 then wait() else game.Players.LocalPlayer.leaderstats.Hunger.Value = game.Players.LocalPlayer.leaderstats.Hunger.Value - thingy game.Players.LocalPlayer.Character.Humanoid.JumpPower = game.Players.LocalPlayer.leaderstats.Hunger.Value*0.5 wait(3) end end
--Located in SCREENGUI-- -- extra info -- i made a hunger fixing script too. that one doesnt work too.
--ANOTHER LOCALSCRIPT INSIDE THE LOCALSCRIPT--
player = game.Players.LocalPlayer
function onchange() if player.leaderstats.Hunger.Value >= 100 then player.leaderstats.Hunger.Value = 100 end end
player.leaderstats.Hunger.Changed:connect(onchange)
--TL;DR these 2 scripts work in studio finely but ingame break. |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2016 07:57 PM |
NOEDIT : Waste.Value changes with this script in screengui too
-- insanityscripter --Drag this script into the StarterGui folder. repeat wait() until game.Players.LocalPlayer
m = game.Players.LocalPlayer:GetMouse()
m.KeyDown:connect(function(key) if key == "0" then --"Shift to run" 0 == shift script.Parent.Waste.Value = 3 print("Running") game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 25 --change "25" to your speed you want end end)
m.KeyUp:connect(function(key) if key == "0" then script.Parent.Waste.Value = 1 game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16 --change "16" to your speed you want when you stop running end end) |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2016 08:18 PM |
| Bump EDIT : i guess i could put the hunger script somewhere else? |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2016 08:27 PM |
| Bump 2 edit : doesn't work. |
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Feb 2016 08:58 PM |
its a localscript isnt it does your game have filteringenabled
https://www.youtube.com/watch?v=onhFH7jpq2c |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2016 09:04 PM |
FilteringEnabled disabled
localscript |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2016 09:14 PM |
| Edit : should i use modulescript? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
|
| 12 Feb 2016 09:51 PM |
| How do i see the output???? |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2016 10:18 PM |
| Press F9 while in game to open output. |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:12 AM |
| Random number values only. What to do? |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Feb 2016 11:11 AM |
| bump2. tried every every everything i could. still broken :( |
|
|
| Report Abuse |
|
|
indeimaus
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 4285 |
|
|
| 13 Feb 2016 11:15 AM |
| use game:GetService("Players").LocalPlayer |
|
|
| Report Abuse |
|
|